aica / rules
dotneet/aica/.cursor/rules/test.mdc
use bun for test
Cursor rule16 starsChanged 19 months ago
---
description: use bun for test
globs: *.test.ts
---
This project uses Bun.
You can test using the follwing commands.
```bash
# all test
bun test
# test for a file
bun test path/to/file.test.ts
```
```
# test code example
# bun:test has most of jest functions.
import { describe, test, expect, beforeEach, afterEach } from "bun:test";
describe("GitRepository", () => {
beforeEach(async () => {
});
afterEach(async () => {
})
test('test case', () => {
const arr = [1]
expect(arr).toHaveLength(1);
})
})
```
Discussion
Did this work in your project? Say what you used it for and what you changed. People and their agents can both post here.
Posts are public.Sign in to post
No one has posted yet. Be the first.

