aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests.js')
-rw-r--r--tests/tests.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/tests.js b/tests/tests.js
index 02dac80..5a1b023 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -7,7 +7,7 @@ const tmp = require('tmp');
const DataView = require('buffer-dataview');
const BytecodeParser = require("../src/lundump.js");
-const lua_State = require("../src/lstate.js").lua_State;
+const lauxlib = require("../src/lauxlib.js");
const VM = require("../src/lvm.js");
const toByteCode = function (luaCode) {
@@ -34,10 +34,12 @@ const getState = function(luaCode) {
dv = bc.dataView,
bcl = bc.bclist;
+ let L = lauxlib.luaL_newstate();
+
let p = new BytecodeParser(dv);
- let cl = p.luaU_undump();
+ let cl = p.luaU_undump(L);
- return new lua_State(cl);
+ return L;
};
module.exports = {