aboutsummaryrefslogtreecommitdiff
path: root/vitest.config.js
blob: e0a777d37542da3d6f88b0f03a969b80f46577b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { configDefaults, defineConfig } from "vitest/config";
import { basename, dirname, join, resolve } from 'node:path';

export default defineConfig({
  test: {
    alias: {
      '@root': resolve(__dirname)
    },
    benchmark: {
      include: ["**/test/**/*.bench.js"],
      exclude: [...configDefaults.exclude, "**/build/**/*"],
    },
    include: ["**/test/**/*.test.js"],
    exclude: [...configDefaults.exclude, "**/build/**/*"],
    resolveSnapshotPath: (testPath, snapExtension) =>
      join(join(dirname(testPath), '../', 'vitest_snapshots'), `${basename(testPath)}${snapExtension}`)
  },
});