mirror of
https://github.com/remko/waforth
synced 2024-12-27 09:59:29 +01:00
11 lines
360 B
JavaScript
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");
|
|
});
|