fix(tests): mock config when listing rules
This commit is contained in:
parent
11b3bd0d09
commit
c9b6c9fe4e
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue