shift-interpreter
Version:
Shift-interpreter is an experimental JavaScript meta-interpreter useful for reverse engineering and analysis. One notable difference from other projects is that shift-interpreter retains state over an entire script but can be fed expressions and statement
24 lines • 878 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("../util");
describe('host', () => {
describe('ffi', () => {
it('should have access to simple values in the context', () => {
util_1.assertResult(util_1.compare('let b = a; b;', { a: '' }));
});
it('should have access to complex values in the context', () => {
class A {
constructor() {
this.prop = 222;
}
}
util_1.assertResult(util_1.compare('let b = new A(); b.prop;', { A }));
});
});
describe('literal regexes', () => {
// it('should declare and init variables and be able to retrieve the value', () => {
// assertResult(compare('let a = 2; a;'));
// });
});
});
//# sourceMappingURL=host.test.js.map