Merge pull request #21 from QURIresearch/rename-run

Rename run
This commit is contained in:
Sam Nolan 2022-02-18 13:12:08 +11:00 committed by GitHub
commit 06eb8b6a44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2,10 +2,10 @@ var js = require("../src/js/index.js");
describe("A simple result", () => { describe("A simple result", () => {
test("mean(normal(5,2))", () => { test("mean(normal(5,2))", () => {
expect(js.runMePlease("mean(normal(5,2))")).toEqual({ tag: 'Ok', value: { hd: { NAME: 'Float', VAL: 5 }, tl: 0 } }); expect(js.run("mean(normal(5,2))")).toEqual({ tag: 'Ok', value: { hd: { NAME: 'Float', VAL: 5 }, tl: 0 } });
}); });
test("10+10", () => { test("10+10", () => {
let foo = js.runMePlease("normal(5,2)"); let foo = js.run("normal(5,2)");
console.log(foo.value.hd.VAL) console.log(foo.value.hd.VAL)
expect(1).toEqual(1); expect(1).toEqual(1);
}); });

View File

@ -1,3 +1,3 @@
const ProgramEvaluator = require('../rescript/ProgramEvaluator.gen.js'); const ProgramEvaluator = require('../rescript/ProgramEvaluator.gen.js');
exports.runMePlease = ProgramEvaluator.runAll exports.run = ProgramEvaluator.runAll