Skip to content

Commit 253b741

Browse files
committed
fix: incorrect test/bootstrap typing
When strict mode enabled, the types for the differents values exported in bootstrap.txt template was incorrect
1 parent 36ae8d9 commit 253b741

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/tests/bootstrap.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { assert, runFailedTests, specReporter, apiClient } from '@japa/preset-ad
2020
| Feel free to remove existing plugins or add more.
2121
|
2222
*/
23-
export const plugins: Config['plugins'] = [assert(), runFailedTests(), apiClient()]
23+
export const plugins: Required<Config>['plugins'] = [assert(), runFailedTests(), apiClient()]
2424

2525
/*
2626
|--------------------------------------------------------------------------
@@ -32,7 +32,7 @@ export const plugins: Config['plugins'] = [assert(), runFailedTests(), apiClient
3232
| of tests on the terminal.
3333
|
3434
*/
35-
export const reporters: Config['reporters'] = [specReporter()]
35+
export const reporters: Required<Config>['reporters'] = [specReporter()]
3636

3737
/*
3838
|--------------------------------------------------------------------------
@@ -46,7 +46,7 @@ export const reporters: Config['reporters'] = [specReporter()]
4646
| within the runner hooks
4747
|
4848
*/
49-
export const runnerHooks: Required<Pick<Config, 'setup' | 'teardown'>> = {
49+
export const runnerHooks: Pick<Required<Config>, 'setup' | 'teardown'> = {
5050
setup: [() => TestUtils.ace().loadCommands()],
5151
teardown: [],
5252
}
@@ -62,7 +62,7 @@ export const runnerHooks: Required<Pick<Config, 'setup' | 'teardown'>> = {
6262
| You can use this method to configure suites. For example: Only start
6363
| the HTTP server when it is a functional suite.
6464
*/
65-
export const configureSuite: Config['configureSuite'] = (suite) => {
65+
export const configureSuite: Required<Config>['configureSuite'] = (suite) => {
6666
if (suite.name === 'functional') {
6767
suite.setup(() => TestUtils.httpServer().start())
6868
}

0 commit comments

Comments
 (0)