Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Geoffrey Booth <[email protected]>
  • Loading branch information
aduh95 and GeoffreyBooth authored May 19, 2024
1 parent e687acd commit 08c8705
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1708,6 +1708,8 @@ static void ContainsModuleSyntax(const FunctionCallbackInfo<Value>& args) {
resource_name = args[2].As<String>();
}
// Argument 4: flag to indicate if CJS variables should not be in scope
// (they should be for normal CommonJS modules, but not for the
// CommonJS eval scope).
bool cjs_var = !args[3]->IsString();

bool cache_rejected = false;
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-detect-ambiguous.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ describe('Wrapping a `require` of an ES module while using `--abort-on-uncaught-
});

describe('when working with Worker threads', () => {
it('should work', async () => {
it('should evaluate a CommonJS worker as valid sloppy script where the CommonJS wrapper variables do not exist', async () => {

Check failure on line 411 in test/es-module/test-esm-detect-ambiguous.mjs

View workflow job for this annotation

GitHub Actions / lint-js-and-md

This line has a length of 128. Maximum allowed is 120
const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [
'--experimental-detect-module',
'--eval',
Expand Down

0 comments on commit 08c8705

Please sign in to comment.