Conversation
|
@slnode test please |
server/config.json
Outdated
| "cors": false, | ||
| "errorHandler": { | ||
| "disableStackTrace": false | ||
| "debug": false, |
There was a problem hiding this comment.
disableStackTrace:false should be converted into debug:true.
|
@loay reviewed, PTAL |
|
@bajtos PTAL |
| var given = require('./helpers/given'); | ||
| var should = require('chai').should(); | ||
| var loopback = require('loopback'); | ||
| var boot = require('loopback-boot'); |
There was a problem hiding this comment.
Hmm, I think this may not work when the scaffolded application uses a different loopback or loopback-boot version than we use in loopback-workspace. Considering that fix is not straightforward and the situation may actually never happen, I think it's ok to leave these two lines as they are, but please add a comment pointing out this possible problem.
|
updated test cases and rebased. |
test/end-to-end.js
Outdated
| var ref = TestDataBuilder.ref; | ||
| var given = require('./helpers/given'); | ||
| var should = require('chai').should(); | ||
| // this may not work when the scaffolded application uses a different |
There was a problem hiding this comment.
// This...to make this consistent with the third line of the comment, which starts with capital letter too
|
@loay sorry for the back and forth, I realised my advise about checking the missing stack trace was wrong :( |
|
@bajtos |
|
@bajtos PTAL |
test/end-to-end.js
Outdated
| .end(function(err, res) { | ||
| app.use(function(err, res) { | ||
| var responseBody = JSON.stringify(res.body); | ||
| console.log(responseBody); |
There was a problem hiding this comment.
Forgotten console.log. If you find it useful to have a log around, then please use debug instead.
In case debug is not defined in this file yet: in tests, we usually define debug at the top of the test file this way:
var debug = require('debug')('test');
From what I can tell, it looks like the application is misconfigured, strong-error-handler is not installed and the response contains empty body because it's produced by express default error handler. Debug log: I don't think there should be Additionally, if you look at @loay Since this change is not urgent, I am going to use this as a learning opportunity for you. Here is what I'd like you to do:
(There are other ways, pick whatever works best for you. Just make sure to include only tests that use the same sandbox as the test you are writing.)
Right now, it fails with the following error: Do not fix this error yet!
|
|
@bajtos PTAL. Thanks. |
0863f2c to
7143d31
Compare
0863f2c to
81e3867
Compare
connect to https://github.com/strongloop-internal/scrum-loopback/issues/896