From 297086fb551829f99dd9208b65ffbcbc4491f57d Mon Sep 17 00:00:00 2001 From: Pradnya Baviskar Date: Fri, 27 Feb 2015 15:20:10 +0530 Subject: [PATCH] Fix explorer tests for different line endings on Windows --- test/explorer.test.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/explorer.test.js b/test/explorer.test.js index c3b4aeb..431fd3f 100644 --- a/test/explorer.test.js +++ b/test/explorer.test.js @@ -5,6 +5,7 @@ var assert = require('assert'); var path = require('path'); var expect = require('chai').expect; var urlJoin = require('../lib/url-join'); +var os = require('os'); describe('explorer', function() { @@ -114,7 +115,7 @@ describe('explorer', function() { request(app).get('/explorer/swagger-ui.js') .expect(200) // 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); }); @@ -122,7 +123,7 @@ describe('explorer', function() { request(app).get('/explorer/') .expect(200) // expect the content of `dummy-swagger-ui/index.html` - .expect('custom index.html\n') + .expect('custom index.html' + os.EOL) .end(done); }); }); @@ -141,7 +142,7 @@ describe('explorer', function() { request(app).get('/explorer/') .expect(200) // expect the content of `dummy-swagger-ui/index.html` - .expect('custom index.html\n') + .expect('custom index.html' + os.EOL) .end(done); }); @@ -153,7 +154,7 @@ describe('explorer', function() { request(app).get('/explorer/') .expect(200) // expect the content of `dummy-swagger-ui/index.html` - .expect('custom index.html\n') + .expect('custom index.html' + os.EOL) .end(done); }); });