-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjapaFile.ts
44 lines (40 loc) · 1.24 KB
/
japaFile.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { expect } from '@japa/expect'
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: [expect(), assert(), runFailedTests()],
reporters: [specReporter()],
importer: (filePath: string) => import(filePath),
forceExit: true,
},
})
/**
* Setup context
*/
/*
|--------------------------------------------------------------------------
| Run tests
|--------------------------------------------------------------------------
|
| The following "run" method is required to execute all the tests.
|
*/
run()