Skip to content

Commit f82fac4

Browse files
committed
test: add deno test
1 parent 0782c90 commit f82fac4

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"test:cover": "npm run cover:clean && npm-run-all 'test:cover:*' && npm run cover:report",
2323
"test:cover:purejs": "npx nyc --no-clean npm run test:purejs",
2424
"test:cover:te": "npx nyc --no-clean npm run test:te",
25+
"test:deno": "deno test test/deno_test.ts",
2526
"cover:clean": "rimraf .nyc_output coverage/",
2627
"cover:report": "npx nyc report --reporter=text-summary --reporter=html --reporter=json",
2728
"test:browser": "karma start --single-run",

test/deno_test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env deno run
2+
3+
/* eslint-disable */
4+
import {
5+
assertEquals,
6+
} from "https://deno.land/std/testing/asserts.ts";
7+
import * as msgpack from "../dist.es5+esm/index.mjs";
8+
9+
Deno.test("Hello, world!", () => {
10+
const encoded = msgpack.encode("Hello, world!");
11+
const decoded = msgpack.decode(encoded);
12+
assertEquals(decoded, "Hello, world!");
13+
});

0 commit comments

Comments
 (0)