@@ -24,7 +24,9 @@ Generated by [AVA](https://avajs.dev).
24
24
-c, --check Check if files are sorted␊
25
25
-q, --quiet Don't output success messages␊
26
26
-h, --help Display this help␊
27
+ -i, --ignore An array of glob patterns to ignore␊
27
28
-v, --version Display the package version␊
29
+ --stdin Read package.json from stdin␊
28
30
␊
29
31
`,
30
32
},
@@ -51,7 +53,9 @@ Generated by [AVA](https://avajs.dev).
51
53
-c, --check Check if files are sorted␊
52
54
-q, --quiet Don't output success messages␊
53
55
-h, --help Display this help␊
56
+ -i, --ignore An array of glob patterns to ignore␊
54
57
-v, --version Display the package version␊
58
+ --stdin Read package.json from stdin␊
55
59
␊
56
60
`,
57
61
},
@@ -77,7 +81,9 @@ Generated by [AVA](https://avajs.dev).
77
81
-c, --check Check if files are sorted␊
78
82
-q, --quiet Don't output success messages␊
79
83
-h, --help Display this help␊
84
+ -i, --ignore An array of glob patterns to ignore␊
80
85
-v, --version Display the package version␊
86
+ --stdin Read package.json from stdin␊
81
87
␊
82
88
`,
83
89
},
@@ -104,7 +110,9 @@ Generated by [AVA](https://avajs.dev).
104
110
-c, --check Check if files are sorted␊
105
111
-q, --quiet Don't output success messages␊
106
112
-h, --help Display this help␊
113
+ -i, --ignore An array of glob patterns to ignore␊
107
114
-v, --version Display the package version␊
115
+ --stdin Read package.json from stdin␊
108
116
␊
109
117
`,
110
118
},
@@ -201,7 +209,9 @@ Generated by [AVA](https://avajs.dev).
201
209
-c, --check Check if files are sorted␊
202
210
-q, --quiet Don't output success messages␊
203
211
-h, --help Display this help␊
212
+ -i, --ignore An array of glob patterns to ignore␊
204
213
-v, --version Display the package version␊
214
+ --stdin Read package.json from stdin␊
205
215
␊
206
216
`,
207
217
},
@@ -1518,3 +1528,60 @@ Generated by [AVA](https://avajs.dev).
1518
1528
stdout: '',
1519
1529
},
1520
1530
}
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