mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
949d7a9302
## Summary - update workspace test dependencies to Vitest 5.0.0 - pin Vitest and related tooling to Vite 8.2.2 - migrate removed sequential and benchmark APIs - update the pnpm lockfile
24 lines
809 B
TypeScript
24 lines
809 B
TypeScript
import { join } from "node:path";
|
|
import { describe, it } from "vitest";
|
|
import { getFixtures, runFixture } from "./utils";
|
|
|
|
// oxlint-disable valid-title
|
|
describe("oxfmt CLI", () => {
|
|
const fixtures = getFixtures();
|
|
|
|
for (const fixture of fixtures) {
|
|
// Concurrent across fixtures, sequential within (file writes may conflict)
|
|
describe.concurrent(fixture.name, () => {
|
|
for (let i = 0; i < fixture.testCases.length; i++) {
|
|
const testCase = fixture.testCases[i];
|
|
|
|
it(`${fixture.name}/${i}`, { concurrent: false }, async ({ expect }) => {
|
|
const snapshotPath = join(fixture.dirPath, `${i}.snap.md`);
|
|
const snapshot = await runFixture(fixture, testCase);
|
|
await expect(snapshot).toMatchFileSnapshot(snapshotPath);
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|