diff options
author | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2024-02-10 18:19:14 -0700 |
---|---|---|
committer | MCMXC <16797721+mcmxcdev@users.noreply.github.com> | 2024-02-10 18:19:14 -0700 |
commit | 0300c85c15088e3ff2756b344a0adbd3ca235fd3 (patch) | |
tree | 7828ae930c77ff18139076832ead32d03c6385e7 /test.ts | |
parent | Update submodules [skip ci] (diff) | |
download | ferdium-server-0300c85c15088e3ff2756b344a0adbd3ca235fd3.tar.gz ferdium-server-0300c85c15088e3ff2756b344a0adbd3ca235fd3.tar.zst ferdium-server-0300c85c15088e3ff2756b344a0adbd3ca235fd3.zip |
refactor: project maintenance
- work in progress
Diffstat (limited to 'test.ts')
-rw-r--r-- | test.ts | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/test.ts b/test.ts deleted file mode 100644 index 65f1348..0000000 --- a/test.ts +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | |-------------------------------------------------------------------------- | ||
3 | | Tests | ||
4 | |-------------------------------------------------------------------------- | ||
5 | | | ||
6 | | The contents in this file boots the AdonisJS application and configures | ||
7 | | the Japa tests runner. | ||
8 | | | ||
9 | | For the most part you will never edit this file. The configuration | ||
10 | | for the tests can be controlled via ".adonisrc.json" and | ||
11 | | "tests/bootstrap.ts" files. | ||
12 | | | ||
13 | */ | ||
14 | |||
15 | import 'reflect-metadata'; | ||
16 | import sourceMapSupport from 'source-map-support'; | ||
17 | import { Ignitor } from '@adonisjs/core/build/standalone'; | ||
18 | import { | ||
19 | configure, | ||
20 | processCliArgs, | ||
21 | run, | ||
22 | RunnerHooksHandler, | ||
23 | } from '@japa/runner'; | ||
24 | |||
25 | process.env.NODE_ENV = 'test'; | ||
26 | |||
27 | sourceMapSupport.install({ handleUncaughtExceptions: false }); | ||
28 | |||
29 | const kernel = new Ignitor(__dirname).kernel('test'); | ||
30 | |||
31 | kernel | ||
32 | .boot() | ||
33 | .then(() => import('./tests/bootstrap')) | ||
34 | .then(({ runnerHooks, ...config }) => { | ||
35 | const app: RunnerHooksHandler[] = [() => kernel.start()]; | ||
36 | |||
37 | configure({ | ||
38 | ...kernel.application.rcFile.tests, | ||
39 | ...processCliArgs(process.argv.slice(2)), | ||
40 | ...config, | ||
41 | |||
42 | importer: filePath => import(filePath), | ||
43 | setup: [...app, ...runnerHooks.setup], | ||
44 | teardown: runnerHooks.teardown, | ||
45 | cwd: kernel.application.appRoot, | ||
46 | }); | ||
47 | |||
48 | run(); | ||
49 | }); | ||