Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 2.51 KB

AGENTS.md

File metadata and controls

31 lines (22 loc) · 2.51 KB

Rspack

Rspack is a Rust-based JavaScript bundler with a webpack-compatible API.

Build and validation

Before testing changed code, build the artifacts those tests consume using the development commands.

Adding tests

  • Rust: Do not add new Rust tests in ordinary changes. New cases belong in dedicated test crates; do not add inline #[test] functions or crate-local unit tests.
  • Core unit tests: Use packages/rspack/tests/**/*.test.ts to test the behavior of a single function in isolation.
  • CLI tests: Add tests under packages/rspack-cli/tests/ for behavior implemented by @rspack/cli, such as command handling and option parsing.
  • JavaScript integration tests: Reuse existing runners and add cases under tests/rspack-test/{type}Cases/. Do not add top-level or suite-level test.js runners. Harness-required files inside a case, such as hookCases/**/test.js, are allowed. Use compilerCases only when a test must drive the Compiler or Compilation API directly; otherwise use configCases, normalCases, watchCases or another runner that builds from config.

Pull requests

References