npx agentspec-cli install 6fad5121-6d76-4acb-bf02-5128155d1405 --file-type cursor-rules→ .cursor/rules/
---
alwaysApply: true
---
- Don't add files to test in the root, neither a tmp folder. Only add those files when you want to make sure some external behaviour or dependency behaves a certain way.
- Always use the right test suite for each test
- Never stop if "make test" reports an [ERROR]. Check the entire output of the command.
File structure and test commands for each package:
packages
├── css-property-parser
│ └── test (to run those tests `make test-css-property-parser`)
│ ├── Combinators_test.re
│ ├── Modifiers_test.re
│ ├── Rules_test.re
│ ├── Runner.re
│ ├── Standard_test.re
│ ├── Types_test.re
│ ├── dune
│ └── snapshots
├── css-spec-parser
│ └── test (to run those tests `make test-css-spec-parser`)
│ ├── dune
│ └── test.re
├── murmur2
│ ├── dune
│ ├── murmur2.ml
│ ├── murmur2.mli
│ └── test (to run those tests `make test-murmur2`)
├── parser
│ ├── lib
│ └── test (to run those tests `make test-parser`)
│ ├── Lexer_test.re
│ ├── Parser_test.re
│ ├── Runner.re
│ └── dune
├── ppx
│ ├── src
│ └── test
│ ├── css-support (to run those tests `make test-css-support`)
│ ├── dune
│ ├── generate-css-support
│ ├── native (to run those tests `make test-ppx-native`)
│ ├── rewriter.re
│ ├── snapshot (to run those tests `make test-ppx-snapshot-reason`)
│ └── standalone.re
├── runtime
│ ├── melange
│ ├── native
│ ├── rescript
│ └── test (to run those tests `make test-runtime`)
│ ├── dune
│ ├── test.ml
│ ├── test_autoprefixer.ml
│ ├── test_autoprefixer.mli
│ ├── test_hash.ml
│ ├── test_styles.ml
│ └── test_styles.mli
├── string_interpolation
├── src
└── test (to run those tests `make test-string-interpolation`)
├── dune
└── transform_test.ml
## Cram tests
Cram tests capture shell sessions as executable tests with automatic diff-based verification.
We use cram tests on "test-snapshot-reason" and "test-css-support" to ensure the generated code is correct. Each time I ask to "add a test" and talking about cram tests, I mean adding a cram test into one of those folders.
**Test Types:**
- **File tests**: `name.t` - single self-contained file
- **Directory tests**: `name.t/run.t` - allows separate fixture files
Building and running
Before submitting any changes, it is crucial to validate them by running the full preflight check. This command will build the repository, run all tests, check for type errors, and lint the code. To run the full suite of checks, execute the following command:
by AgentHub Crawler
Agent Notes
Never insert new entries mid-table—shifting established builtin IDs breaks existing bytecode, so this **must never happen**.
by AgentHub Crawler
Repo organization
./src/ - Main source code ./test/ - Automated tests ./test/sampleServers/ - Sample implementations of test services. ./test/workspaces/ - Directories used to run Candle during tests. ./test/cli/ - Tests related to each CLI command
by AgentHub Crawler
Sign in to leave a comment.
APIs
Use `bun test` to run tests. import { test, expect } from "bun:test"; test("hello world", () => {
by AgentHub Crawler