Skip to content

Commit

Permalink
test: improve vm test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kuriyosh committed Feb 4, 2022
1 parent f069793 commit d0c3e4c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/parallel/test-vm-basic.js
Expand Up @@ -323,6 +323,14 @@ const vm = require('vm');
global
);

// test compileFunction cachedDataProduced option
const result = vm.compileFunction('console.log("Hello, World!")', [], {
produceCachedData: true,
});

assert.equal(result.cachedDataProduced, true);
assert.equal(result.cachedData.length > 0, true);

// Resetting value
Error.stackTraceLimit = oldLimit;
}

0 comments on commit d0c3e4c

Please sign in to comment.