[Bugfix] Handle syntax error #103
Annotations
8 errors
error: expect(received).toMatchSnapshot(expected):
test/cli.spec.js#L25
Expected:
[
{
"check_name": "prettier",
with arg",
"fingerprint": "ea70e2ae0144c16efa5df45bf52a33de",
"location": {
"lines": {
"begin": 3,
"end": 3,
},
"path": "test/__stubs__/dirty-2.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
"description": "Insert ;",
"fingerprint": "d88816112daed6a61fd9d81e964a484b",
"location": {
"lines": {
"begin": 5,
"end": 5,
},
"path": "test/__stubs__/dirty-2.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
{",
"fingerprint": "c38522eb22f56c446d6b78774d940d24",
"location": {
"lines": {
"begin": 3,
"end": 11,
},
"path": "test/__stubs__/dirty.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
",
"fingerprint": "f312c866f5c2332c733d2de24b9efa0f",
"location": {
"lines": {
"begin": 12,
"end": 15,
},
"path": "test/__stubs__/dirty.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
"description":
"SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |"
,
"fingerprint": "2c7e0de9e9eff8b589318b043ed783db",
"location": {
"path": "test/__stubs__/syntax-error.js",
},
"severity": "major",
"type": "issue",
},
]
Received:
[
{
"check_name": "prettier",
with arg",
"fingerprint": "ea70e2ae0144c16efa5df45bf52a33de",
"location": {
"lines": {
"begin": 3,
"end": 3,
},
"path": "test/__stubs__/dirty-2.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
"description": "Insert ;",
"fingerprint": "d88816112daed6a61fd9d81e964a484b",
"location": {
"lines": {
"begin": 5,
"end": 5,
},
"path": "test/__stubs__/dirty-2.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
{",
"fingerprint": "c38522eb22f56c446d6b78774d940d24",
"location": {
"lines": {
"begin": 3,
"end": 11,
},
"path": "test/__stubs__/dirty.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
",
"fingerprint": "f312c866f5c2332c733d2de24b9efa0f",
"location": {
"lines": {
"begin": 12,
"end": 15,
},
"path": "test/__stubs__/dirty.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
"description":
"SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |"
,
"fingerprint": "462882d90971b8c9dcaaa2b4d74d1da6",
"location": {
"path": "test/__stubs__/syntax-error.js",
},
"severity": "major",
"type": "issue",
},
]
at /Users/runner/work/prettier-formatter-gitlab/prettier-formatter-gitlab/test/cli.spec.js:25:21
|
error: expect(received).toMatchSnapshot(expected):
test/cli.spec.js#L39
Expected:
[
{
"check_name": "prettier",
with arg",
"fingerprint": "ea70e2ae0144c16efa5df45bf52a33de",
"location": {
"lines": {
"begin": 3,
"end": 3,
},
"path": "test/__stubs__/dirty-2.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
"description": "Insert ;",
"fingerprint": "d88816112daed6a61fd9d81e964a484b",
"location": {
"lines": {
"begin": 5,
"end": 5,
},
"path": "test/__stubs__/dirty-2.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
{",
"fingerprint": "c38522eb22f56c446d6b78774d940d24",
"location": {
"lines": {
"begin": 3,
"end": 11,
},
"path": "test/__stubs__/dirty.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
",
"fingerprint": "f312c866f5c2332c733d2de24b9efa0f",
"location": {
"lines": {
"begin": 12,
"end": 15,
},
"path": "test/__stubs__/dirty.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
"description":
"SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |"
,
"fingerprint": "2c7e0de9e9eff8b589318b043ed783db",
"location": {
"path": "test/__stubs__/syntax-error.js",
},
"severity": "major",
"type": "issue",
},
]
Received:
[
{
"check_name": "prettier",
with arg",
"fingerprint": "ea70e2ae0144c16efa5df45bf52a33de",
"location": {
"lines": {
"begin": 3,
"end": 3,
},
"path": "test/__stubs__/dirty-2.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
"description": "Insert ;",
"fingerprint": "d88816112daed6a61fd9d81e964a484b",
"location": {
"lines": {
"begin": 5,
"end": 5,
},
"path": "test/__stubs__/dirty-2.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
{",
"fingerprint": "c38522eb22f56c446d6b78774d940d24",
"location": {
"lines": {
"begin": 3,
"end": 11,
},
"path": "test/__stubs__/dirty.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
",
"fingerprint": "f312c866f5c2332c733d2de24b9efa0f",
"location": {
"lines": {
"begin": 12,
"end": 15,
},
"path": "test/__stubs__/dirty.js",
},
"severity": "minor",
"type": "issue",
},
{
"check_name": "prettier",
"description":
"SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |"
,
"fingerprint": "462882d90971b8c9dcaaa2b4d74d1da6",
"location": {
"path": "test/__stubs__/syntax-error.js",
},
"severity": "major",
"type": "issue",
},
]
at /Users/runner/work/prettier-formatter-gitlab/prettier-formatter-gitlab/test/cli.spec.js:39:21
|
error: expect(received).toMatchSnapshot(expected):
test/index.spec.js#L43
Expected:
[
[
"----------------------------------------------------
test/__stubs__/dirty-2.js
----------------------------------------------------
@@ -1,7 +1,7 @@
/* eslint-disable */
- function foo( arg ) {
+ function foo(arg) {
const data = arg.split(',');
- const message = `Cras non justo iaculis, placerat tortor non, venenatis neque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nullam ut neque a justo efficitur tristique. Aliquam consequat convallis sagittis. Curabitur venenatis imperdiet fermentum. Curabitur euismod sit amet mi eu tristique. Phasellus leo nisi, tempor efficitur laoreet vitae, rutrum id justo. Nullam ac mi vehicula, rhoncus turpis a, mattis odio. Donec id condimentum metus. Vivamus posuere libero nec orci volutpat, in euismod dolor ornare. Cras tincidunt gravida ante, sed dictum nulla posuere ut.`
+ const message = `Cras non justo iaculis, placerat tortor non, venenatis neque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nullam ut neque a justo efficitur tristique. Aliquam consequat convallis sagittis. Curabitur venenatis imperdiet fermentum. Curabitur euismod sit amet mi eu tristique. Phasellus leo nisi, tempor efficitur laoreet vitae, rutrum id justo. Nullam ac mi vehicula, rhoncus turpis a, mattis odio. Donec id condimentum metus. Vivamus posuere libero nec orci volutpat, in euismod dolor ornare. Cras tincidunt gravida ante, sed dictum nulla posuere ut.`;
return data;
}
"
,
],
[
"----------------------------------------------------
test/__stubs__/dirty.js
----------------------------------------------------
@@ -1,18 +1,7 @@
/* eslint-disable */
-
-
-
-
-
-
- function foo( arg ) {
+ function foo(arg) {
-
-
const data = arg.split(',');
-
-
-
return data;
}
"
,
],
[
"----------------------------------------------------
test/__stubs__/syntax-error.js
----------------------------------------------------
SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |
"
,
],
[
"----------------------------------------------------
test/__stubs__/syntax-error.js
----------------------------------------------------
SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |
"
,
],
[
"----------------------------------------------------
test/__stubs__/dirty-2.js
----------------------------------------------------
@@ -1,7 +1,7 @@
/* eslint-disable */
- function foo( arg ) {
+ function foo(arg) {
const data = arg.split(',');
- const message = `Cras non justo iaculis, placerat tortor non, venenatis neque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nullam ut neque a justo efficitur tristique. Aliquam consequat convallis sagittis. Curabitur venenatis imperdiet fermentum. Curabitur euismod sit amet mi eu tristique. Phasellus leo nisi, tempor efficitur laoreet vitae, rutrum id justo. Nullam ac mi vehicula, rhoncus turpis a, mattis odio. Donec id condimentum metus. Vivamus posuere libero nec orci volutpat, in euismod dolor ornare. Cras tincidunt gravida ante, sed dictum nulla posuere ut.`
+ const message = `Cras non justo iaculis, placerat tortor non, venenatis neque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nullam ut neque a justo efficitur tristique. Aliquam consequat convallis sagittis. Curabitur venenatis imperdiet fermentum. Curabitur euismod sit amet mi eu tristique. Phasellus leo nisi, tempor efficitur laoreet vitae, rutrum id justo. Nullam ac mi vehicula, rhoncus turpis a, mattis odio. Donec id condimentum metus. Vivamus posuere libero nec orci volutpat, in euismod dolor ornare. Cras tincidunt gravida ante, sed dictum nulla posuere ut.`;
return data;
}
"
,
],
[
"----------------------------------------------------
|
error: expect(received).toMatchSnapshot(expected):
test/formatters/gitlab.spec.js#L15
Expected:
[
{
"check_name": "prettier",
"description":
"SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |"
,
"fingerprint": "50dc01922520899eaa36df763ca05da7",
"location": {
"path": "test/__stubs__/syntax-error.js",
},
"severity": "major",
"type": "issue",
},
]
Received:
[
{
"check_name": "prettier",
"description":
"SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |"
,
"fingerprint": "462882d90971b8c9dcaaa2b4d74d1da6",
"location": {
"path": "test/__stubs__/syntax-error.js",
},
"severity": "major",
"type": "issue",
},
]
at /Users/runner/work/prettier-formatter-gitlab/prettier-formatter-gitlab/test/formatters/gitlab.spec.js:15:21
|
error: expect(received).toMatchSnapshot(expected):
test/formatters/diff.spec.js#L9
Expected:
"----------------------------------------------------
test/__stubs__/dirty.js
----------------------------------------------------
@@ -1,18 +1,7 @@
/* eslint-disable */
-
-
-
-
-
-
- function foo( arg ) {
+ function foo(arg) {
-
-
const data = arg.split(',');
-
-
-
return data;
}
"
Received:
"----------------------------------------------------
test/__stubs__/dirty.js
----------------------------------------------------
@@ -1,18 +1,7 @@
/* eslint-disable */
-
-
-
-
-
-
- function foo( arg ) {
+ function foo(arg) {
-
-
const data = arg.split(',');
-
-
-
return data;
}
"
at /Users/runner/work/prettier-formatter-gitlab/prettier-formatter-gitlab/test/formatters/diff.spec.js:9:32
|
error: expect(received).toMatchSnapshot(expected):
test/formatters/diff.spec.js#L15
Expected:
"----------------------------------------------------
test/__stubs__/syntax-error.js
----------------------------------------------------
SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |
"
Received:
"----------------------------------------------------
test/__stubs__/syntax-error.js
----------------------------------------------------
SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |
"
at /Users/runner/work/prettier-formatter-gitlab/prettier-formatter-gitlab/test/formatters/diff.spec.js:15:32
|
error: expect(received).toMatchSnapshot(expected):
test/utils/get-prettier-file-infos.spec.js#L15
Expected:
{
"error": [SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |],
"filename": "test/__stubs__/syntax-error.js",
}
Received:
{
"error": [SyntaxError: Unexpected token, expected "(" (3:13)
1 | /* eslint-disable */
2 |
> 3 | function foo#####( arg ) {
| ^
4 | return arg;
5 | }
6 |],
"filename": "test/__stubs__/syntax-error.js",
}
at /Users/runner/work/prettier-formatter-gitlab/prettier-formatter-gitlab/test/utils/get-prettier-file-infos.spec.js:15:19
|
unit
Process completed with exit code 1.
|