Skip to content
Discussion options

You must be logged in to vote

I got it working with vitest:

create another file bin/test.vite.ts:

/*
|--------------------------------------------------------------------------
| Test runner entrypoint for usage with vitest
|--------------------------------------------------------------------------
|
*/

process.env.NODE_ENV = 'test';

import 'reflect-metadata';
import { Ignitor } from '@adonisjs/core';

/**
 * URL to the application root. AdonisJS need it to resolve
 * paths to file and directories for scaffolding commands
 */
const APP_ROOT = new URL('../', import.meta.url);

/**
 * The importer is used to import files in context of the
 * application.
 */
const IMPORTER = (filePath: string) => {
    if (filePath.st…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@nidomiro
Comment options

@thetutlage
Comment options

@nidomiro
Comment options

Comment options

You must be logged in to vote
1 reply
@thetutlage
Comment options

Answer selected by nidomiro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Japa
Labels
None yet
2 participants