Skip to content

Commit

Permalink
refactor: migrate to new japa (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 authored Feb 27, 2022
1 parent 64d47e4 commit 9d942d8
Show file tree
Hide file tree
Showing 12 changed files with 628 additions and 12,229 deletions.
7 changes: 7 additions & 0 deletions .bin/japaTypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Assert } from '@japa/assert'

declare module '@japa/runner' {
interface TestContext {
assert: Assert
}
}
37 changes: 37 additions & 0 deletions .bin/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { assert } from '@japa/assert'
import { specReporter } from '@japa/spec-reporter'
import { runFailedTests } from '@japa/run-failed-tests'
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.
*/
configure({
...processCliArgs(process.argv.slice(2)),
...{
files: ['test/**/*.spec.ts'],
plugins: [assert(), runFailedTests()],
reporters: [specReporter()],
importer: (filePath: string) => import(filePath),
},
})

/*
|--------------------------------------------------------------------------
| Run tests
|--------------------------------------------------------------------------
|
| The following "run" method is required to execute all the tests.
|
*/
run()
7 changes: 0 additions & 7 deletions japaFile.js

This file was deleted.

Loading

0 comments on commit 9d942d8

Please sign in to comment.