supabase-test 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -7
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
`supabase-test` is a Supabase-optimized version of [`pgsql-test`](https://www.npmjs.com/package/pgsql-test) with Supabase defaults baked in. It provides instant, isolated PostgreSQL databases for testing with automatic transaction rollbacks, context switching, and clean seeding — configured for Supabase's local development environment. It's also great for GitHub Actions and CI/CD testing.
|
|
20
20
|
|
|
21
|
+
Explore a full working example (including GitHub Actions CI/CD) in the [`supabase-test-suite`](https://github.com/launchql/supabase-test-suite) repo.
|
|
22
|
+
|
|
21
23
|
## Install
|
|
22
24
|
|
|
23
25
|
```sh
|
|
@@ -33,13 +35,9 @@ npm install supabase-test
|
|
|
33
35
|
* 🧪 **Compatible with any async runner** — works with `Jest`, `Mocha`, etc.
|
|
34
36
|
* 🧹 **Auto teardown** — no residue, no reboots, just clean exits
|
|
35
37
|
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
Part of the [LaunchQL](https://github.com/launchql) ecosystem, `pgsql-test` is built to pair seamlessly with our TypeScript-based [Sqitch](https://sqitch.org/) engine rewrite:
|
|
39
|
-
|
|
40
|
-
* 🚀 **Lightning-fast migrations** — powered by LaunchQL’s native deployer (10x faster than legacy Sqitch)
|
|
41
|
-
* 🔧 **Composable test scaffolds** — integrate with full LaunchQL stacks or use standalone
|
|
38
|
+
### Tutorials
|
|
42
39
|
|
|
40
|
+
📚 **[Learn how to test with Supabase →](https://launchql.com/learn/supabase)**
|
|
43
41
|
|
|
44
42
|
## Table of Contents
|
|
45
43
|
|
|
@@ -56,7 +54,7 @@ Part of the [LaunchQL](https://github.com/launchql) ecosystem, `pgsql-test` is b
|
|
|
56
54
|
* [Programmatic Seeding](#-programmatic-seeding)
|
|
57
55
|
* [CSV Seeding](#️-csv-seeding)
|
|
58
56
|
* [JSON Seeding](#️-json-seeding)
|
|
59
|
-
* [
|
|
57
|
+
* [Seeding](#-launchql-seeding)
|
|
60
58
|
7. [`getConnections() Options` ](#getconnections-options)
|
|
61
59
|
8. [Disclaimer](#disclaimer)
|
|
62
60
|
|
|
@@ -627,6 +625,26 @@ const { conn, db, teardown } = await getConnections({
|
|
|
627
625
|
});
|
|
628
626
|
```
|
|
629
627
|
|
|
628
|
+
## Education and Tutorials
|
|
629
|
+
|
|
630
|
+
1. 🚀 [Quickstart: Getting Up and Running](https://launchql.com/learn/quickstart)
|
|
631
|
+
Get started with modular databases in minutes. Install prerequisites and deploy your first module.
|
|
632
|
+
|
|
633
|
+
2. 📦 [Modular PostgreSQL Development with Database Packages](https://launchql.com/learn/modular-postgres)
|
|
634
|
+
Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.
|
|
635
|
+
|
|
636
|
+
3. ✏️ [Authoring Database Changes](https://launchql.com/learn/authoring-database-changes)
|
|
637
|
+
Master the workflow for adding, organizing, and managing database changes with pgpm.
|
|
638
|
+
|
|
639
|
+
4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://launchql.com/learn/e2e-postgres-testing)
|
|
640
|
+
Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.
|
|
641
|
+
|
|
642
|
+
5. ⚡ [Supabase Testing](https://launchql.com/learn/supabase)
|
|
643
|
+
TypeScript-native testing for Supabase with modern workflows.
|
|
644
|
+
|
|
645
|
+
6. 🔧 [Troubleshooting](https://launchql.com/learn/troubleshooting)
|
|
646
|
+
Common issues and solutions for pgpm, PostgreSQL, and testing.
|
|
647
|
+
|
|
630
648
|
## Related LaunchQL Tooling
|
|
631
649
|
|
|
632
650
|
### 🧪 Testing
|
|
@@ -668,6 +686,11 @@ const { conn, db, teardown } = await getConnections({
|
|
|
668
686
|
* [@launchql/query-builder](https://github.com/launchql/launchql/tree/main/packages/query-builder): **🏗️ SQL constructor** providing a robust TypeScript-based query builder for dynamic generation of `SELECT`, `INSERT`, `UPDATE`, `DELETE`, and stored procedure calls—supports advanced SQL features like `JOIN`, `GROUP BY`, and schema-qualified queries.
|
|
669
687
|
* [@launchql/query](https://github.com/launchql/launchql/tree/main/packages/query): **🧩 Fluent GraphQL builder** for PostGraphile schemas. ⚡ Schema-aware via introspection, 🧩 composable and ergonomic for building deeply nested queries.
|
|
670
688
|
|
|
689
|
+
## Credits
|
|
690
|
+
|
|
691
|
+
🛠 Built by LaunchQL — if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/launchql)
|
|
692
|
+
|
|
693
|
+
|
|
671
694
|
## Disclaimer
|
|
672
695
|
|
|
673
696
|
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "supabase-test",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"author": "Interweb <developers@interweb.io>",
|
|
5
5
|
"description": "supabase-test offers isolated, role-aware, and rollback-friendly PostgreSQL environments for integration tests with Supabase defaults baked in",
|
|
6
6
|
"main": "index.js",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"test:watch": "jest --watch"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@launchql/types": "^2.8.
|
|
56
|
-
"pg-env": "^1.1.
|
|
57
|
-
"pgsql-test": "^2.14.
|
|
55
|
+
"@launchql/types": "^2.8.1",
|
|
56
|
+
"pg-env": "^1.1.3",
|
|
57
|
+
"pgsql-test": "^2.14.2"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "25b59a1403d95d86be14bd36c94e5af1689df1c3"
|
|
60
60
|
}
|