Download mods/diff/tests/classify/is-noise-file.test.ts from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/classify/is-noise-file.test.ts
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/tests/classify/is-noise-file.test.ts
-
curl -L -o is-noise-file.test.ts https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/classify/is-noise-file.test.ts
1.09 kB
| import { describe, expect, test, tier } from 'claude-code/testing' | |
| import Classify from '../../hooks/classify' | |
| tier('builtin') | |
| describe('is-noise-file', () => { | |
| test('tests, fixtures and snapshots are noise', () => { | |
| for (const path of [ | |
| 'test/a.ts', | |
| 'src/x/__tests__/y.ts', | |
| 'lib/foo.test.tsx', | |
| 'pkg/bar_test.go', | |
| 'web/fixtures/data.json', | |
| 'ui/__snapshots__/a.snap', | |
| ]) { | |
| expect(Classify.isNoiseFile(path), path).toBe(true) | |
| } | |
| }) | |
| test('lockfiles, builds, minified and generated files are noise', () => { | |
| for (const path of [ | |
| 'bun.lock', | |
| 'package-lock.json', | |
| 'dist/index.js', | |
| 'assets/app.min.js', | |
| 'types/api.d.ts', | |
| 'src/constants/prompts.generated/x.ts', | |
| 'proto/service.pb.go', | |
| ]) { | |
| expect(Classify.isNoiseFile(path), path).toBe(true) | |
| } | |
| }) | |
| test('source is not, even with test inside a longer word', () => { | |
| for (const path of ['src/contest/entry.ts', 'src/latest.ts', 'README.md']) { | |
| expect(Classify.isNoiseFile(path), path).toBe(false) | |
| } | |
| }) | |
| }) | |