diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-08-07 09:43:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-07 07:43:05 +0000 |
| commit | 04473c04ed59cc2a987af3405074591fbc1341a4 (patch) | |
| tree | 50d56d1990328a6d32627e74ef73514525d78fde /tests/specs/compile/workspace/subtract | |
| parent | 4fa8869f2487749a9f190cb3047f4f3e6d571f27 (diff) | |
fix(compile): support workspace members importing other members (#24909)
Diffstat (limited to 'tests/specs/compile/workspace/subtract')
| -rw-r--r-- | tests/specs/compile/workspace/subtract/deno.json | 5 | ||||
| -rw-r--r-- | tests/specs/compile/workspace/subtract/mod.test.ts | 6 | ||||
| -rw-r--r-- | tests/specs/compile/workspace/subtract/mod.ts | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/specs/compile/workspace/subtract/deno.json b/tests/specs/compile/workspace/subtract/deno.json new file mode 100644 index 000000000..d2bdfbec7 --- /dev/null +++ b/tests/specs/compile/workspace/subtract/deno.json @@ -0,0 +1,5 @@ +{ + "name": "@david/subtract", + "version": "0.0.1", + "exports": "./mod.ts" +} diff --git a/tests/specs/compile/workspace/subtract/mod.test.ts b/tests/specs/compile/workspace/subtract/mod.test.ts new file mode 100644 index 000000000..1bc00da1e --- /dev/null +++ b/tests/specs/compile/workspace/subtract/mod.test.ts @@ -0,0 +1,6 @@ +import { subtract } from "./mod.ts"; +import { assertEquals } from "@std/assert"; + +Deno.test("subtract", () => { + assertEquals(subtract(4, 2), 2); +}); diff --git a/tests/specs/compile/workspace/subtract/mod.ts b/tests/specs/compile/workspace/subtract/mod.ts new file mode 100644 index 000000000..3d8ba39af --- /dev/null +++ b/tests/specs/compile/workspace/subtract/mod.ts @@ -0,0 +1,5 @@ +import { add } from "@david/add"; + +export function subtract(a: number, b: number): number { + return add(a, -b); +} |
