Skip to content

Commit

Permalink
Merge pull request #252 from msgpack/deno_test
Browse files Browse the repository at this point in the history
rewrite deno_test.ts with node:assert and node:test
  • Loading branch information
gfx authored Feb 1, 2025
2 parents ec39a51 + 6910d5a commit 8418f3b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,17 @@ jobs:
- run: npm install -g npm
- run: npm ci
- run: npm run test:browser -- --browsers ${{ matrix.browser }}


deno:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: "v2.x"
- run: npm ci
- run: deno test test/deno_test.ts

7 changes: 4 additions & 3 deletions test/deno_test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env deno test

/* eslint-disable */
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { deepStrictEqual } from "node:assert";
import { test } from "node:test";
import * as msgpack from "../mod.ts";

Deno.test("Hello, world!", () => {
test("Hello, world!", () => {
const encoded = msgpack.encode("Hello, world!");
const decoded = msgpack.decode(encoded);
assertEquals(decoded, "Hello, world!");
deepStrictEqual(decoded, "Hello, world!");
});

0 comments on commit 8418f3b

Please sign in to comment.