Skip to content

Commit

Permalink
fix test in node 6
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Mar 28, 2018
1 parent 48b878e commit 27aefaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ exports[`prints useful error for requires after test is done 1`] = `
> 11 | const double = require('../');
12 |
13 | expect(double(5)).toBe(10);
14 | }, 0);
at Timeout.setTimeout [as _onTimeout] (__tests__/late-require.test.js:11:20)"
14 | }, 0);"
`;
5 changes: 4 additions & 1 deletion integration-tests/__tests__/require_after_teardown.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ test('prints useful error for requires after test is done', () => {

const interestingLines = stderr
.split('\n')
.slice(9, 19)
.slice(9, 17)
.join('\n');

expect(interestingLines).toMatchSnapshot();
expect(stderr.split('\n')[18]).toMatch(
new RegExp('(__tests__/late-require.test.js:11:20)'),
);
});

0 comments on commit 27aefaf

Please sign in to comment.