File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,13 @@ import { getLocalDatabase } from '../src/utils/database.ts'
44
55describe ( 'Local database' , ( ) => {
66 let db : LocalDevelopmentDatabase
7+
78 afterAll ( async ( ) => {
89 if ( db ) {
910 await db . close ( )
1011 }
1112 } )
13+
1214 test ( 'Is Bun' , async ( ) => {
1315 expect ( process . versions . bun ) . toBeDefined ( )
1416 } )
Original file line number Diff line number Diff line change 1+ // Stub for bun:test to prevent bundling errors in Vitest
2+ export const mock = ( ) => { }
3+ export const beforeAll = ( ) => { }
4+ export const afterAll = ( ) => { }
5+ export const beforeEach = ( ) => { }
6+ export const afterEach = ( ) => { }
7+ export const describe = ( ) => { }
8+ export const test = ( ) => { }
9+ export const it = ( ) => { }
10+ export const expect = ( ) => { }
11+
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ import { resolve } from 'node:path'
22import { defineVitestConfig } from '@nuxt/test-utils/config'
33
44export default defineVitestConfig ( {
5+ resolve : {
6+ alias : {
7+ 'bun:test' : resolve ( './test/mock/bun-test-stub.ts' ) ,
8+ } ,
9+ } ,
510 test : {
611 environment : 'nuxt' ,
712 alias : {
You can’t perform that action at this time.
0 commit comments