diff options
Diffstat (limited to 'tests/specs/npm/workspace_basic/b')
9 files changed, 43 insertions, 0 deletions
diff --git a/tests/specs/npm/workspace_basic/b/exports-sub-path-not-exists.out b/tests/specs/npm/workspace_basic/b/exports-sub-path-not-exists.out new file mode 100644 index 000000000..5e61cdfc3 --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/exports-sub-path-not-exists.out @@ -0,0 +1,2 @@ +error: [ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath './non-existent' is not defined by "exports" in '[WILDLINE]package.json' imported from '[WILDLINE]exports-sub-path-not-exists.ts' + at file:///[WILDLINE]exports-sub-path-not-exists.ts:1:20 diff --git a/tests/specs/npm/workspace_basic/b/exports-sub-path-not-exists.ts b/tests/specs/npm/workspace_basic/b/exports-sub-path-not-exists.ts new file mode 100644 index 000000000..716f0f97d --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/exports-sub-path-not-exists.ts @@ -0,0 +1,2 @@ +import * as a from "@denotest/a/non-existent"; +console.log(a); diff --git a/tests/specs/npm/workspace_basic/b/main.ts b/tests/specs/npm/workspace_basic/b/main.ts new file mode 100644 index 000000000..03956388c --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/main.ts @@ -0,0 +1,9 @@ +import * as a1 from "@denotest/a"; +import * as a2 from "npm:@denotest/a@1"; +import * as a3 from "npm:@denotest/a@workspace"; +import * as c from "@denotest/c"; + +a1.sayHello(); +a2.sayHello(); +a3.sayHello(); +c.sayHello(); diff --git a/tests/specs/npm/workspace_basic/b/main_byonm.out b/tests/specs/npm/workspace_basic/b/main_byonm.out new file mode 100644 index 000000000..3a311dcd7 --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/main_byonm.out @@ -0,0 +1,4 @@ +Hello 5 +Hello 5 +Hello 5 +C: Hi! diff --git a/tests/specs/npm/workspace_basic/b/main_global_cache.out b/tests/specs/npm/workspace_basic/b/main_global_cache.out new file mode 100644 index 000000000..1ca11026a --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/main_global_cache.out @@ -0,0 +1,6 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Hello 5 +Hello 5 +Hello 5 +C: Hi! diff --git a/tests/specs/npm/workspace_basic/b/main_node_modules_dir.out b/tests/specs/npm/workspace_basic/b/main_node_modules_dir.out new file mode 100644 index 000000000..82a49b9fe --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/main_node_modules_dir.out @@ -0,0 +1,7 @@ +Download http://localhost:4260/@denotest/esm-basic +Download http://localhost:4260/@denotest/esm-basic/1.0.0.tgz +Initialize @denotest/esm-basic@1.0.0 +Hello 5 +Hello 5 +Hello 5 +C: Hi! diff --git a/tests/specs/npm/workspace_basic/b/no-exports-sub-path-not-exists.out b/tests/specs/npm/workspace_basic/b/no-exports-sub-path-not-exists.out new file mode 100644 index 000000000..f98aa34cb --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/no-exports-sub-path-not-exists.out @@ -0,0 +1,3 @@ +[# not the best error, but it did resolve because there was no exports specified] +error: Module not found "file:///[WILDLINE]/c/non-existent". + at file:///[WILDLINE]/b/no-exports-sub-path-not-exists.ts:1:20 diff --git a/tests/specs/npm/workspace_basic/b/no-exports-sub-path-not-exists.ts b/tests/specs/npm/workspace_basic/b/no-exports-sub-path-not-exists.ts new file mode 100644 index 000000000..960d32870 --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/no-exports-sub-path-not-exists.ts @@ -0,0 +1,2 @@ +import * as c from "@denotest/c/non-existent"; +console.log(c); diff --git a/tests/specs/npm/workspace_basic/b/package.json b/tests/specs/npm/workspace_basic/b/package.json new file mode 100644 index 000000000..4b876d5b9 --- /dev/null +++ b/tests/specs/npm/workspace_basic/b/package.json @@ -0,0 +1,8 @@ +{ + "name": "@denotest/b", + "version": "1.0.0", + "dependencies": { + "@denotest/a": "1", + "@denotest/c": "workspace:*" + } +} |