Skip to content

Commit

Permalink
Fail if import example cannot be extracted
Browse files Browse the repository at this point in the history
  • Loading branch information
ctavan committed Oct 16, 2020
1 parent 36db7df commit c7931bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/module_job.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function extractExample(file, lineNumber) {
return `\n\nimport ${defaultImport} from '${node.node.source.value}';\n` +
`const {${destructuringAssignment}} = ${defaultImport};\n`;
} while (node === undefined || node.node.loc.start.line <= lineNumber);
return '';
assert.fail('Could not find erroneous import statement');
}

/* A ModuleJob tracks the loading of a single Module, and the ModuleJobs of
Expand Down

0 comments on commit c7931bd

Please sign in to comment.