-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bc6dfd
commit 2d67ae3
Showing
5 changed files
with
62 additions
and
152 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,10 @@ | ||
import { assert } from '@japa/assert' | ||
import { pathToFileURL } from 'node:url' | ||
import { specReporter } from '@japa/spec-reporter' | ||
import { runFailedTests } from '@japa/run-failed-tests' | ||
import { processCliArgs, configure, run } from '@japa/runner' | ||
import { processCLIArgs, configure, run } from '@japa/runner' | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Configure tests | ||
|-------------------------------------------------------------------------- | ||
| | ||
| The configure method accepts the configuration to configure the Japa | ||
| tests runner. | ||
| | ||
| The first method call "processCliArgs" process the command line arguments | ||
| and turns them into a config object. Using this method is not mandatory. | ||
| | ||
| Please consult japa.dev/runner-config for the config docs. | ||
*/ | ||
processCLIArgs(process.argv.slice(2)) | ||
configure({ | ||
...processCliArgs(process.argv.slice(2)), | ||
...{ | ||
files: ['tests/**/*.spec.ts'], | ||
plugins: [assert(), runFailedTests()], | ||
reporters: [specReporter()], | ||
importer: (filePath) => { | ||
return import(pathToFileURL(filePath).href) | ||
}, | ||
}, | ||
files: ['tests/**/*.spec.ts'], | ||
plugins: [assert()], | ||
}) | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Run tests | ||
|-------------------------------------------------------------------------- | ||
| | ||
| The following "run" method is required to execute all the tests. | ||
| | ||
*/ | ||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,7 @@ | ||
{ | ||
"extends": "@adonisjs/tsconfig/tsconfig.package.json", | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "NodeNext", | ||
"lib": ["ESNext"], | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"isolatedModules": true, | ||
"removeComments": true, | ||
"declaration": true, | ||
"rootDir": "./", | ||
"outDir": "./build", | ||
"esModuleInterop": true, | ||
"strictNullChecks": true, | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strictPropertyInitialization": true, | ||
"noImplicitAny": true, | ||
"strictBindCallApply": true, | ||
"strictFunctionTypes": true, | ||
"noImplicitThis": true, | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"types": ["@types/node"] | ||
}, | ||
"include": ["./**/*"], | ||
"exclude": ["./node_modules", "./build"], | ||
"ts-node": { | ||
"swc": true | ||
"outDir": "./build" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { register } from 'node:module' | ||
register('ts-node/esm', import.meta.url) |