Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 722 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 722 Bytes

projen vitest

Vitest component for projen Node.js projects.

example usage

  • in .projenrc.ts import Vitest component and create new instance of it:
import { awscdk, javascript } from "projen";
import { Vitest } from "@nikovirtala/projen-vitest";

const project = new awscdk.AwsCdkTypeScriptApp({
    defaultReleaseBranch: "main",
    devDeps: ["@nikovirtala/projen-vitest"],
    jest: false,
    name: "vitest-example",
    projenrcTs: true,
});

new Vitest(project);

project.synth();
  • in *.test.ts import necessary modules from vitest:
import { describe, expect, test } from "vitest";
  • run tests with pj test