mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
test: improve vm test coverage
PR-URL: https://github.com/nodejs/node/pull/41847 Refs: https://coverage.nodejs.org/coverage-cd5689eed3be54a5/lib/vm.js.html#L364 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
This commit is contained in:
1 parent
5c9ea80fa7
commit
82f6b0c25b
1 file changed
+8
@@ -323,6 +323,14 @@ const vm = require('vm');
|
||||
global
|
||||
);
|
||||
|
||||
// Test compileFunction produceCachedData 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;
|
||||
}
|
||||
Reference in new issue
Block a user