UPDATE: Add raw API to nodejs bindings

This commit is contained in:
Nicolás Hatcher
2025-01-28 20:08:16 +01:00
committed by Nicolás Hatcher Andrés
parent 24fb87721f
commit 610b899f66
12 changed files with 1049 additions and 636 deletions

View File

@@ -1,11 +1,20 @@
import test from 'ava'
import { Model } from '../index.js';
import { UserModel, Model } from '../index.js';
test('sum from native', (t) => {
const model = new Model("Workbook1", "en", "UTC");
test('User Model smoke test', (t) => {
const model = new UserModel("Workbook1", "en", "UTC");
model.setUserInput(0, 1, 1, "=1+1");
t.is(model.getFormattedCellValue(0, 1, 1), '2');
});
test('Raw API smoke test', (t) => {
const model = new Model("Workbook1", "en", "UTC");
model.setUserInput(0, 1, 1, "=1+1");
model.evaluate();
t.is(model.getFormattedCellValue(0, 1, 1), '2');
});