import { resolve } from "node:path"
import { defineConfig } from "vitest/config"

const EDITOR_ROOT = resolve(__dirname, "../../packages/editor")

export default defineConfig({
  test: {
    include: ["src/**/*.test.ts"],
  },
  resolve: {
    alias: [
      { find: /^@\//, replacement: `${EDITOR_ROOT}/src/` },
      { find: /^~\//, replacement: `${__dirname}/src/` },
      { find: "@enesis/editor", replacement: `${EDITOR_ROOT}/src/index.ts` },
    ],
  },
})
