diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-03 00:49:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 10:19:42 +0530 |
commit | 3e98ea4e69732d8a659ca0ca61747fe3887ab673 (patch) | |
tree | 7cf753a822c6858ebd519d7d7774234c965af801 /tests/specs/npm | |
parent | b7945a218ee193f6730b4b459e5ab28d13b1f040 (diff) |
chore(tests/specs): ability to have sub tests in file (#23667)
Allows writing named sub-tests. These are:
1. Filterable on the command line via `cargo test ...`
2. Run in parallel
3. Use a fresh temp and deno dir for each test (unlike steps)
Diffstat (limited to 'tests/specs/npm')
-rw-r--r-- | tests/specs/npm/es_module/__test__.jsonc | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/tests/specs/npm/es_module/__test__.jsonc b/tests/specs/npm/es_module/__test__.jsonc index 7fd8c95e0..d72db753f 100644 --- a/tests/specs/npm/es_module/__test__.jsonc +++ b/tests/specs/npm/es_module/__test__.jsonc @@ -1,21 +1,24 @@ { - "steps": [{ - "args": "run --allow-read --allow-env main.js", - "output": "main.out" - }, { - "cleanDenoDir": true, - "args": "test --allow-read --allow-env test.js", - "output": "test.out" - }, { - "cleanDenoDir": true, - "args": [ - "eval", - "import chalk from 'npm:chalk@5'; console.log(chalk.green('chalk esm loads'));" - ], - "output": "main.out" - }, { - "args": "bundle --quiet main.js", - "output": "bundle.out", - "exitCode": 1 - }] + "tests": { + "run": { + "args": "run --allow-read --allow-env main.js", + "output": "main.out" + }, + "test": { + "args": "test --allow-read --allow-env test.js", + "output": "test.out" + }, + "eval": { + "args": [ + "eval", + "import chalk from 'npm:chalk@5'; console.log(chalk.green('chalk esm loads'));" + ], + "output": "main.out" + }, + "bundle": { + "args": "bundle --quiet main.js", + "output": "bundle.out", + "exitCode": 1 + } + } } |