Skip to content

Commit 6644cee

Browse files
authored
fix(test): include aria-role.d.ts in @voidzero-dev/vite-plus-test package (#909)
resolve #908
1 parent caf61af commit 6644cee

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/test/build.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,11 @@ async function copyVitestPackages() {
611611
console.log(` -> ${copied} files`);
612612

613613
// Copy root type definition files if they exist
614-
// These include context.d.ts (browser providers), matchers.d.ts (expect.element), jest-dom.d.ts (matchers)
615-
const rootDtsFiles = ['context.d.ts', 'matchers.d.ts', 'jest-dom.d.ts'];
614+
// These include context.d.ts (browser providers), matchers.d.ts (expect.element),
615+
// jest-dom.d.ts (matchers), aria-role.d.ts (ARIARole type used by context.d.ts)
616+
// TODO: consider dynamically scanning root .d.ts files instead of hardcoding,
617+
// since upstream @vitest/browser may add new .d.ts files in future versions.
618+
const rootDtsFiles = ['context.d.ts', 'matchers.d.ts', 'jest-dom.d.ts', 'aria-role.d.ts'];
616619
for (const dtsFile of rootDtsFiles) {
617620
const rootDts = resolve(projectDir, `node_modules/${pkg}/${dtsFile}`);
618621
try {

0 commit comments

Comments
 (0)