Skip to content

Commit 004ac1c

Browse files
committed
chore: upgrade japa to v3
1 parent 8225934 commit 004ac1c

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

bin/test.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { assert } from '@japa/assert'
2+
import { fileURLToPath } from 'node:url'
23
import { fileSystem } from '@japa/file-system'
3-
import { specReporter } from '@japa/spec-reporter'
4-
import { runFailedTests } from '@japa/run-failed-tests'
5-
import { fileURLToPath, pathToFileURL } from 'node:url'
6-
import { processCliArgs, configure, run } from '@japa/runner'
4+
import { processCLIArgs, configure, run } from '@japa/runner'
75

86
const TEST_TMP_DIR_PATH = fileURLToPath(new URL('../tmp', import.meta.url))
97

@@ -20,15 +18,11 @@ const TEST_TMP_DIR_PATH = fileURLToPath(new URL('../tmp', import.meta.url))
2018
|
2119
| Please consult japa.dev/runner-config for the config docs.
2220
*/
21+
processCLIArgs(process.argv.slice(2))
2322
configure({
24-
...processCliArgs(process.argv.slice(2)),
25-
...{
26-
files: ['tests/**/*.spec.ts'],
27-
plugins: [assert(), runFailedTests(), fileSystem({ basePath: TEST_TMP_DIR_PATH })],
28-
reporters: [specReporter()],
29-
timeout: 5 * 1000,
30-
importer: (filePath: string) => import(pathToFileURL(filePath).href),
31-
},
23+
files: ['tests/**/*.spec.ts'],
24+
plugins: [assert(), fileSystem({ basePath: TEST_TMP_DIR_PATH })],
25+
timeout: 5 * 1000,
3226
})
3327

3428
/*

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@
4040
"devDependencies": {
4141
"@commitlint/cli": "^17.6.6",
4242
"@commitlint/config-conventional": "^17.6.6",
43-
"@japa/assert": "^1.4.1",
44-
"@japa/file-system": "^1.1.0",
45-
"@japa/run-failed-tests": "^1.1.1",
46-
"@japa/runner": "^2.5.1",
47-
"@japa/spec-reporter": "^1.3.3",
43+
"@japa/assert": "^2.0.0-1",
44+
"@japa/file-system": "^2.0.0-1",
45+
"@japa/runner": "^3.0.0-3",
4846
"@swc/core": "^1.3.67",
4947
"@types/node": "^20.3.3",
5048
"@types/picomatch": "^2.3.0",

0 commit comments

Comments
 (0)