Skip to content

Commit

Permalink
Merge pull request vuelidate#244 from monterail/configurable-props
Browse files Browse the repository at this point in the history
Make proxy properties configurable to allow mock testing (fixes vuelidate#239)
  • Loading branch information
Frizi authored Jan 30, 2018
2 parents efa9c5a + 6bd00eb commit d16f2b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,19 +263,19 @@ const getComponent = (Vue) => {
proxy () {
const keyDefs = buildFromKeys(this.keys, key => ({
enumerable: true,
configurable: false,
configurable: true, // allow mocking lib calls
get: () => this.refProxy(key)
}))

const getterDefs = buildFromKeys(getterNames, key => ({
enumerable: true,
configurable: false,
configurable: true,
get: () => this[key]
}))

const methodDefs = buildFromKeys(methodNames, key => ({
enumerable: false,
configurable: false,
configurable: true,
get: () => this[key]
}))

Expand Down

0 comments on commit d16f2b8

Please sign in to comment.