Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: improve vm test coverage
  • Loading branch information
kuriyosh committed Feb 4, 2022
commit b932450112d51077473d58fca2f217e39d789318
8 changes: 8 additions & 0 deletions test/parallel/test-vm-basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ const vm = require('vm');
global
);

// Test compileFunction cachedDataProduced option
Comment thread
kuriyosh marked this conversation as resolved.
Outdated
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;
}