Skip to content

Commit 10adfca

Browse files
committed
test: update snapshots
1 parent 4b70ee6 commit 10adfca

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

tests/snapshots/cli.js.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ Generated by [AVA](https://avajs.dev).
2424
-c, --check Check if files are sorted␊
2525
-q, --quiet Don't output success messages␊
2626
-h, --help Display this help␊
27+
-i, --ignore An array of glob patterns to ignore␊
2728
-v, --version Display the package version␊
29+
--stdin Read package.json from stdin␊
2830
2931
`,
3032
},
@@ -51,7 +53,9 @@ Generated by [AVA](https://avajs.dev).
5153
-c, --check Check if files are sorted␊
5254
-q, --quiet Don't output success messages␊
5355
-h, --help Display this help␊
56+
-i, --ignore An array of glob patterns to ignore␊
5457
-v, --version Display the package version␊
58+
--stdin Read package.json from stdin␊
5559
5660
`,
5761
},
@@ -77,7 +81,9 @@ Generated by [AVA](https://avajs.dev).
7781
-c, --check Check if files are sorted␊
7882
-q, --quiet Don't output success messages␊
7983
-h, --help Display this help␊
84+
-i, --ignore An array of glob patterns to ignore␊
8085
-v, --version Display the package version␊
86+
--stdin Read package.json from stdin␊
8187
8288
`,
8389
},
@@ -104,7 +110,9 @@ Generated by [AVA](https://avajs.dev).
104110
-c, --check Check if files are sorted␊
105111
-q, --quiet Don't output success messages␊
106112
-h, --help Display this help␊
113+
-i, --ignore An array of glob patterns to ignore␊
107114
-v, --version Display the package version␊
115+
--stdin Read package.json from stdin␊
108116
109117
`,
110118
},
@@ -201,7 +209,9 @@ Generated by [AVA](https://avajs.dev).
201209
-c, --check Check if files are sorted␊
202210
-q, --quiet Don't output success messages␊
203211
-h, --help Display this help␊
212+
-i, --ignore An array of glob patterns to ignore␊
204213
-v, --version Display the package version␊
214+
--stdin Read package.json from stdin␊
205215
206216
`,
207217
},
@@ -1518,3 +1528,60 @@ Generated by [AVA](https://avajs.dev).
15181528
stdout: '',
15191529
},
15201530
}
1531+
1532+
## run `cli --stdin` with input from stdin
1533+
1534+
> Should output sorted json
1535+
1536+
{
1537+
args: [
1538+
'--stdin',
1539+
],
1540+
fixtures: [],
1541+
result: {
1542+
errorCode: null,
1543+
stderr: '',
1544+
stdout: `{␊
1545+
"name": "Name",␊
1546+
"description": "Description"␊
1547+
}␊
1548+
`,
1549+
},
1550+
}
1551+
1552+
## run `cli --stdin` with input from stdin with \r\n
1553+
1554+
> The line feed should be CRLF in output
1555+
1556+
{
1557+
args: [
1558+
'--stdin',
1559+
],
1560+
fixtures: [],
1561+
result: {
1562+
errorCode: null,
1563+
stderr: '',
1564+
stdout: `{␍␊
1565+
"name": "Name",␍␊
1566+
"description": "Description"␍␊
1567+
}␍␊
1568+
`,
1569+
},
1570+
}
1571+
1572+
## run `cli --ignore=abc`
1573+
1574+
> Should not fail on adding ignore pattern
1575+
1576+
{
1577+
args: [
1578+
'--ignore=abc',
1579+
],
1580+
fixtures: [],
1581+
result: {
1582+
errorCode: 2,
1583+
stderr: `No matching files.␊
1584+
`,
1585+
stdout: '',
1586+
},
1587+
}

0 commit comments

Comments
 (0)