Skip to content

Commit d8838c5

Browse files
committed
readmes
1 parent aa9ff6a commit d8838c5

File tree

3 files changed

+29
-224
lines changed

3 files changed

+29
-224
lines changed

β€ŽAGENTS.mdβ€Ž

Lines changed: 0 additions & 224 deletions
This file was deleted.
File renamed without changes.

β€Žpackages/deparser/TESTING.mdβ€Ž

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Custom testing strategy
2+
3+
Parse the any deparsed or pretty-formatted SQL back and verify the AST matches the original. This ensures the formatting doesn't break the SQL semantics.
4+
5+
Please review the test utilities β€” note that exact SQL string equality is not required. The focus is on comparing the resulting ASTs.
6+
7+
Refer to `expectAstMatch` to understand how correctness is validated.
8+
9+
The pipeline is:
10+
parse(sql1) β†’ ast β†’ deparse(ast) β†’ sql2
11+
While sql2 !== sql1 (textually), a correct round-trip means:
12+
parse(sql1) === parse(sql2) (AST-level equality).
13+
14+
You can see `expectAstMatch` here: packages/deparser/test-utils/index.ts
15+
16+
## Testing Process & Workflow
17+
18+
**Our systematic approach to fixing deparser issues:**
19+
20+
1. **One test at a time**: Focus on individual failing tests using `yarn test --testNamePattern="specific-test"`
21+
2. **Always check for regressions**: After each fix, run full `yarn test` to ensure no previously passing tests broke
22+
3. **Track progress**: Update this file with current pass/fail counts after each significant change
23+
4. **Build before testing**: Always run `yarn build` after code changes before testing
24+
5. **Clean commits**: Stage files explicitly with `git add <file>`, never use `git add .`
25+
6. **Tight feedback loops**: Use isolated debug scripts for complex issues, but don't commit them
26+
27+
**Workflow**: Make changes β†’ `yarn test --testNamePattern="target-test"` β†’ `yarn test` (check regressions) β†’ Update this file β†’ Commit & push
28+
29+
**When committing to TESTS.md, always run all tests β€” do not use testNamePattern, only `yarn test`**

0 commit comments

Comments
Β (0)