Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ftr] take screenshots on failure #11709

Merged
merged 6 commits into from
May 11, 2017
Merged
Changes from 1 commit
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
5 changes: 2 additions & 3 deletions src/ui/public/utils/__tests__/scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,15 @@ describe('Scanner', function () {
scroll = sinon.stub(scanner.client, 'scroll', (req, cb) => cb(null, mockScroll));
});

it('should reject when an error occurs', function (done) {
it('should reject when an error occurs', function () {
search.restore();
search = sinon.stub(scanner.client, 'search', (req, cb) => cb(new Error('fail.')));
return scanner.scanAndMap('')
.then(function () {
done(new Error('should reject'));
throw new Error('should reject');
})
.catch(function (error) {
expect(error.message).to.be('fail.');
done();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

});
});

Expand Down