Skip to content

Commit 6330d02

Browse files
change readme
1 parent a228ff4 commit 6330d02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/pglt_test_macros/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Macros to help auto-generate tests based on files.
66

77
Pass a glob pattern that'll identify your files and a test-function that'll run for each file. The glob pattern has to start at the root of your crate.
88

9-
You can add a `.expected.` file next to your test file. Its path will be passed to your test function so you can outcome-based assertions. (Alternatively, write snapshot tests.)
9+
You can add a `.expected.` file next to your test file. Its path will be passed to your test function so you can make outcome-based assertions. (Alternatively, write snapshot tests.)
1010

1111
Given the following file structure:
1212

@@ -56,6 +56,7 @@ pub fn somefilename()
5656

5757
- If you use a Rust-keyword as a file name, this'll result in invalid syntax for the generated tests.
5858
- All files of the glob-pattern must (currently) be `.sql` files.
59+
- The `.expected.sql` file-name will always be passed, even if the file doesn't exist.
5960
- The macro will wrap your tests in a `mod tests { .. }` module. If you need multiple generations, wrap them in modules like so: ```mod some_test { tests_macros::gen_tests! { .. } }`.
6061

6162
## How to run

0 commit comments

Comments
 (0)