From e1c47572a6235fd8fd20af888ac3a11c7ae1369d Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Sat, 10 Feb 2024 18:37:40 -0700 Subject: updates --- tests/bootstrap.ts | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'tests/bootstrap.ts') diff --git a/tests/bootstrap.ts b/tests/bootstrap.ts index 1c6bea1..521f718 100644 --- a/tests/bootstrap.ts +++ b/tests/bootstrap.ts @@ -5,10 +5,15 @@ * 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.js' +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'; /* |-------------------------------------------------------------------------- @@ -21,7 +26,11 @@ import { fakeCsrfField } from './utils.js' | 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(), +]; /* |-------------------------------------------------------------------------- @@ -33,7 +42,7 @@ export const plugins: Config['plugins'] = [assert(), runFailedTests(), apiClient | of tests on the terminal. | */ -export const reporters: Config['reporters'] = [specReporter()] +export const reporters: Config['reporters'] = [specReporter()]; /* |-------------------------------------------------------------------------- @@ -54,7 +63,7 @@ export const runnerHooks: Required> = { () => fakeCsrfField(), ], teardown: [], -} +}; /* |-------------------------------------------------------------------------- @@ -67,8 +76,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