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 b932450
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.ok(result.cachedDataProduced);
assert.ok(result.cachedData.length > 0);

// Resetting value
Error.stackTraceLimit = oldLimit;
}

0 comments on commit b932450

Please sign in to comment.