deno.land / x / sheetjs@v0.18.3 / packages / s / test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*! s.js (C) 2019-present SheetJS -- https://sheetjs.com *//* vim: set ts=2: */
/// <reference path="src/xlsx.d.ts"/>
import { Workbook, set_XLSX, get_XLSX } from "./";import * as assert from 'assert';const XLSXLib: typeof XLSX = require("../../");set_XLSX(XLSXLib);
import 'mocha';
describe('Defined Names', () => { let wb = new Workbook();
it('should add names to blank workbook', () => { let cnt = wb.names.count; assert.equal(cnt, 0); assert.throws(() => { const newname = wb.names.getName("wtf"); }); wb.names.add("wtf", "Sheet1!A1:A3", "dafuq"); assert.doesNotThrow(() => { const newname = wb.names.getName("wtf"); }); });});
sheetjs

Version Info

Tagged at
2 years ago