-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate to new japa (#111)
- Loading branch information
1 parent
64d47e4
commit 9d942d8
Showing
12 changed files
with
628 additions
and
12,229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Assert } from '@japa/assert' | ||
|
||
declare module '@japa/runner' { | ||
interface TestContext { | ||
assert: Assert | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { assert } from '@japa/assert' | ||
import { specReporter } from '@japa/spec-reporter' | ||
import { runFailedTests } from '@japa/run-failed-tests' | ||
import { processCliArgs, configure, run } from '@japa/runner' | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Configure tests | ||
|-------------------------------------------------------------------------- | ||
| | ||
| The configure method accepts the configuration to configure the Japa | ||
| tests runner. | ||
| | ||
| The first method call "processCliArgs" process the command line arguments | ||
| and turns them into a config object. Using this method is not mandatory. | ||
| | ||
| Please consult japa.dev/runner-config for the config docs. | ||
*/ | ||
configure({ | ||
...processCliArgs(process.argv.slice(2)), | ||
...{ | ||
files: ['test/**/*.spec.ts'], | ||
plugins: [assert(), runFailedTests()], | ||
reporters: [specReporter()], | ||
importer: (filePath: string) => import(filePath), | ||
}, | ||
}) | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Run tests | ||
|-------------------------------------------------------------------------- | ||
| | ||
| The following "run" method is required to execute all the tests. | ||
| | ||
*/ | ||
run() |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.