-
Notifications
You must be signed in to change notification settings - Fork 60
/
vm.js
38 lines (32 loc) · 1.3 KB
/
vm.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const Buffer = require("buffer");
const createContext = () => ({});
const createCachedData = () => new Buffer();
exports.compileFunction = () => {};
exports.createContext = createContext;
exports.isContext = () => true;
exports.runInContext = () => true;
exports.runInNewContext = () => true;
exports.runInThisContext = () => true;
exports.measureMemory = () => true;
const Script = () => {};
Script.prototype.createCachedData = createCachedData;
Script.prototype.runInContext = runInContext;
Script.prototype.runInNewContext = runInNewContext;
Script.prototype.runInThisContext = runInThisContext;
exports.Script = Script;
const Module = () => {};
Module.prototype.dependencySpecifiers = () => [];
Module.prototype.error = () => { throw new Error() };
Module.prototype.evaluate = async () => {};
Module.prototype.link = async () => {};
Module.prototype.status = "evaluated";
Module.prototype.identified = "mocked";
exports.Module = Module;
const SourceTextModule = () => {};
SourceTextModule.prototype.createCachedData = createCachedData;
exports.SourceTextModule = SourceTextModule;
const SyntheticModule = () => {};
SourceTextModule.prototype.setExport = () => {};
SourceTextModule.prototype.compileFunction = () => () => {};
SourceTextModule.prototype.createContext = createContext;
exports.SyntheticModule = SyntheticModule;