fix(runtime-core): allow overriding properties other than props (#3105)
This is useful for testing, as Jest can't spy on an object without `hasOwnProperty`. VTU can add it, but this commit is needed first.
This commit is contained in:
@@ -295,6 +295,10 @@ describe('component props', () => {
|
||||
;(instance!.proxy as any).foo = 2
|
||||
}).toThrow(TypeError)
|
||||
expect(`Attempting to mutate prop "foo"`).toHaveBeenWarned()
|
||||
// should not throw when overriding properties other than props
|
||||
expect(() => {
|
||||
;(instance!.proxy as any).hasOwnProperty = () => {}
|
||||
}).not.toThrow(TypeError)
|
||||
})
|
||||
|
||||
test('merging props from mixins and extends', () => {
|
||||
|
||||
Reference in New Issue
Block a user