Skip to content

Commit 8193fb4

Browse files
committed
chore: use file snapshots
1 parent 0ade8bc commit 8193fb4

File tree

23 files changed

+800
-829
lines changed

23 files changed

+800
-829
lines changed

packages/config-schema/tests/__snapshots__/schema-tests.ts.snap

Lines changed: 0 additions & 825 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"errors": [
3+
{
4+
"instancePath": "/build",
5+
"keyword": "additionalProperties",
6+
"message": "must NOT have additional properties",
7+
"params": {
8+
"additionalProperty": "abcd",
9+
},
10+
"schemaPath": "#/additionalProperties",
11+
},
12+
{
13+
"instancePath": "/build/base",
14+
"keyword": "type",
15+
"message": "must be string",
16+
"params": {
17+
"type": "string",
18+
},
19+
"schemaPath": "#/definitions/BasePath/type",
20+
},
21+
{
22+
"instancePath": "/build/command",
23+
"keyword": "type",
24+
"message": "must be string",
25+
"params": {
26+
"type": "string",
27+
},
28+
"schemaPath": "#/definitions/BuildCommand/type",
29+
},
30+
{
31+
"instancePath": "/build/edge_functions",
32+
"keyword": "type",
33+
"message": "must be string",
34+
"params": {
35+
"type": "string",
36+
},
37+
"schemaPath": "#/definitions/EdgeFunctionPath/type",
38+
},
39+
{
40+
"instancePath": "/build/publish",
41+
"keyword": "type",
42+
"message": "must be string",
43+
"params": {
44+
"type": "string",
45+
},
46+
"schemaPath": "#/definitions/PublishPath/type",
47+
},
48+
],
49+
"valid": false,
50+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"errors": undefined,
3+
"valid": true,
4+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"errors": [
3+
{
4+
"instancePath": "/context/deploy-preview",
5+
"keyword": "additionalProperties",
6+
"message": "must NOT have additional properties",
7+
"params": {
8+
"additionalProperty": "other",
9+
},
10+
"schemaPath": "#/additionalProperties",
11+
},
12+
{
13+
"instancePath": "/context/dev",
14+
"keyword": "additionalProperties",
15+
"message": "must NOT have additional properties",
16+
"params": {
17+
"additionalProperty": "this",
18+
},
19+
"schemaPath": "#/additionalProperties",
20+
},
21+
{
22+
"instancePath": "/context/feature",
23+
"keyword": "additionalProperties",
24+
"message": "must NOT have additional properties",
25+
"params": {
26+
"additionalProperty": "non",
27+
},
28+
"schemaPath": "#/additionalProperties",
29+
},
30+
{
31+
"instancePath": "/context/production",
32+
"keyword": "additionalProperties",
33+
"message": "must NOT have additional properties",
34+
"params": {
35+
"additionalProperty": "any",
36+
},
37+
"schemaPath": "#/additionalProperties",
38+
},
39+
{
40+
"instancePath": "/context/production/base",
41+
"keyword": "type",
42+
"message": "must be string",
43+
"params": {
44+
"type": "string",
45+
},
46+
"schemaPath": "#/definitions/BasePath/type",
47+
},
48+
{
49+
"instancePath": "/context/production/command",
50+
"keyword": "type",
51+
"message": "must be string",
52+
"params": {
53+
"type": "string",
54+
},
55+
"schemaPath": "#/definitions/BuildCommand/type",
56+
},
57+
{
58+
"instancePath": "/context/production/edge_functions",
59+
"keyword": "type",
60+
"message": "must be string",
61+
"params": {
62+
"type": "string",
63+
},
64+
"schemaPath": "#/definitions/EdgeFunctionPath/type",
65+
},
66+
{
67+
"instancePath": "/context/production/plugins",
68+
"keyword": "type",
69+
"message": "must be array",
70+
"params": {
71+
"type": "array",
72+
},
73+
"schemaPath": "#/definitions/Plugins/type",
74+
},
75+
{
76+
"instancePath": "/context/production/publish",
77+
"keyword": "type",
78+
"message": "must be string",
79+
"params": {
80+
"type": "string",
81+
},
82+
"schemaPath": "#/definitions/PublishPath/type",
83+
},
84+
],
85+
"valid": false,
86+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"errors": undefined,
3+
"valid": true,
4+
}
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
{
2+
"errors": [
3+
{
4+
"instancePath": "/dev",
5+
"keyword": "additionalProperties",
6+
"message": "must NOT have additional properties",
7+
"params": {
8+
"additionalProperty": "other",
9+
},
10+
"schemaPath": "#/properties/dev/additionalProperties",
11+
},
12+
{
13+
"instancePath": "/dev/autoLaunch",
14+
"keyword": "type",
15+
"message": "must be boolean",
16+
"params": {
17+
"type": "boolean",
18+
},
19+
"schemaPath": "#/properties/dev/properties/autoLaunch/type",
20+
},
21+
{
22+
"instancePath": "/dev/command",
23+
"keyword": "type",
24+
"message": "must be string",
25+
"params": {
26+
"type": "string",
27+
},
28+
"schemaPath": "#/properties/dev/properties/command/type",
29+
},
30+
{
31+
"instancePath": "/dev/framework",
32+
"keyword": "type",
33+
"message": "must be string",
34+
"params": {
35+
"type": "string",
36+
},
37+
"schemaPath": "#/properties/dev/properties/framework/type",
38+
},
39+
{
40+
"instancePath": "/dev/framework",
41+
"keyword": "enum",
42+
"message": "must be equal to one of the allowed values",
43+
"params": {
44+
"allowedValues": [
45+
"#auto",
46+
"#static",
47+
"#custom",
48+
],
49+
},
50+
"schemaPath": "#/properties/dev/properties/framework/enum",
51+
},
52+
{
53+
"instancePath": "/dev/functionsPort",
54+
"keyword": "type",
55+
"message": "must be number",
56+
"params": {
57+
"type": "number",
58+
},
59+
"schemaPath": "#/properties/dev/properties/functionsPort/type",
60+
},
61+
{
62+
"instancePath": "/dev/https",
63+
"keyword": "additionalProperties",
64+
"message": "must NOT have additional properties",
65+
"params": {
66+
"additionalProperty": "nay",
67+
},
68+
"schemaPath": "#/properties/dev/properties/https/additionalProperties",
69+
},
70+
{
71+
"instancePath": "/dev/https/certFile",
72+
"keyword": "type",
73+
"message": "must be string",
74+
"params": {
75+
"type": "string",
76+
},
77+
"schemaPath": "#/properties/dev/properties/https/properties/certFile/type",
78+
},
79+
{
80+
"instancePath": "/dev/https/keyFile",
81+
"keyword": "type",
82+
"message": "must be string",
83+
"params": {
84+
"type": "string",
85+
},
86+
"schemaPath": "#/properties/dev/properties/https/properties/keyFile/type",
87+
},
88+
{
89+
"instancePath": "/dev/jwtRolePath",
90+
"keyword": "type",
91+
"message": "must be string",
92+
"params": {
93+
"type": "string",
94+
},
95+
"schemaPath": "#/properties/dev/properties/jwtRolePath/type",
96+
},
97+
{
98+
"instancePath": "/dev/jwtSecret",
99+
"keyword": "type",
100+
"message": "must be string",
101+
"params": {
102+
"type": "string",
103+
},
104+
"schemaPath": "#/properties/dev/properties/jwtSecret/type",
105+
},
106+
{
107+
"instancePath": "/dev/port",
108+
"keyword": "type",
109+
"message": "must be number",
110+
"params": {
111+
"type": "number",
112+
},
113+
"schemaPath": "#/properties/dev/properties/port/type",
114+
},
115+
{
116+
"instancePath": "/dev/publish",
117+
"keyword": "type",
118+
"message": "must be string",
119+
"params": {
120+
"type": "string",
121+
},
122+
"schemaPath": "#/properties/dev/properties/publish/type",
123+
},
124+
{
125+
"instancePath": "/dev/targetPort",
126+
"keyword": "type",
127+
"message": "must be number",
128+
"params": {
129+
"type": "number",
130+
},
131+
"schemaPath": "#/properties/dev/properties/targetPort/type",
132+
},
133+
],
134+
"valid": false,
135+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"errors": [
3+
{
4+
"instancePath": "/dev/https",
5+
"keyword": "required",
6+
"message": "must have required property 'keyFile'",
7+
"params": {
8+
"missingProperty": "keyFile",
9+
},
10+
"schemaPath": "#/properties/dev/properties/https/required",
11+
},
12+
],
13+
"valid": false,
14+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"errors": undefined,
3+
"valid": true,
4+
}

0 commit comments

Comments
 (0)