Create AGENTS.md

This commit is contained in:
Jarred Sumner
2025-05-17 04:41:13 -07:00
parent 9bee7a64a2
commit ea7b9ea976
2 changed files with 37 additions and 1 deletions

36
AGENTS.md Normal file
View File

@@ -0,0 +1,36 @@
## bun tests
**IMPORTANT**: use the `bun agent` command instead of the `bun` command. For example:
✅ Good
```sh
bun agent test internal/ban-words.test.ts
bun agent ./foo.ts
```
The `bun agent` command runs the DEBUG build. If you forget to run the debug build, your changes will not be reflected..
### Run a file
To run a file, you can use the `bun agent <file-path>` command.
```sh
bun agent ./foo.ts
```
### Run tests
To run a single test, you need to use the `bun agent test <test-name>` command.
```sh
bun agent test internal/ban-words.test.ts
```
You must ALWAYS make sure to pass a file path to the `bun agent test <file-path>` command. DO NOT try to run ALL the tests at once unless you're in a specific subdirectory.
### Run a Node.js test
```sh
bun agent --silent node:test test-fs-link
```

View File

@@ -33,7 +33,7 @@
"build": "bun run build:debug",
"watch": "zig build check --watch -fincremental --prominent-compile-errors --global-cache-dir build/debug/zig-check-cache --zig-lib-dir vendor/zig/lib",
"watch-windows": "zig build check-windows --watch -fincremental --prominent-compile-errors --global-cache-dir build/debug/zig-check-cache --zig-lib-dir vendor/zig/lib",
"bd": "(bun run --silent build:debug &> /tmp/bun.debug.build.log || (cat /tmp/bun.debug.build.log && rm -rf /tmp/bun.debug.build.log && exit 1)) && rm -f /tmp/bun.debug.build.log && ./build/debug/bun-debug",
"agent": "(bun run --silent build:debug &> /tmp/bun.debug.build.log || (cat /tmp/bun.debug.build.log && rm -rf /tmp/bun.debug.build.log && exit 1)) && rm -f /tmp/bun.debug.build.log && ./build/debug/bun-debug",
"build:debug": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=Debug -B build/debug",
"build:debug:asan": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -B build/debug-asan",
"build:valgrind": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_BASELINE=ON -ENABLE_VALGRIND=ON -B build/debug-valgrind",