Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

vitest/config doesn't work with typescript #828

Closed
6 tasks done
pikax opened this issue Feb 21, 2022 · 0 comments · Fixed by #830
Closed
6 tasks done

vitest/config doesn't work with typescript #828

pikax opened this issue Feb 21, 2022 · 0 comments · Fixed by #830

Comments

@pikax
Copy link
Contributor

pikax commented Feb 21, 2022

Describe the bug

Following the new guide from #799 and https://vitest.dev/guide/#configuring-vitest

It doesn't work:
image

import { defineConfig } from 'vitest/config' // error here

export default defineConfig({
  test: {
    // ...
  },

Reproduction

pnpm create vite // vanilla

cd project
pnpm i

pnpm add vitest -D
// create vitest.config.ts

NOTE node.d.ts is still present on the provided on the root folder, but not the config.d.ts
image

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
    Memory: 33.80 GB / 63.94 GB
  Binaries:
    Node: 16.10.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.13 - C:\Program Files\nodejs\yarn.CMD
    npm: 7.24.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (98.0.1108.56)
    Internet Explorer: 11.0.22000.120

Used Package Manager

pnpm

Validations

chaii3 pushed a commit to chaii3/vitest that referenced this issue May 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant