Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Dec 26, 2021
1 parent 40b8dcb commit bcdb887
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/esm-import-assertions/importJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ console.log(
);

// Test that omitting the assertion causes node to throw an error
await import('./car.json')
.then(() => {
await import('./car.json').then(
() => {
throw new Error('should have thrown');
},
(error: Error) => {
if(!error.message.includes('foo bar')) {
if (!error.message.includes('foo bar')) {
throw error;
}
/* error is expected */
});
console.log('Done!');
}
);
console.log('Done!');

0 comments on commit bcdb887

Please sign in to comment.