Files
heroui-vue/vitest.config.ts
T
maoyingjie 2e4b376537 fix: complete submenu panel ARIA, focus and event passthrough
- Submenu panel name priority is explicit aria-label > menu content channel >
  this instance's trigger; an explicit label drops the id reference so it cannot
  be shadowed.
- openAutoFocus and animationend chain with the caller's handlers like keydown
  and interact-outside, so caller callbacks run and can cancel.
- The panel loop falls back to the menu-level shouldFocusWrap and is always
  passed as a boolean: an undefined -> true update is dropped by the base prop
  chain, so the menu policy never applied.
- Add a jsdom CSSOM polyfill for CSS.escape via vitest setupFiles; the
  animationend test no longer raises an unhandled error.
2026-10-25 00:01:24 +08:00

32 lines
901 B
TypeScript

import { defineConfig } from "vitest/config";
import { docsDataPlugin } from "./apps/docs/.vitepress/docs-data";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "node:url";
export default defineConfig({
plugins: [
vue(),
docsDataPlugin(fileURLToPath(new URL("./apps/docs", import.meta.url))),
],
resolve: {
alias: {
vitepress: fileURLToPath(
new URL(
"./apps/docs/node_modules/vitepress/dist/client/index.js",
import.meta.url,
),
),
"@heroui-vue/components": fileURLToPath(
new URL("./packages/vue/src/index.ts", import.meta.url),
),
"@heroui-vue/styles": fileURLToPath(
new URL("./packages/styles/src/index.ts", import.meta.url),
),
},
},
test: {
environment: "jsdom",
include: ["tests/**/*.test.ts"],
setupFiles: ["tests/setup/cssom.ts"],
},
});