diff options
Diffstat (limited to 'tests/specs/run/patch/my-pkg')
| -rw-r--r-- | tests/specs/run/patch/my-pkg/deno.json | 11 | ||||
| -rw-r--r-- | tests/specs/run/patch/my-pkg/mod.test.ts | 7 | ||||
| -rw-r--r-- | tests/specs/run/patch/my-pkg/mod.ts | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/specs/run/patch/my-pkg/deno.json b/tests/specs/run/patch/my-pkg/deno.json new file mode 100644 index 000000000..0303c9974 --- /dev/null +++ b/tests/specs/run/patch/my-pkg/deno.json @@ -0,0 +1,11 @@ +{ + "name": "@scope/my-pkg", + "version": "1.0.0", + "exports": "./mod.ts", + "imports": { + "@denotest/add": "jsr:@denotest/add@1" + }, + "patch": [ + "../add" + ] +} diff --git a/tests/specs/run/patch/my-pkg/mod.test.ts b/tests/specs/run/patch/my-pkg/mod.test.ts new file mode 100644 index 000000000..1c694298c --- /dev/null +++ b/tests/specs/run/patch/my-pkg/mod.test.ts @@ -0,0 +1,7 @@ +import { add } from "./mod.ts"; + +Deno.test("add", () => { + if (add(1, 2) !== 3) { + throw new Error("fail"); + } +}); diff --git a/tests/specs/run/patch/my-pkg/mod.ts b/tests/specs/run/patch/my-pkg/mod.ts new file mode 100644 index 000000000..41389ed65 --- /dev/null +++ b/tests/specs/run/patch/my-pkg/mod.ts @@ -0,0 +1,2 @@ +export { add } from "@denotest/add"; +import "@denotest/add"; // ensure it only warns once |
