Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"chai": "^3.2.0",
"eslint": "^2.8.0",
"eslint-config-loopback": "^2.0.0",
"loopback": "^3.0.0-alpha.4",
"loopback": "^3.0.0",
"mocha": "^2.2.5",
"supertest": "^1.0.1"
},
Expand Down
29 changes: 19 additions & 10 deletions test/explorer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('explorer', function() {
if (err) return done(err);

// expect the content of `dummy-swagger-ui/swagger-ui.js`
expect(res.text).to.contain('/* custom swagger-ui file */' + os.EOL);
expect(res.text).to.contain('/* custom swagger-ui file */');

done();
});
Expand All @@ -153,9 +153,12 @@ describe('explorer', function() {
it('overrides strongloop overrides', function(done) {
request(app).get('/explorer/')
.expect(200)
// expect the content of `dummy-swagger-ui/index.html`
.expect('custom index.html' + os.EOL)
.end(done);
.end(function(err, res) {
if (err) return done(er);
// expect the content of `dummy-swagger-ui/index.html`
expect(res.text).to.contain('custom index.html');
done();
});
});
});

Expand Down Expand Up @@ -231,9 +234,12 @@ describe('explorer', function() {

request(app).get('/explorer/')
.expect(200)
// expect the content of `dummy-swagger-ui/index.html`
.expect('custom index.html' + os.EOL)
.end(done);
.end(function(err, res) {
if (err) return done(err);
// expect the content of `dummy-swagger-ui/index.html`
expect(res.text).to.contain('custom index.html');
done();
});
});

it('should allow `uiDirs` to be defined as an String', function(done) {
Expand All @@ -243,9 +249,12 @@ describe('explorer', function() {

request(app).get('/explorer/')
.expect(200)
// expect the content of `dummy-swagger-ui/index.html`
.expect('custom index.html' + os.EOL)
.end(done);
.end(function(err, res) {
if (err) return done(err);
// expect the content of `dummy-swagger-ui/index.html`
expect(res.text).to.contain('custom index.html');
done();
});
});
});

Expand Down