Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: fix missing chai types #7149

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/vitest/config.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// ensure `@vitest/expect` provides `chai` types
import type {} from '@vitest/expect'
Comment on lines +1 to +2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially tried adding this in

import * as chai from 'chai'
but it looks like dts emit drops @vitest/expect import.

export * from './dist/config.js'
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions test/dts-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@vitest/test-dts-config",
"type": "module",
"private": true,
"scripts": {
"test": "tsc -b"
},
"devDependencies": {
"vitest": "workspace:*"
}
}
11 changes: 11 additions & 0 deletions test/dts-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": [],
"strict": true,
"noEmit": true
},
"include": ["vite.config.ts"]
}
3 changes: 3 additions & 0 deletions test/dts-config/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineConfig } from 'vitest/config'

export default defineConfig({})
Loading