test: Enable testing with vitest

This commit is contained in:
Glen Whitney 2024-10-25 10:01:52 -07:00
parent 06909a6a5e
commit ef545b014d
7 changed files with 820 additions and 9 deletions

16
etc/vitest.config.ts Normal file
View file

@ -0,0 +1,16 @@
import {dirname} from 'node:path'
import {defineConfig} from 'vitest/config'
const rootDir = dirname(__dirname)
export default defineConfig({
test: {
includeSource: ['build/**/*.js'],
alias: [
{
find: /^@(.*)/,
replacement: rootDir + '/build$1.js'
},
],
},
})