Skip to content

Commit 1192fa8

Browse files
committed
Make tests CI only
1 parent 52809f2 commit 1192fa8

File tree

6 files changed

+51
-47
lines changed

6 files changed

+51
-47
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"git-format-staged": "^3.1.1",
7171
"globals": "^16.2.0",
7272
"husky": "^7.0.0",
73-
"is-ci": "^3.0.1",
73+
"is-ci": "^4.1.0",
7474
"jest-fixtures": "^0.6.0",
7575
"prettier": "^3.5.3",
7676
"svg-term-cli": "^2.1.1",

pnpm-lock.yaml

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/__tests__/__snapshots__/index.js.snap

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ exports[`Main > should output error with codeframe 1`] = `
44
"ENUM must be equal to one of the allowed values
55
(paragraph, codeBlock, blockquote)
66
7-
2 | "type": "doc",
8-
3 | "version": 1,
9-
> 4 | "content": [{ "type": "paragarph" }]
10-
| ^^^^^^^^^^^ 👈🏽 Did you mean paragraph here?
11-
5 | }
12-
6 |"
7+
[0m [90m 2 |[39m [32m"type"[39m[33m:[39m [32m"doc"[39m[33m,[39m
8+
[90m 3 |[39m [32m"version"[39m[33m:[39m [35m1[39m[33m,[39m
9+
[31m[1m>[22m[39m[90m 4 |[39m [32m"content"[39m[33m:[39m [{ [32m"type"[39m[33m:[39m [32m"paragarph"[39m }]
10+
[90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [31m[1m👈🏽 Did you mean paragraph here?[22m[39m
11+
[90m 5 |[39m }
12+
[90m 6 |[39m[0m"
1313
`;
1414
1515
exports[`Main > should output error with reconstructed codeframe 1`] = `
1616
"ENUM must be equal to one of the allowed values
1717
(paragraph, codeBlock, blockquote)
1818
19-
4 | "content": [
20-
5 | {
21-
> 6 | "type": "paragarph"
22-
| ^^^^^^^^^^^ 👈🏽 Did you mean paragraph here?
23-
7 | }
24-
8 | ]
25-
9 | }"
19+
[0m [90m 4 |[39m [32m"content"[39m[33m:[39m [
20+
[90m 5 |[39m {
21+
[31m[1m>[22m[39m[90m 6 |[39m [32m"type"[39m[33m:[39m [32m"paragarph"[39m
22+
[90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [31m[1m👈🏽 Did you mean paragraph here?[22m[39m
23+
[90m 7 |[39m }
24+
[90m 8 |[39m ]
25+
[90m 9 |[39m }[0m"
2626
`;

src/validation-errors/__tests__/__snapshots__/enum.js.snap

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ exports[`Enum > when value is a primitive > prints correctly for empty value 1`]
55
"ENUM should be equal to one of the allowed values",
66
"(foo, bar)
77
",
8-
"> 1 | "baz"
9-
| ^^^^^ 👈🏽 Did you mean bar here?",
8+
"[0m[31m[1m>[22m[39m[90m 1 |[39m [32m"baz"[39m
9+
[90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [31m[1m👈🏽 Did you mean bar here?[22m[39m[0m",
1010
]
1111
`;
1212

@@ -15,8 +15,8 @@ exports[`Enum > when value is a primitive > prints correctly for enum prop 1`] =
1515
"ENUM should be equal to one of the allowed values",
1616
"(foo, bar)
1717
",
18-
"> 1 | "baz"
19-
| ^^^^^ 👈🏽 Did you mean bar here?",
18+
"[0m[31m[1m>[22m[39m[90m 1 |[39m [32m"baz"[39m
19+
[90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [31m[1m👈🏽 Did you mean bar here?[22m[39m[0m",
2020
]
2121
`;
2222

@@ -25,8 +25,8 @@ exports[`Enum > when value is a primitive > prints correctly for no levenshtein
2525
"ENUM should be equal to one of the allowed values",
2626
"(one, two)
2727
",
28-
"> 1 | "baz"
29-
| ^^^^^ 👈🏽 Unexpected value, should be equal to one of the allowed values",
28+
"[0m[31m[1m>[22m[39m[90m 1 |[39m [32m"baz"[39m
29+
[90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [31m[1m👈🏽 Unexpected value, should be equal to one of the allowed values[22m[39m[0m",
3030
]
3131
`;
3232

@@ -35,10 +35,10 @@ exports[`Enum > when value is an object > prints correctly for empty value 1`] =
3535
"ENUM should be equal to one of the allowed values",
3636
"(foo, bar)
3737
",
38-
" 1 | {
39-
> 2 | "id": "baz"
40-
| ^^^^^ 👈🏽 Did you mean bar here?
41-
3 | }",
38+
"[0m [90m 1 |[39m {
39+
[31m[1m>[22m[39m[90m 2 |[39m [32m"id"[39m[33m:[39m [32m"baz"[39m
40+
[90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [31m[1m👈🏽 Did you mean bar here?[22m[39m
41+
[90m 3 |[39m }[0m",
4242
]
4343
`;
4444
@@ -47,10 +47,10 @@ exports[`Enum > when value is an object > prints correctly for enum prop 1`] = `
4747
"ENUM should be equal to one of the allowed values",
4848
"(foo, bar)
4949
",
50-
" 1 | {
51-
> 2 | "id": "baz"
52-
| ^^^^^ 👈🏽 Did you mean bar here?
53-
3 | }",
50+
"[0m [90m 1 |[39m {
51+
[31m[1m>[22m[39m[90m 2 |[39m [32m"id"[39m[33m:[39m [32m"baz"[39m
52+
[90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [31m[1m👈🏽 Did you mean bar here?[22m[39m
53+
[90m 3 |[39m }[0m",
5454
]
5555
`;
5656
@@ -59,9 +59,9 @@ exports[`Enum > when value is an object > prints correctly for no levenshtein ma
5959
"ENUM should be equal to one of the allowed values",
6060
"(one, two)
6161
",
62-
" 1 | {
63-
> 2 | "id": "baz"
64-
| ^^^^^ 👈🏽 Unexpected value, should be equal to one of the allowed values
65-
3 | }",
62+
"[0m [90m 1 |[39m {
63+
[31m[1m>[22m[39m[90m 2 |[39m [32m"id"[39m[33m:[39m [32m"baz"[39m
64+
[90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [31m[1m👈🏽 Unexpected value, should be equal to one of the allowed values[22m[39m
65+
[90m 3 |[39m }[0m",
6666
]
6767
`;

src/validation-errors/__tests__/__snapshots__/required.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ exports[`Required > prints correctly for missing required prop 1`] = `
44
[
55
"REQUIRED should have required property 'id'
66
",
7-
" 1 | {
8-
> 2 | "nested": {}
9-
| ^ ☹️ id is missing here!
10-
3 | }",
7+
"[0m [90m 1 |[39m {
8+
[31m[1m>[22m[39m[90m 2 |[39m [32m"nested"[39m[33m:[39m {}
9+
[90m |[39m [31m[1m^[22m[39m [31m[1m☹️ id is missing here![22m[39m
10+
[90m 3 |[39m }[0m",
1111
]
1212
`;

vitest.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ import { defineConfig } from 'vitest/config';
33
export default defineConfig({
44
test: {
55
include: ['src/**/__tests__/**/*.js'],
6+
env: {
7+
CI: 'true',
8+
},
69
},
710
});

0 commit comments

Comments
 (0)