Merge pull request #88 from PradnyaBaviskar/issue-85

Fix explorer tests for different line endings on Windows
This commit is contained in:
Miroslav Bajtoš 2015-02-27 11:19:01 +01:00
commit 8e8bb34c42
1 changed files with 5 additions and 4 deletions

View File

@ -5,6 +5,7 @@ var assert = require('assert');
var path = require('path'); var path = require('path');
var expect = require('chai').expect; var expect = require('chai').expect;
var urlJoin = require('../lib/url-join'); var urlJoin = require('../lib/url-join');
var os = require('os');
describe('explorer', function() { describe('explorer', function() {
@ -114,7 +115,7 @@ describe('explorer', function() {
request(app).get('/explorer/swagger-ui.js') request(app).get('/explorer/swagger-ui.js')
.expect(200) .expect(200)
// expect the content of `dummy-swagger-ui/swagger-ui.js` // expect the content of `dummy-swagger-ui/swagger-ui.js`
.expect('/* custom swagger-ui file */\n') .expect('/* custom swagger-ui file */' + os.EOL)
.end(done); .end(done);
}); });
@ -122,7 +123,7 @@ describe('explorer', function() {
request(app).get('/explorer/') request(app).get('/explorer/')
.expect(200) .expect(200)
// expect the content of `dummy-swagger-ui/index.html` // expect the content of `dummy-swagger-ui/index.html`
.expect('custom index.html\n') .expect('custom index.html' + os.EOL)
.end(done); .end(done);
}); });
}); });
@ -141,7 +142,7 @@ describe('explorer', function() {
request(app).get('/explorer/') request(app).get('/explorer/')
.expect(200) .expect(200)
// expect the content of `dummy-swagger-ui/index.html` // expect the content of `dummy-swagger-ui/index.html`
.expect('custom index.html\n') .expect('custom index.html' + os.EOL)
.end(done); .end(done);
}); });
@ -153,7 +154,7 @@ describe('explorer', function() {
request(app).get('/explorer/') request(app).get('/explorer/')
.expect(200) .expect(200)
// expect the content of `dummy-swagger-ui/index.html` // expect the content of `dummy-swagger-ui/index.html`
.expect('custom index.html\n') .expect('custom index.html' + os.EOL)
.end(done); .end(done);
}); });
}); });