Skip to content

Commit 04b86f8

Browse files
authored
add doc to pg_test module in template (pgcentralfoundation#970)
Document that the `pg_test` module generated by the `cargo pgx new` template is a required item for a pgx extension if users ever want to use `cargo pgx test`.
1 parent a5b9eb5 commit 04b86f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cargo-pgx/src/templates/lib_rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ mod tests {{
1919

2020
}}
2121

22+
/// This module is required by `cargo pgx test` invocations.
23+
/// It must be visible at the root of your extension crate.
2224
#[cfg(test)]
2325
pub mod pg_test {{
2426
pub fn setup(_options: Vec<&str>) {{

0 commit comments

Comments
 (0)