Skip to content

Commit

Permalink
test: support for node 12&14 in error test
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondill committed Jan 30, 2023
1 parent aae2cdb commit 5bc8c51
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion tests/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ test('run `cli --check` on duplicate patterns without TTY', macro.testCLI, {
isTerminal: { stderr: false, stdout: false },
})

const badFormat = `{`
const badFormat = ''

test('run `cli --check` on 1 non-json file', macro.testCLI, {
fixtures: [
Expand Down
32 changes: 16 additions & 16 deletions tests/snapshots/cli.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -1848,9 +1848,9 @@ Generated by [AVA](https://avajs.dev).
],
fixtures: [
{
expect: '{',
expect: '',
file: 'notJson/package.json',
original: '{',
original: '',
},
],
isTerminal: {
Expand All @@ -1860,7 +1860,7 @@ Generated by [AVA](https://avajs.dev).
result: {
errorCode: 1,
stderr: `could not check notJson/package.json␊
Expected property name or '}' in JSON at position 1
Unexpected end of JSON input
`,
stdout: `␊
1 of 1 matched file is not sorted.␊
Expand All @@ -1880,9 +1880,9 @@ Generated by [AVA](https://avajs.dev).
],
fixtures: [
{
expect: '{',
expect: '',
file: 'notJson/package.json',
original: '{',
original: '',
},
],
isTerminal: {
Expand All @@ -1892,7 +1892,7 @@ Generated by [AVA](https://avajs.dev).
result: {
errorCode: 1,
stderr: `could not check notJson/package.json␊
Expected property name or '}' in JSON at position 1
Unexpected end of JSON input
`,
stdout: '',
},
Expand All @@ -1909,9 +1909,9 @@ Generated by [AVA](https://avajs.dev).
],
fixtures: [
{
expect: '{',
expect: '',
file: 'notJson/package.json',
original: '{',
original: '',
},
],
isTerminal: {
Expand All @@ -1936,9 +1936,9 @@ Generated by [AVA](https://avajs.dev).
],
fixtures: [
{
expect: '{',
expect: '',
file: 'notJson/package.json',
original: '{',
original: '',
},
],
isTerminal: {
Expand All @@ -1948,7 +1948,7 @@ Generated by [AVA](https://avajs.dev).
result: {
errorCode: 1,
stderr: `could not sort notJson/package.json␊
Expected property name or '}' in JSON at position 1
Unexpected end of JSON input
`,
stdout: '',
},
Expand All @@ -1965,9 +1965,9 @@ Generated by [AVA](https://avajs.dev).
],
fixtures: [
{
expect: '{',
expect: '',
file: 'notJson/package.json',
original: '{',
original: '',
},
],
isTerminal: {
Expand All @@ -1977,7 +1977,7 @@ Generated by [AVA](https://avajs.dev).
result: {
errorCode: 1,
stderr: `could not sort notJson/package.json␊
Expected property name or '}' in JSON at position 1
Unexpected end of JSON input
`,
stdout: '',
},
Expand All @@ -1993,9 +1993,9 @@ Generated by [AVA](https://avajs.dev).
],
fixtures: [
{
expect: '{',
expect: '',
file: 'notJson/package.json',
original: '{',
original: '',
},
],
isTerminal: {
Expand Down
Binary file modified tests/snapshots/cli.js.snap
Binary file not shown.

0 comments on commit 5bc8c51

Please sign in to comment.