Skip to content

Commit c40bda8

Browse files
committed
Update testing template
1 parent 0ee4465 commit c40bda8

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

test/_template/deno.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"imports": {
3-
"assert": "https://deno.land/std@0.220.0/assert/mod.ts",
4-
"~/": "http://localhost:8080/"
3+
"esm.sh/": "http://localhost:8080/"
54
}
65
}

test/_template/test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// related issue: https://github.com/esm-dev/esm.sh/issues/[ISSUE_NUMBER]
1+
import { assert, assertEquals, assertStringIncludes } from "jsr:@std/assert";
22

33
// change the import path to the module you want to test
4-
import * as mod from "~/PKG[@SEMVER][/PATH]";
5-
import { assert, assertEquals, assertStringIncludes } from "assert";
4+
import * as mod from "esm.sh/PKG[@SEMVER][/PATH]";
65

7-
// change the test name and the test assertions
8-
Deno.test("TEST NAME", async () => {
6+
// related issue: https://github.com/esm-dev/esm.sh/issues/ISSUE_NUMBER
7+
Deno.test("issue #ISSUE_NUMBER", async () => {
98
assert("foo" in mod);
109
assertEquals(typeof mod.foo, "function");
1110
assertStringIncludes(mod.foo(), "bar");

0 commit comments

Comments
 (0)