We are using jest and ts-node before to test lunoxjs packages. But it very buggy, since jest esm still experimental. Vitest will solve this problem. This is vitest config, deps.inline is important here so we can directly test the typescript file.
// vitest.config.ts
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["**/*.test.ts"],
deps: {
inline: ["@lunoxjs/core", "@lunoxjs/filesystem"], // add more here
},
reporters: "verbose",
},
});
We are using jest and ts-node before to test
lunoxjs
packages. But it very buggy, since jest esm still experimental. Vitest will solve this problem. This is vitest config, deps.inline is important here so we can directly test the typescript file.