Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Currently, unit test will fail in Nodejs 6 and Nodejs 8.
https://rackhd.atlassian.net/browse/RAC-6232
AC:
Detail
on-tasks
Three failures all caused by 'AssertionError', in node4,6 only returns 'AssertionError' but in node8 it returns more information /AssertionError.*/
Solution
Change
expect(e).to.have.property('name').that.equals('AssertionError');
to
expect(e).to.have.property('name').to.match(/AssertionError.*/);
Bug fix:
For spec/lib/jobs/obm-control-spec.js:L81
At line 96 should call
done(e)
Instead of
done()
Because only call done() will finish the case without any failure, so this case will be always passed, doen(e) can catch the error and return the error message
It's better to update module supertest from 0.15.0 to 1.12.0 in every repos, because if use npm link to install modules, it may fail the unittest, the reason is supertest@0.15.0 doesn't support.end()
@iceiilin @anhou @pengz1 @bbcyyb @PengTian0