Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Dec 12, 2024
1 parent ba0e120 commit 3160f4b
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/specs/update/external_import_map/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"tempDir": true,
"steps": [
{
"args": "i",
"output": "[WILDCARD]"
},
{
"args": "outdated",
"output": "outdated.out"
},
{
"args": "outdated --update --latest",
"output": "update.out"
},
{
"args": [
"eval",
"console.log(Deno.readTextFileSync('import_map.json').trim())"
],
"output": "import_map.json.out"
}
]
}
3 changes: 3 additions & 0 deletions tests/specs/update/external_import_map/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"importMap": "import_map.json"
}
33 changes: 33 additions & 0 deletions tests/specs/update/external_import_map/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions tests/specs/update/external_import_map/import_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"imports": {
"@denotest/add": "jsr:@denotest/add@^0.2.0",
"@denotest/subtract": "jsr:@denotest/subtract@^0.2.0",
"@denotest/breaking-change-between-versions": "npm:@denotest/[email protected]",
"@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.1.0"
}
}
8 changes: 8 additions & 0 deletions tests/specs/update/external_import_map/import_map.json.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"imports": {
"@denotest/add": "jsr:@denotest/add@^1.0.0",
"@denotest/subtract": "jsr:@denotest/subtract@^1.0.0",
"@denotest/breaking-change-between-versions": "npm:@denotest/breaking-change-between-versions@^2.0.0",
"@denotest/has-patch-versions": "npm:@denotest/has-patch-versions@^0.2.0"
}
}
1 change: 1 addition & 0 deletions tests/specs/update/external_import_map/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import { add } from "@denotest/add";
14 changes: 14 additions & 0 deletions tests/specs/update/external_import_map/outdated.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
┌────────────────────────────────────────────────┬─────────┬────────┬────────┐
│ Package │ Current │ Update │ Latest │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ jsr:@denotest/add │ 0.2.0 │ 0.2.1 │ 1.0.0 │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │
└────────────────────────────────────────────────┴─────────┴────────┴────────┘

Run deno outdated --update --latest to update to the latest available versions,
or deno outdated --help for more information.
11 changes: 11 additions & 0 deletions tests/specs/update/external_import_map/update.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[UNORDERED_START]
Download http://127.0.0.1:4250/@denotest/subtract/1.0.0/mod.ts
Download http://127.0.0.1:4250/@denotest/add/1.0.0/mod.ts
Download http://localhost:4260/@denotest/has-patch-versions/0.2.0.tgz
Download http://localhost:4260/@denotest/breaking-change-between-versions/2.0.0.tgz
[UNORDERED_END]
Updated 4 dependencies:
- jsr:@denotest/add 0.2.0 -> 1.0.0
- jsr:@denotest/subtract 0.2.0 -> 1.0.0
- npm:@denotest/breaking-change-between-versions 1.0.0 -> 2.0.0
- npm:@denotest/has-patch-versions 0.1.0 -> 0.2.0

0 comments on commit 3160f4b

Please sign in to comment.