Skip to content

Commit c7931bd

Browse files
committed
Fail if import example cannot be extracted
1 parent 36db7df commit c7931bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/modules/esm/module_job.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function extractExample(file, lineNumber) {
8585
return `\n\nimport ${defaultImport} from '${node.node.source.value}';\n` +
8686
`const {${destructuringAssignment}} = ${defaultImport};\n`;
8787
} while (node === undefined || node.node.loc.start.line <= lineNumber);
88-
return '';
88+
assert.fail('Could not find erroneous import statement');
8989
}
9090

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

0 commit comments

Comments
 (0)