You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message: 'stream: make null an invalid chunk to write in object mode\n\nthis harmonizes behavior between readable, writable, and transform\nstreams so that they all handle nulls in object mode the same way by\nconsidering them invalid chunks.\n\nPR-URL: https://github.com/nodejs/node/pull/6170\nReviewed-By: James M Snell <jasnell@gmail.com>\nReviewed-By: Matteo Collina <matteo.collina@gmail.com>'
159
+
}
160
+
constinput=JSON.stringify([validCommit])
161
+
162
+
constls=spawn('./bin/cmd.js',['-'])
163
+
letcompiledData=''
164
+
leterrorData=''
165
+
166
+
ls.stdout.on('data',(data)=>{
167
+
compiledData+=data
168
+
})
169
+
170
+
ls.stderr.on('data',(data)=>{
171
+
errorData+=data
172
+
})
173
+
174
+
ls.stdin.write(input)
175
+
ls.stdin.end()
176
+
177
+
ls.on('close',(code)=>{
178
+
tt.equal(code,0,'CLI exits with zero code on success')
t.test('test stdin with invalid commit (missing subsystem)',(tt)=>{
186
+
constinvalidCommit={
187
+
id: 'def456',
188
+
message: 'this is a bad commit message without subsystem\n\nPR-URL: https://github.com/nodejs/node/pull/1234\nReviewed-By: Someone <someone@example.com>'
189
+
}
190
+
constinput=JSON.stringify([invalidCommit])
191
+
192
+
constls=spawn('./bin/cmd.js',['-'])
193
+
letcompiledData=''
194
+
195
+
ls.stdout.on('data',(data)=>{
196
+
compiledData+=data
197
+
})
198
+
199
+
ls.stdin.write(input)
200
+
ls.stdin.end()
201
+
202
+
ls.on('close',(code)=>{
203
+
tt.notEqual(code,0,'CLI exits with non-zero code on failure')
0 commit comments