UPDATE: Adds web app (#79)

Things missing:

* Browse mode
* Front end tests
* Storybook
This commit is contained in:
Nicolás Hatcher Andrés
2024-08-18 11:44:16 +02:00
committed by GitHub
parent 083548608e
commit dc23a7f29c
89 changed files with 11245 additions and 364 deletions

View File

@@ -0,0 +1,13 @@
import { readFile } from "node:fs/promises";
import { Model, initSync } from "@ironcalc/wasm";
import { expect, test } from "vitest";
// This is a simple test that showcases how to load the wasm module in the tests
test("simple calculation", async () => {
const buffer = await readFile("node_modules/@ironcalc/wasm/wasm_bg.wasm");
initSync(buffer);
const model = new Model("en", "UTC");
model.setUserInput(0, 1, 1, "=21*2");
expect(model.getFormattedCellValue(0, 1, 1)).toBe("42");
});

View File

@@ -0,0 +1,7 @@
import { expect, test } from "vitest";
import { isNavigationKey } from "../util";
test("checks arrow left is a navigation key", () => {
expect(isNavigationKey("ArrowLeft")).toBe(true);
expect(isNavigationKey("Arrow")).toBe(false);
});