8000 chore: update snapshots · supabase/postgres-meta@6ce684b · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ce684b

Browse files
committed
chore: update snapshots
1 parent 263989e commit 6ce684b

15 files changed

+450
-449
lines changed

test/lib/columns.ts

Lines changed: 64 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ test('list', async () => {
88
table_id: expect.any(Number),
99
},
1010
`
11-
Object {
11+
{
1212
"comment": null,
1313
"data_type": "bigint",
1414
"default_value": null,
15-
"enums": Array [],
15+
"enums": [],
1616
"format": "int8",
1717
"id": StringMatching /\\^\\\\d\\+\\\\\\.3\\$/,
1818
"identity_generation": null,
@@ -43,20 +43,21 @@ test('list from a single table', async () => {
4343
id: expect.stringMatching(/^\d+\.\d+$/),
4444
table_id: expect.any(Number),
4545
},
46+
4647
{
4748
id: expect.stringMatching(/^\d+\.\d+$/),
4849
table_id: expect.any(Number),
4950
},
5051
],
5152
},
5253
`
53-
Object {
54-
"data": Array [
55-
Object {
54+
{
55+
"data": [
56+
{
5657
"comment": null,
5758
"data_type": "text",
5859
"default_value": null,
59-
"enums": Array [],
60+
"enums": [],
6061
"format": "text",
6162
"id": StringMatching /\\^\\\\d\\+\\\\\\.\\\\d\\+\\$/,
6263
"identity_generation": null,
@@ -71,11 +72,11 @@ test('list from a single table', async () => {
7172
"table": "t",
7273
"table_id": Any<Number>,
7374
},
74-
Object {
75+
{
7576
"comment": null,
7677
"data_type": "text",
7778
"default_value": null,
78-
"enums": Array [],
79+
"enums": [],
7980
"format": "text",
8081
"id": StringMatching /\\^\\\\d\\+\\\\\\.\\\\d\\+\\$/,
8182
"identity_generation": null,
@@ -147,12 +148,12 @@ test('retrieve, create, update, delete', async () => {
147148
expect(res).toMatchInlineSnapshot(
148149
{ data: { id: expect.stringMatching(/^\d+\.1$/), table_id: expect.any(Number) } },
149150
`
150-
Object {
151-
"data": Object {
151+
{
152+
"data": {
152153
"comment": "foo",
153154
"data_type": "smallint",
154155
"default_value": "'42'::smallint",
155-
"enums": Array [],
156+
"enums": [],
156157
"format": "int2",
157158
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
158159
"identity_generation": null,
@@ -177,12 +178,12 @@ test('retrieve, create, update, delete', async () => {
177178
data: { id: expect.stringMatching(/^\d+\.1$/), table_id: expect.any(Number) },
178179
},
179180
`
180-
Object {
181-
"data": Object {
181+
{
182+
"data": {
182183
"comment": "foo",
183184
"data_type": "smallint",
184185
"default_value": "'42'::smallint",
185-
"enums": Array [],
186+
"enums": [],
186187
"format": "int2",
187188
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
188189
"identity_generation": null,
@@ -215,12 +216,12 @@ test('retrieve, create, update, delete', async () => {
215216
data: { id: expect.stringMatching(/^\d+\.1$/), table_id: expect.any(Number) },
216217
},
217218
`
218-
Object {
219-
"data": Object {
219+
{
220+
"data": {
220221
"comment": "bar",
221222
"data_type": "integer",
222223
"default_value": null,
223-
"enums": Array [],
224+
"enums": [],
224225
"format": "int4",
225226
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
226227
"identity_generation": "ALWAYS",
@@ -245,12 +246,12 @@ test('retrieve, create, update, delete', async () => {
245246
data: { id: expect.stringMatching(/^\d+\.1$/), table_id: expect.any(Number) },
246247
},
247248
`
248-
Object {
249-
"data": Object {
249+
{
250+
"data": {
250251
"comment": "bar",
251252
"data_type": "integer",
252253
"default_value": null,
253-
"enums": Array [],
254+
"enums": [],
254255
"format": "int4",
255256
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
256257
"identity_generation": "ALWAYS",
@@ -290,11 +291,11 @@ test('enum column with quoted name', async () => {
290291
table_id: expect.any(Number),
291292
},
292293
`
293-
Object {
294+
{
294295
"comment": null,
295296
"data_type": "USER-DEFINED",
296297
"default_value": null,
297-
"enums": Array [
298+
"enums": [
298299
"v",
299300
],
300301
"format": "T",
@@ -335,9 +336,9 @@ WHERE i.indrelid = '${testTable!.name}'::regclass
335336
AND i.indisprimary;
336337
`)
337338
expect(res).toMatchInlineSnapshot(`
338-
Object {
339-
"data": Array [
340-
Object {
339+
{
340+
"data": [
341+
{
341342
"attname": "c",
342343
},
343344
],
@@ -367,9 +368,9 @@ WHERE i.indrelid = '${testTable!.name}'::regclass
367368
AND i.indisunique;
368369
`)
369370
expect(res).toMatchInlineSnapshot(`
370-
Object {
371-
"data": Array [
372-
Object {
371+
{
372+
"data": [
373+
{
373374
"attname": "c",
374375
},
375376
],
@@ -396,12 +397,12 @@ test('array column', async () => {
396397
},
397398
},
398399
`
399-
Object {
400-
"data": Object {
400+
{
401+
"data": {
401402
"comment": null,
402403
"data_type": "ARRAY",
403404
"default_value": null,
404-
"enums": Array [],
405+
"enums": [],
405406
"format": "_int2",
406407
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
407408
"identity_generation": null,
@@ -442,12 +443,12 @@ test('column with default value', async () => {
442443
},
443444
},
444445
`
445-
Object {
446-
"data": Object {
446+
{
447+
"data": {
447448
"comment": null,
448449
"data_type": "timestamp with time zone",
449450
"default_value": "now()",
450-
"enums": Array [],
451+
"enums": [],
451452
"format": "timestamptz",
452453
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
453454
"identity_generation": null,
@@ -487,9 +488,9 @@ SELECT pg_get_constraintdef((
487488
));
488489
`)
489490
expect(res).toMatchInlineSnapshot(`
490-
Object {
491-
"data": Array [
492-
Object {
491+
{
492+
"data": [
493+
{
493494
"pg_get_constraintdef": null,
494495
},
495496
],
@@ -519,12 +520,12 @@ test('update with name unchanged', async () => {
519520
},
520521
},
521522
`
522-
Object {
523-
"data": Object {
523+
{
524+
"data": {
524525
"comment": null,
525526
"data_type": "smallint",
526527
"default_value": null,
527-
"enums": Array [],
528+
"enums": [],
528529
"format": "int2",
529530
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
530531
"identity_generation": null,
@@ -566,12 +567,12 @@ test('update with array types', async () => {
566567
},
567568
},
568569
`
569-
Object {
570-
"data": Object {
570+
{
571+
"data": {
571572
"comment": null,
572573
"data_type": "ARRAY",
573574
"default_value": null,
574-
"enums": Array [],
575+
"enums": [],
575576
"format": "_text",
576577
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
577578
"identity_generation": null,
@@ -613,12 +614,12 @@ test('update with incompatible types', async () => {
613614
},
614615
},
615616
`
616-
Object {
617-
"data": Object {
617+
{
618+
"data": {
618619
"comment": null,
619620
"data_type": "integer",
620621
"default_value": null,
621-
"enums": Array [],
622+
"enums": [],
622623
"format": "int4",
623624
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
624625
"identity_generation": null,
@@ -659,12 +660,12 @@ test('update is_unique', async () => {
659660
},
660661
},
661662
`
662-
Object {
663-
"data": Object {
663+
{
664+
"data": {
664665
"comment": null,
665666
"data_type": "text",
666667
"default_value": null,
667-
"enums": Array [],
668+
"enums": [],
668669
"format": "text",
669670
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
670671
"identity_generation": null,
@@ -692,12 +693,12 @@ test('update is_unique', async () => {
692693
},
693694
},
694695
`
695-
Object {
696-
"data": Object {
696+
{
697+
"data": {
697698
"comment": null,
698699
"data_type": "text",
699700
"default_value": null,
700-
"enums": Array [],
701+
"enums": [],
701702
"format": "text",
702703
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
703704
"identity_generation": null,
@@ -740,12 +741,12 @@ test('alter column to type with uppercase', async () => {
740741
},
741742
},
742743
`
743-
Object {
744-
"data": Object {
744+
{
745+
"data": {
745746
"comment": null,
746747
"data_type": "USER-DEFINED",
747748
"default_value": null,
748-
"enums": Array [],
749+
"enums": [],
749750
"format": "T",
750751
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
751752
"identity_generation": null,
@@ -786,12 +787,12 @@ test('enums are populated in enum array columns', async () => {
786787
},
787788
},
788789
`
789-
Object {
790-
"data": Object {
790+
{
791+
"data": {
791792
"comment": null,
792793
"data_type": "ARRAY",
793794
"default_value": null,
794-
"enums": Array [
795+
"enums": [
795796
"a",
796797
],
797798
"format": "_test_enum",
@@ -839,12 +840,12 @@ create table public.t (
839840
},
840841
},
841842
`
842-
Object {
843-
"data": Object {
843+
{
844+
"data": {
844845
"comment": null,
845846
"data_type": "bigint",
846847
"default_value": null,
847-
"enums": Array [],
848+
"enums": [],
848849
"format": "int8",
849850
"id": StringMatching /\\^\\\\d\\+\\\\\\.1\\$/,
850851
"identity_generation": null,
@@ -870,9 +871,9 @@ create table public.t (
870871
name: 't_id',
871872
})
872873
expect(res).toMatchInlineSnapshot(`
873-
Object {
874+
{
874875
"data": null,
875-
"error": Object {
876+
"error": {
876877
"message": "Cannot find a column named t_id in table public.t",
877878
},
878879
}

test/lib/config.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ import { pgMeta } from './utils'
33
test('list', async () => {
44
const res = await pgMeta.config.list()
55
expect(res.data?.find(({ name }) => name === 'autovacuum')).toMatchInlineSnapshot(`
6-
Object {
7-
"boot_val": "on",
8-
"category": "Autovacuum",
9-
"context": "sighup",
10-
"enumvals": null,
11-
"extra_desc": null,
12-
"group": "Autovacuum",
13-
"max_val": null,
14-
"min_val": null,
15-
"name": "autovacuum",
16-
"pending_restart": false,
17-
"reset_val": "on",
18-
"setting": "on",
19-
"short_desc": "Starts the autovacuum subprocess.",
20-
"source": "default",
21-
"sourcefile": null,
22-
"sourceline": null,
23-
"subgroup": "",
24-
"unit": null,
25-
"vartype": "bool",
26-
}
27-
`)
6+
{
7+
"boot_val": "on",
8+
"category": "Autovacuum",
9+
"context": "sighup",
10+
"enumvals": null,
11+
"extra_desc": null,
12+
"group": "Autovacuum",
13+
"max_val": null,
14+
"min_val": null,
15+
"name": "autovacuum",
16+
"pending_restart": false,
17+
"reset_val": "on",
18+
"setting": "on",
19+
"short_desc": "Starts the autovacuum subprocess.",
20+
"source": "default",
21+
"sourcefile": null,
22+
"sourceline": null,
23+
"subgroup": "",
24+
"unit": null,
25+
"vartype": "bool",
26+
}
27+
`)
2828
})

0 commit comments

Comments
 (0)
0