Skip to content

Commit 4e3c3f3

Browse files
committed
supabase-test
1 parent 1fc7d68 commit 4e3c3f3

File tree

65 files changed

+137
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+137
-243
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"jest-in-case": "^1.0.2",
3939
"jest": "^29.6.2",
4040
"lerna": "^8.2.3",
41-
"pgsql-test": "^2.11.5",
41+
"supabase-test": "^0.0.5",
4242
"prettier": "^3.0.2",
4343
"rimraf": "4.4.1",
4444
"ts-jest": "^29.1.1",

packages/rls-demo/__tests__/rls-test-products.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let pg: PgTestClient;
44
let db: PgTestClient;

packages/rls-demo/__tests__/rls-test-users.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let pg: PgTestClient;
44
let db: PgTestClient;

packages/rls-demo/__tests__/rls/rls.advanced.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let db: PgTestClient;
44
let teardown: () => Promise<void>;

packages/rls-demo/__tests__/rls/rls.basic.test.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let pg: PgTestClient;
44
let db: PgTestClient;
55
let teardown: () => Promise<void>;
66

7+
// REMOVE THIS BEFORE MERGING
8+
79
beforeAll(async () => {
8-
// use existing supabase database connection
9-
10-
11-
({ pg, db, teardown } = await getConnections());
10+
// process.env.PGHOST = 'localhost';
11+
// process.env.PGPORT = '54322';
12+
// process.env.PGUSER = 'supabase_admin';
13+
// process.env.PGPASSWORD = 'postgres';
14+
15+
({ pg, db, teardown } = await getConnections({
16+
17+
pg: {
18+
host: 'localhost',
19+
port: 54322,
20+
user: 'supabase_admin',
21+
password: 'postgres',
22+
}
23+
24+
}));
1225
});
1326

1427
afterAll(async () => {

packages/rls-demo/__tests__/rls/rls.complex.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let pg: PgTestClient;
44
let db: PgTestClient;

packages/rls-demo/__tests__/rls/rls.edges.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let pg: PgTestClient;
44
let db: PgTestClient;

packages/rls-demo/__tests__/rls/rls.multi-user.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let pg: PgTestClient;
44
let db: PgTestClient;

packages/rls-demo/__tests__/rls/rls.permissions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let pg: PgTestClient;
44
let db: PgTestClient;

packages/rls-demo/__tests__/rls/rls.queries.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConnections, PgTestClient } from 'pgsql-test';
1+
import { getConnections, PgTestClient } from 'supabase-test';
22

33
let pg: PgTestClient;
44
let db: PgTestClient;

0 commit comments

Comments
 (0)