Skip to content

Commit

Permalink
test: Update middleware unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
pardoman committed Jun 30, 2016
1 parent 8f541d5 commit edbe99a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unit/middleware/karma.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('middleware.karma', () => {

response.once('end', () => {
expect(nextSpy).not.to.have.been.called
expect(response).to.beServedAs(200, 'CONTEXT\n<script type="text/javascript" src="/__karma__/absolute/first.js?sha123"></script>\n<script type="application/dart" src="/__karma__/absolute/second.dart?sha456"></script>')
expect(response).to.beServedAs(200, 'CONTEXT\n<script type="text/javascript" src="/__karma__/absolute/first.js?sha123" crossorigin="anonymous"></script>\n<script type="application/dart" src="/__karma__/absolute/second.dart?sha456" crossorigin="anonymous"></script>')
done()
})

Expand Down Expand Up @@ -227,7 +227,7 @@ describe('middleware.karma', () => {

response.once('end', () => {
expect(nextSpy).not.to.have.been.called
expect(response).to.beServedAs(200, 'CONTEXT\n<script type="text/javascript" src="/__karma__/absolute/some/abc/a.js?sha"></script>\n<script type="text/javascript" src="/__karma__/base/b.js?shaaa"></script>')
expect(response).to.beServedAs(200, 'CONTEXT\n<script type="text/javascript" src="/__karma__/absolute/some/abc/a.js?sha" crossorigin="anonymous"></script>\n<script type="text/javascript" src="/__karma__/base/b.js?shaaa" crossorigin="anonymous"></script>')
done()
})

Expand Down Expand Up @@ -281,7 +281,7 @@ describe('middleware.karma', () => {
])

response.once('end', () => {
expect(response).to.beServedAs(200, 'CONTEXT\n<script type="text/javascript" src="http://some.url.com/whatever"></script>')
expect(response).to.beServedAs(200, 'CONTEXT\n<script type="text/javascript" src="http://some.url.com/whatever" crossorigin="anonymous"></script>')
done()
})

Expand Down Expand Up @@ -344,7 +344,7 @@ describe('middleware.karma', () => {

response.once('end', () => {
expect(nextSpy).not.to.have.been.called
expect(response).to.beServedAs(200, 'DEBUG\n<script type="text/javascript" src="/__karma__/absolute/first.js"></script>\n<script type="text/javascript" src="/__karma__/base/b.js"></script>')
expect(response).to.beServedAs(200, 'DEBUG\n<script type="text/javascript" src="/__karma__/absolute/first.js" crossorigin="anonymous"></script>\n<script type="text/javascript" src="/__karma__/base/b.js" crossorigin="anonymous"></script>')
done()
})

Expand Down

0 comments on commit edbe99a

Please sign in to comment.