waforth/tests/index-node.js
2019-03-10 16:46:51 +01:00

11 lines
360 B
JavaScript

/* global __dirname, Buffer */
const fs = require("fs");
const path = require("path");
require("@babel/register")({
presets: ["@babel/preset-env"]
});
const loadTests = require("./tests.js").default;
const wasmModule = fs.readFileSync(path.join(__dirname, "../src/waforth.wasm"));
loadTests(wasmModule, s => {
return Buffer.from(s).toString("base64");
});