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

Add file location when SyntaxError happens in ESM (fixes #4551) #4557

Merged
merged 3 commits into from
Feb 3, 2021
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
Prev Previous commit
fix test for windows
  • Loading branch information
giltayar authored and juergba committed Feb 3, 2021
commit fb77b3135b0405e523edb4044e457ea7930c06e2
5 changes: 4 additions & 1 deletion test/integration/esm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ describe('esm', function() {
const err = await runMochaAsync(fixture, args, {stdio: 'pipe'}).catch(
err => err
);
expect(err.output, 'to contain', 'SyntaxError').and('to contain', fixture);
expect(err.output, 'to contain', 'SyntaxError').and(
'to contain',
'esm-syntax-error.fixture.mjs'
);
});

it('should recognize esm files ending with .js due to package.json type flag', function(done) {
Expand Down