cover rule visitor's extraneous pick method
This commit is contained in:
parent
79210654f0
commit
4fef163e5b
|
@ -250,6 +250,22 @@ describeLeaks('rule visitor', async () => {
|
||||||
expect(visitStub).to.have.callCount(3);
|
expect(visitStub).to.have.callCount(3);
|
||||||
expect(ctx.errors.length).to.equal(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', () => {
|
describe('create rule sources helper', () => {
|
||||||
|
|
Loading…
Reference in New Issue