diff options
Diffstat (limited to 'tests')
15 files changed, 106 insertions, 0 deletions
diff --git a/tests/registry/npm/@denotest/add/0.5.0/index.d.ts b/tests/registry/npm/@denotest/add/0.5.0/index.d.ts new file mode 100644 index 000000000..0e1188e04 --- /dev/null +++ b/tests/registry/npm/@denotest/add/0.5.0/index.d.ts @@ -0,0 +1 @@ +export function sum(a: number, b: number): number; diff --git a/tests/registry/npm/@denotest/add/0.5.0/index.js b/tests/registry/npm/@denotest/add/0.5.0/index.js new file mode 100644 index 000000000..e112dddf7 --- /dev/null +++ b/tests/registry/npm/@denotest/add/0.5.0/index.js @@ -0,0 +1 @@ +module.exports.sum = (a, b) => a + b;
\ No newline at end of file diff --git a/tests/registry/npm/@denotest/add/0.5.0/package.json b/tests/registry/npm/@denotest/add/0.5.0/package.json new file mode 100644 index 000000000..32573ca91 --- /dev/null +++ b/tests/registry/npm/@denotest/add/0.5.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@denotest/add", + "version": "0.5.0" +} diff --git a/tests/specs/npm/workspace_conflicting_dep/__test__.jsonc b/tests/specs/npm/workspace_conflicting_dep/__test__.jsonc new file mode 100644 index 000000000..82d59906e --- /dev/null +++ b/tests/specs/npm/workspace_conflicting_dep/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "tests": { + "conflicting_deps": { + "envs": { + "DENO_FUTURE": "1" + }, + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "run ./a/index.js", + "output": "1 + 2 = 3\n" + }, + { + "args": "run ./b/index.js", + "output": "1 + 2 = 3\n" + } + ] + } + } +} diff --git a/tests/specs/npm/workspace_conflicting_dep/a/index.js b/tests/specs/npm/workspace_conflicting_dep/a/index.js new file mode 100644 index 000000000..2fb3069d8 --- /dev/null +++ b/tests/specs/npm/workspace_conflicting_dep/a/index.js @@ -0,0 +1,3 @@ +import { sum } from "@denotest/add"; + +console.log(`1 + 2 = ${sum(1, 2)}`); diff --git a/tests/specs/npm/workspace_conflicting_dep/a/package.json b/tests/specs/npm/workspace_conflicting_dep/a/package.json new file mode 100644 index 000000000..48a6b4b5b --- /dev/null +++ b/tests/specs/npm/workspace_conflicting_dep/a/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/a", + "version": "1.0.0", + "dependencies": { + "@denotest/add": "0.5.0" + } +} diff --git a/tests/specs/npm/workspace_conflicting_dep/b/index.js b/tests/specs/npm/workspace_conflicting_dep/b/index.js new file mode 100644 index 000000000..5ef8d200f --- /dev/null +++ b/tests/specs/npm/workspace_conflicting_dep/b/index.js @@ -0,0 +1,3 @@ +import { add } from "@denotest/add"; + +console.log(`1 + 2 = ${add(1, 2)}`); diff --git a/tests/specs/npm/workspace_conflicting_dep/b/package.json b/tests/specs/npm/workspace_conflicting_dep/b/package.json new file mode 100644 index 000000000..60b7afe67 --- /dev/null +++ b/tests/specs/npm/workspace_conflicting_dep/b/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/b", + "version": "1.0.0", + "dependencies": { + "@denotest/add": "1.0.0" + } +} diff --git a/tests/specs/npm/workspace_conflicting_dep/package.json b/tests/specs/npm/workspace_conflicting_dep/package.json new file mode 100644 index 000000000..1a4c42ca3 --- /dev/null +++ b/tests/specs/npm/workspace_conflicting_dep/package.json @@ -0,0 +1,6 @@ +{ + "workspaces": [ + "./a", + "./b" + ] +} diff --git a/tests/specs/npm/workspace_dep_aliases/__test__.jsonc b/tests/specs/npm/workspace_dep_aliases/__test__.jsonc new file mode 100644 index 000000000..82d59906e --- /dev/null +++ b/tests/specs/npm/workspace_dep_aliases/__test__.jsonc @@ -0,0 +1,24 @@ +{ + "tempDir": true, + "tests": { + "conflicting_deps": { + "envs": { + "DENO_FUTURE": "1" + }, + "steps": [ + { + "args": "install", + "output": "[WILDCARD]" + }, + { + "args": "run ./a/index.js", + "output": "1 + 2 = 3\n" + }, + { + "args": "run ./b/index.js", + "output": "1 + 2 = 3\n" + } + ] + } + } +} diff --git a/tests/specs/npm/workspace_dep_aliases/a/index.js b/tests/specs/npm/workspace_dep_aliases/a/index.js new file mode 100644 index 000000000..435470660 --- /dev/null +++ b/tests/specs/npm/workspace_dep_aliases/a/index.js @@ -0,0 +1,3 @@ +import { sum } from "sumPkg"; + +console.log(`1 + 2 = ${sum(1, 2)}`); diff --git a/tests/specs/npm/workspace_dep_aliases/a/package.json b/tests/specs/npm/workspace_dep_aliases/a/package.json new file mode 100644 index 000000000..a8c6a04f4 --- /dev/null +++ b/tests/specs/npm/workspace_dep_aliases/a/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/a", + "version": "1.0.0", + "dependencies": { + "sumPkg": "npm:@denotest/add@0.5.0" + } +} diff --git a/tests/specs/npm/workspace_dep_aliases/b/index.js b/tests/specs/npm/workspace_dep_aliases/b/index.js new file mode 100644 index 000000000..5645c0876 --- /dev/null +++ b/tests/specs/npm/workspace_dep_aliases/b/index.js @@ -0,0 +1,3 @@ +import { add } from "addPkg"; + +console.log(`1 + 2 = ${add(1, 2)}`); diff --git a/tests/specs/npm/workspace_dep_aliases/b/package.json b/tests/specs/npm/workspace_dep_aliases/b/package.json new file mode 100644 index 000000000..9abb40985 --- /dev/null +++ b/tests/specs/npm/workspace_dep_aliases/b/package.json @@ -0,0 +1,7 @@ +{ + "name": "@denotest/b", + "version": "1.0.0", + "dependencies": { + "addPkg": "npm:@denotest/add@1.0.0" + } +} diff --git a/tests/specs/npm/workspace_dep_aliases/package.json b/tests/specs/npm/workspace_dep_aliases/package.json new file mode 100644 index 000000000..1a4c42ca3 --- /dev/null +++ b/tests/specs/npm/workspace_dep_aliases/package.json @@ -0,0 +1,6 @@ +{ + "workspaces": [ + "./a", + "./b" + ] +} |