feat: add --resursive and --ignore options (#24)
`--resursive`: Create/update index files recursively. Halts on any unsafe "index.js" files. `--ignore-unsafe`: Ignores unsafe "index.js" files instead of halting.
This commit is contained in:
committed by
Gajus Kuizinas
parent
2450b7202e
commit
219f546c67
@@ -43,5 +43,10 @@ describe('validateTargetDirectory()', () => {
|
||||
}).to.throw(Error, '"' + path.resolve(fixturesPath, 'unsafe-index/index.js') + '" unsafe index.');
|
||||
});
|
||||
});
|
||||
context('unsafe ignored', () => {
|
||||
it('returns false', () => {
|
||||
expect(validateTargetDirectory(path.resolve(fixturesPath, 'unsafe-index'), {silent: true})).to.equal(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user