Skip to content

Commit

Permalink
Fix Babel require hook test for Node.js 7.6.0
Browse files Browse the repository at this point in the history
Node.js 7.6.0 supports async / await so the test doesn't throw an
exception. Use the unsupported module syntax instead.
  • Loading branch information
novemberborn committed Feb 23, 2017
1 parent 767c3f8 commit 3573896
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ test('improper use of t.throws from within an async callback will be reported to
});
});

test('babel require hook only applies to the test file', t => {
test('babel require hook only does not apply to source files', t => {
t.plan(3);

execCli('fixture/babel-hook.js', (err, stdout, stderr) => {
t.ok(err);
t.is(err.code, 1);
t.match(stderr, /Unexpected token/);
t.match(stderr, /Unexpected (token|reserved word)/);
t.end();
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/babel-hook-imported.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.export = async () => {};
export default () => {};

0 comments on commit 3573896

Please sign in to comment.