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

[TECH] Replace Jest by VitePress #371

Open
2 tasks
Romakita opened this issue Mar 3, 2024 · 0 comments
Open
2 tasks

[TECH] Replace Jest by VitePress #371

Romakita opened this issue Mar 3, 2024 · 0 comments
Assignees

Comments

@Romakita
Copy link
Contributor

Romakita commented Mar 3, 2024

Information

Vitetest can be used to run test since the unplugin-swc is released and support TS legacy decorator.

Here is an example of vitest.config.ts required to run test correctly:

import swc from "unplugin-swc";
import {defineConfig} from "vitest/config";

export default defineConfig({
  test: {
    globals: true,
    root: "./"
  },
  plugins: [
    // This is required to build the test files with SWC
    swc.vite({
      // Explicitly set the module type to avoid inheriting this value from a `.swcrc` config file
      module: {type: "es6"}
    })
  ]
});

Note: Vitest support workspace https://vitest.dev/guide/workspace.html . It can be interesting to use it on this project to run all test.

Acceptance criteria

  • All tests run
  • Coverage are updated correctly
@Romakita Romakita self-assigned this Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

1 participant