Download packages/core/test/filesystem/ignore.test.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 418 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/core/test/filesystem/ignore.test.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/core/test/filesystem/ignore.test.ts
-
curl -L -o ignore.test.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/core/test/filesystem/ignore.test.ts
418 Bytes
| 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) | |
| }) | |