Files
oxc/apps/oxfmt/test/ignore_patterns.test.ts
T
BoshenandYuji Sugiura 523a30a016 style(all): apply oxfmt default options (#16091)
Embrace the defaults!

---------

Co-authored-by: Yuji Sugiura <y.sugiura.0316@gmail.com>
2025-11-25 15:56:24 +09:00

21 lines
683 B
TypeScript

import { describe, expect, it } from "vitest";
import { join } from "node:path";
import { runAndSnapshot } from "./utils";
const fixturesDir = join(__dirname, "fixtures");
describe("ignore_patterns", () => {
it("should handle ignore files correctly", async () => {
const cwd = join(fixturesDir, "ignore_patterns");
const testCases = [
["--check"],
["--check", "--ignore-path", "gitignore.txt"],
["--check", "--ignore-path", "gitignore.txt", "--ignore-path", ".prettierignore"],
["--check", "--ignore-path", "nonexistent.ignore"],
];
const snapshot = await runAndSnapshot(cwd, testCases);
expect(snapshot).toMatchSnapshot();
});
});