Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9723a97
Add JSON Schema validation tests for oxlintrc
Copilot Dec 14, 2025
6f78aba
Remove accidentally committed rlib file
Copilot Dec 14, 2025
627094c
Update .gitignore to exclude Rust build artifacts
Copilot Dec 14, 2025
67483fa
Format schema validation test file
Copilot Dec 14, 2025
8471c37
Remove unused unknown_field.json test fixture
Copilot Dec 14, 2025
118bcb5
Address PR feedback and fix clippy warnings
Copilot Dec 14, 2025
34a25fe
Add a few more test files to the schema validation tests.
connorshea Dec 14, 2025
e0fb06e
Ensure all categories are included in the valid categories test file.
connorshea Dec 14, 2025
4ad294d
Simplify the schema loading by grabbing the schema from the repo.
connorshea Dec 14, 2025
b8c5b5d
[autofix.ci] apply automated fixes
autofix-ci[bot] Dec 14, 2025
e06985e
Add a few more complex configs to the fixtures.
connorshea Dec 14, 2025
4ff6a10
Add snapshots for the schema validation test results.
connorshea Dec 14, 2025
6a89a90
Remove assertion line.
connorshea Dec 14, 2025
02e5b3e
Add the config contents being tested to each snap.
connorshea Dec 14, 2025
0882c93
Resolve lint violation.
connorshea Dec 14, 2025
2744419
Generate the list of fixtures to run on by pulling files from the repo.
connorshea Dec 14, 2025
a2eae81
Fix lint.
connorshea Dec 14, 2025
ba0d6fb
Add another test file.
connorshea Dec 14, 2025
56adde6
Ensure that no unknown fields are allowed in OxlintOverride struct.
connorshea Dec 14, 2025
7d9bd2e
Revert addition of *.rlib to .gitignore
Copilot Dec 15, 2025
5c2de9c
[autofix.ci] apply automated fixes
autofix-ci[bot] Dec 18, 2025
c2534ab
Update AGENTS.md with a few more details.
connorshea Dec 21, 2025
8229366
Remove extra line.
connorshea Dec 21, 2025
d2158cb
Add a few more schema tests, for the react version setting.
connorshea Dec 21, 2025
decfb4e
[autofix.ci] apply automated fixes
autofix-ci[bot] Dec 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,16 @@ Oxc uses multiple testing approaches tailored to each crate:

- **Unit/Integration tests**: Standard Rust tests in `tests/` directories
- **Conformance tests**: Against external suites (Test262, Babel, TypeScript, Prettier)
- **Snapshot tests**: Track failures and expected outputs using `insta`
- **Snapshot tests**: Track failures and expected outputs using `cargo insta`

### Quick Test Commands

```bash
just test # Run all Rust tests
just conformance # Run all conformance tests (alias: cargo coverage)
cargo test -p <crate_name> # Test specific crate
cargo insta test # Run snapshot tests
cargo insta review # Review/update snapshots after running test

# Conformance for specific tools
cargo coverage -- parser # Parser conformance
Expand Down Expand Up @@ -181,6 +183,8 @@ fn test() {
}
```

- **Fixer**: Use `expect_fix(fix)` method after `test_and_snapshot()` for auto-fix tests in rules.

#### oxc_formatter

- **Prettier conformance** only (no unit tests)
Expand Down Expand Up @@ -290,18 +294,18 @@ Tests are TypeScript files in each package's `test/` directory.

### Where to Add Tests

| Crate | Location |
| --------------------- | --------------------------------------- |
| Parser | `tasks/coverage/misc/pass/` or `fail/` |
| Linter | Inline in rule files |
| Formatter | Prettier conformance suite |
| Minifier | `tests/` subdirectories |
| Transformer | `tests/integrations/` or Babel fixtures |
| Codegen | `tests/integration/` |
| Isolated Declarations | `tests/fixtures/*.ts` |
| Semantic | `tests/` directory |
| NAPI packages | `test/` directory (Vitest) |
| Language Server | Inline and `/fixtures` |
| Crate | Location |
| --------------------- | ----------------------------------------------------------- |
| Parser | `tasks/coverage/misc/pass/` or `fail/` |
| Linter | Inline in rule files and `tests/` subdirectory for fixtures |
| Formatter | Prettier conformance suite |
| Minifier | `tests/` subdirectories |
| Transformer | `tests/integrations/` or Babel fixtures |
| Codegen | `tests/integration/` |
| Isolated Declarations | `tests/fixtures/*.ts` |
| Semantic | `tests/` directory |
| NAPI packages | `test/` directory (Vitest) |
| Language Server | Inline and `/fixtures` |

## Notes

Expand Down
Loading
Loading