opencode/packages/core/test/filesystem/ignore.test.ts

10 lines
418 B
TypeScript

import { expect, test } from "bun:test"
import { Ignore } from "@opencode-ai/core/filesystem/ignore"
test("match nested and non-nested", () => {
expect(Ignore.match("node_modules/index.js")).toBe(true)
expect(Ignore.match("node_modules")).toBe(true)
expect(Ignore.match("node_modules/")).toBe(true)
expect(Ignore.match("node_modules/bar")).toBe(true)
expect(Ignore.match("node_modules/bar/")).toBe(true)
})