Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cp.on('close', function (exitCode) {
cb(exitCode, eol_1.split(strip_ansi_1["default"](chunks)));
});
}
testCli(['salesforce-apex.cls'], ['--associate-parser', '.cls,defaultParser'], function (exitCode, log) {
should.exist(exitCode);
should.exist(log);
exitCode.should.equal(1);
log.should.eql([
'',
'tests/fixtures/salesforce-apex.cls',
' line 4 TODO Add detail',
' line 7 FIXME do something with the file contents',
'',
' ' + strip_ansi_1["default"](logSymbols.error) + ' 2 todos/fixmes found',
'',
]);
callback();
});
});
testCli(['no-todos.js'], null, function (exitCode, log) {
should.exist(log);
should.exist(exitCode);
exitCode.should.equal(0);
log.should.eql(['', '', ' ' + strip_ansi_1["default"](logSymbols.success) + ' No todos/fixmes found', '']);
callback();
});
});
testCli(['file.unsupported'], [], function (exitCode, log) {
should.exist(exitCode);
should.exist(log);
exitCode.should.equal(1);
log.should.eql([strip_ansi_1["default"](logSymbols.error) + ' Filetype .unsupported is unsupported.', '']);
callback();
});
});
testCli(['*.impossible'], null, function (exitCode, log) {
should.exist(log);
should.exist(exitCode);
exitCode.should.equal(1);
log.should.eql([strip_ansi_1["default"](logSymbols.warning) + ' No files found for parsing', '']);
callback();
});
});