Initial commit

This commit is contained in:
Igor Martyniuk
2026-06-25 15:53:49 +03:00
commit 1bb0b7e68a
1517 changed files with 218469 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
// backend/tests/bootstrap.ts
import { assert } from '@japa/assert'
import { apiClient } from '@japa/api-client'
import { pluginAdonisJS } from '@japa/plugin-adonisjs'
import { specReporter } from '@japa/spec-reporter'
import type { Config } from '@japa/runner/types'
import app from '@adonisjs/core/services/app'
import testUtils from '@adonisjs/core/services/test_utils'
/**
* Japa plugins
*/
export const plugins: Config['plugins'] = [assert(), apiClient(), pluginAdonisJS(app)]
/**
* Reporters
*/
export const reporters: Config['reporters'] = {
activated: ['spec'],
list: [
{
name: 'spec',
handler: specReporter(),
},
],
}
/**
* Global setup/teardown (for ALL suites)
*/
export const runnerHooks: Required<Pick<Config, 'setup' | 'teardown'>> = {
setup: [],
teardown: [],
}
/**
* Per-suite configuration (start HTTP server for HTTP tests)
*/
export const configureSuite: Config['configureSuite'] = (suite) => {
// adjust names to your suites if needed
if (['functional', 'e2e', 'browser'].includes(suite.name)) {
suite.setup(() => testUtils.httpServer().start())
}
}