Skip to content

Commit

Permalink
fix(tests): mock config when listing rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Nov 16, 2019
1 parent 11b3bd0 commit c9b6c9f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/TestApp.ts
Expand Up @@ -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);
});

Expand Down

0 comments on commit c9b6c9f

Please sign in to comment.