1
0
Fork 0

cover rule visitor's extraneous pick method

This commit is contained in:
ssube 2019-11-15 19:25:29 -06:00 committed by Sean Sube
parent 79210654f0
commit 4fef163e5b
1 changed files with 16 additions and 0 deletions

View File

@ -250,6 +250,22 @@ describeLeaks('rule visitor', async () => {
expect(visitStub).to.have.callCount(3);
expect(ctx.errors.length).to.equal(3);
});
itLeaks('should not pick items', async () => {
const ctx = new VisitorContext({
logger: NullLogger.global,
schemaOptions: {
coerce: false,
defaults: false,
mutate: false,
},
});
const visitor = new RuleVisitor({
rules: [],
});
return expect(visitor.pick(ctx, {})).to.eventually.deep.equal([]);
});
});
describe('create rule sources helper', () => {