You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me, that the last version, where the keys option was respected, was in [email protected].
Created a unit test for v3.4.1, that showcases the problem:
import { expect } from 'expect'
import { SimpleSchema } from '../src/SimpleSchema.js'
describe.only('regression', function () {
it('check if applied keys option array is respected', function () {
const targetSchmea = new SimpleSchema({
foo: {
type: String
},
bar: {
type: String
}
})
targetSchmea
.namedContext('testContext')
.validate({ foo: 'bizz' }, { keys: ['foo'] })
// If keys option would be respected, there should not be any validation errors
expect(targetSchmea.namedContext('testContext').validationErrors().length).toBe(0)
})
})