diff --git a/bin/test.ts b/bin/test.ts index dcf7ab4..9ae79be 100644 --- a/bin/test.ts +++ b/bin/test.ts @@ -1,40 +1,12 @@ import { assert } from '@japa/assert' -import { specReporter } from '@japa/spec-reporter' import { fileSystem } from '@japa/file-system' -import { runFailedTests } from '@japa/run-failed-tests' -import { processCliArgs, configure, run } from '@japa/runner' -import { pathToFileURL } from 'node:url' +import { processCLIArgs, configure, run } from '@japa/runner' import { BASE_URL } from '../test_helpers/index.js' -/* -|-------------------------------------------------------------------------- -| 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(), fileSystem({ basePath: BASE_URL })], - reporters: [specReporter()], - importer: (filePath: string) => import(pathToFileURL(filePath).href), - }, + files: ['tests/**/*.spec.ts'], + plugins: [assert(), fileSystem({ basePath: BASE_URL })], }) -/* -|-------------------------------------------------------------------------- -| Run tests -|-------------------------------------------------------------------------- -| -| The following "run" method is required to execute all the tests. -| -*/ run() diff --git a/package.json b/package.json index aaec485..d66b605 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "release": "np --message=\"chore(release): %s\"", "version": "npm run build", "sync-labels": "github-label-sync --labels .github/labels.json adonisjs/repl", - "quick:test": "node --loader=ts-node/esm bin/test.ts", + "quick:test": "node --enable-source-maps --loader=ts-node/esm bin/test.ts", "format": "prettier --write .", "prepublishOnly": "npm run build", "index:commands": "adonis-kit index build/commands" @@ -60,11 +60,9 @@ "@adonisjs/eslint-config": "^1.1.7", "@adonisjs/prettier-config": "^1.1.7", "@adonisjs/tsconfig": "^1.1.7", - "@japa/assert": "^1.4.1", - "@japa/file-system": "^1.1.0", - "@japa/run-failed-tests": "^1.1.1", - "@japa/runner": "^2.5.1", - "@japa/spec-reporter": "^1.3.3", + "@japa/assert": "^2.0.0-1", + "@japa/file-system": "^2.0.0-1", + "@japa/runner": "^3.0.0-2", "@swc/core": "^1.3.67", "@types/node": "^20.3.3", "c8": "^8.0.0",