Skip to content

Commit

Permalink
test: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Mar 1, 2025
1 parent 4b70ee6 commit 10adfca
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions tests/snapshots/cli.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ Generated by [AVA](https://avajs.dev).
-c, --check Check if files are sorted␊
-q, --quiet Don't output success messages␊
-h, --help Display this help␊
-i, --ignore An array of glob patterns to ignore␊
-v, --version Display the package version␊
--stdin Read package.json from stdin␊
`,
},
Expand All @@ -51,7 +53,9 @@ Generated by [AVA](https://avajs.dev).
-c, --check Check if files are sorted␊
-q, --quiet Don't output success messages␊
-h, --help Display this help␊
-i, --ignore An array of glob patterns to ignore␊
-v, --version Display the package version␊
--stdin Read package.json from stdin␊
`,
},
Expand All @@ -77,7 +81,9 @@ Generated by [AVA](https://avajs.dev).
-c, --check Check if files are sorted␊
-q, --quiet Don't output success messages␊
-h, --help Display this help␊
-i, --ignore An array of glob patterns to ignore␊
-v, --version Display the package version␊
--stdin Read package.json from stdin␊
`,
},
Expand All @@ -104,7 +110,9 @@ Generated by [AVA](https://avajs.dev).
-c, --check Check if files are sorted␊
-q, --quiet Don't output success messages␊
-h, --help Display this help␊
-i, --ignore An array of glob patterns to ignore␊
-v, --version Display the package version␊
--stdin Read package.json from stdin␊
`,
},
Expand Down Expand Up @@ -201,7 +209,9 @@ Generated by [AVA](https://avajs.dev).
-c, --check Check if files are sorted␊
-q, --quiet Don't output success messages␊
-h, --help Display this help␊
-i, --ignore An array of glob patterns to ignore␊
-v, --version Display the package version␊
--stdin Read package.json from stdin␊
`,
},
Expand Down Expand Up @@ -1518,3 +1528,60 @@ Generated by [AVA](https://avajs.dev).
stdout: '',
},
}

## run `cli --stdin` with input from stdin

> Should output sorted json
{
args: [
'--stdin',
],
fixtures: [],
result: {
errorCode: null,
stderr: '',
stdout: `{␊
"name": "Name",␊
"description": "Description"␊
}␊
`,
},
}

## run `cli --stdin` with input from stdin with \r\n

> The line feed should be CRLF in output
{
args: [
'--stdin',
],
fixtures: [],
result: {
errorCode: null,
stderr: '',
stdout: `{␍␊
"name": "Name",␍␊
"description": "Description"␍␊
}␍␊
`,
},
}

## run `cli --ignore=abc`

> Should not fail on adding ignore pattern
{
args: [
'--ignore=abc',
],
fixtures: [],
result: {
errorCode: 2,
stderr: `No matching files.␊
`,
stdout: '',
},
}

0 comments on commit 10adfca

Please sign in to comment.