tests/wasmContainer.jsView |
---|
66 | 66 | tape('empty', async t => { |
67 | 67 | t.plan(1) |
68 | 68 | tester = t |
69 | 69 | const expectedState = { |
70 | | - '/': Buffer.from('a2440f97e233b183f5e66fb6d60765311be7a2b7', 'hex') |
| 70 | + '/': Buffer.from('bda5092c441e8d40c32eeeb69ce0e493f9d487cb', 'hex') |
71 | 71 | } |
72 | 72 | |
73 | 73 | const tree = new RadixTree({ |
74 | 74 | db |
279 | 279 | }) |
280 | 280 | hypervisor.send(message) |
281 | 281 | }) |
282 | 282 | }) |
283 | | - |
284 | | -tape('ben', async t => { |
285 | | - |
286 | | - tester = t |
287 | | - const tree = new RadixTree({ |
288 | | - db |
289 | | - }) |
290 | | - |
291 | | - const wasm = fs.readFileSync(WASM_PATH + '.wasm') |
292 | | - const hypervisor = new Hypervisor(tree) |
293 | | - hypervisor.registerContainer(TestWasmContainer) |
294 | | - |
295 | | - const {module} = await hypervisor.createActor(TestWasmContainer.typeId, wasm) |
296 | | - |
297 | | - const funcRef = module.getFuncRef('#main') |
298 | | - funcRef.gas = 100000 |
299 | | - |
300 | | - const message = new Message({ |
301 | | - funcRef |
302 | | - }).on('done', () => { |
303 | | - t.end() |
304 | | - }) |
305 | | - hypervisor.send(message) |
306 | | -}) |