Skip to content

Commit 84f20aa

Browse files
committed
fix for running tests under Node
1 parent a89e04f commit 84f20aa

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

deno.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rotu/structview",
3-
"version": "0.8.0",
3+
"version": "0.8.1",
44
"license": "MIT",
55
"tasks": {
66
"dev": "deno test --watch"
@@ -10,7 +10,8 @@
1010
},
1111
"imports": {
1212
"@deno/dnt": "jsr:@deno/dnt@^0.42.3",
13-
"@std/assert": "jsr:@std/assert@1"
13+
"@std/assert": "jsr:@std/assert@1",
14+
"uint8array-extras": "npm:uint8array-extras@^1.5.0"
1415
},
1516
"exports": {
1617
".": "./mod.ts",

deno.lock

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mod_test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ import {
2929
fail,
3030
} from "@std/assert"
3131

32+
// Deno supports this but Node doesn't yet.
33+
// This is so the dnt output can run in Node
34+
import { hexToUint8Array } from "uint8array-extras"
35+
3236
class vec3_t extends defineStruct({
3337
0: f32(0),
3438
1: f32(4),
@@ -330,7 +334,7 @@ Deno.test("can copy", () => {
330334
})
331335

332336
Deno.test("bigints", () => {
333-
const buf = Uint8Array.fromHex("d6ffffffffffffffffffffff0c0d0e0f10111213")
337+
const buf = hexToUint8Array("d6ffffffffffffffffffffff0c0d0e0f10111213")
334338
class S extends defineStruct({
335339
unsigned: biguintle(2, { byteLength: 12 }),
336340
signed: bigintle(2, { byteLength: 12 }),

0 commit comments

Comments
 (0)