1
0
Fork 0

fix(tests): mock config when listing rules

This commit is contained in:
ssube 2019-11-13 23:27:16 -06:00 committed by Sean Sube
parent 11b3bd0d09
commit c9b6c9fe4e
1 changed files with 14 additions and 1 deletions

View File

@ -11,7 +11,20 @@ describeLeaks('main app', async () => {
});
itLeaks('should list rules and exit', async () => {
const status = await main(['node', 'test', 'list']);
mockFs({
docs: {
'config.yml': 'data: {logger: {level: debug, name: test, stream: !stream stderr}}',
},
});
const status = await main([
'node', 'test', 'list',
'--config-path', 'docs',
'--config-name', 'config.yml',
]);
mockFs.restore();
expect(status).to.equal(STATUS_SUCCESS);
});