From 7584d2d7a7110aef0331ebfa178b2295842c59fa Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Sat, 10 Feb 2024 18:19:14 -0700 Subject: refactor: project maintenance - work in progress --- tests/bootstrap.ts | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'tests/bootstrap.ts') diff --git a/tests/bootstrap.ts b/tests/bootstrap.ts index efd1d1f..1c6bea1 100644 --- a/tests/bootstrap.ts +++ b/tests/bootstrap.ts @@ -5,15 +5,10 @@ * file. */ -import type { Config } from '@japa/runner'; -import TestUtils from '@ioc:Adonis/Core/TestUtils'; -import { - assert, - runFailedTests, - specReporter, - apiClient, -} from '@japa/preset-adonis'; -import { fakeCsrfField } from './utils'; +import type { Config } from '@japa/runner' +import TestUtils from '@ioc:Adonis/Core/TestUtils' +import { assert, runFailedTests, specReporter, apiClient } from '@japa/preset-adonis' +import { fakeCsrfField } from './utils.js' /* |-------------------------------------------------------------------------- @@ -26,11 +21,7 @@ import { fakeCsrfField } from './utils'; | Feel free to remove existing plugins or add more. | */ -export const plugins: Config['plugins'] = [ - assert(), - runFailedTests(), - apiClient(), -]; +export const plugins: Config['plugins'] = [assert(), runFailedTests(), apiClient()] /* |-------------------------------------------------------------------------- @@ -42,7 +33,7 @@ export const plugins: Config['plugins'] = [ | of tests on the terminal. | */ -export const reporters: Config['reporters'] = [specReporter()]; +export const reporters: Config['reporters'] = [specReporter()] /* |-------------------------------------------------------------------------- @@ -63,7 +54,7 @@ export const runnerHooks: Required> = { () => fakeCsrfField(), ], teardown: [], -}; +} /* |-------------------------------------------------------------------------- @@ -76,8 +67,8 @@ export const runnerHooks: Required> = { | You can use this method to configure suites. For example: Only start | the HTTP server when it is a functional suite. */ -export const configureSuite: Config['configureSuite'] = suite => { +export const configureSuite: Config['configureSuite'] = (suite) => { if (suite.name === 'functional') { - suite.setup(() => TestUtils.httpServer().start()); + suite.setup(() => TestUtils.httpServer().start()) } -}; +} -- cgit v1.2.3-54-g00ecf