"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/unit/features/v3/reactivity/readonly.spec.ts" between
vue-2.7.13.tar.gz and vue-2.7.14.tar.gz

About: Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

readonly.spec.ts  (vue-2.7.13):readonly.spec.ts  (vue-2.7.14)
skipping to change at line 529 skipping to change at line 529
const foo = new Foo() const foo = new Foo()
const readonlyFoo = readonly(foo) const readonlyFoo = readonly(foo)
readonlyFoo.log() readonlyFoo.log()
expect(spy).toHaveBeenCalledWith(1) expect(spy).toHaveBeenCalledWith(1)
readonlyFoo.change() readonlyFoo.change()
expect(readonlyFoo.x).toBe(1) expect(readonlyFoo.x).toBe(1)
expect(`et operation on key "x" failed`).toHaveBeenWarned() expect(`et operation on key "x" failed`).toHaveBeenWarned()
}) })
test('compatibility with non-extensible objects', () => { test('warn non-extensible objects', () => {
const foo = Object.freeze({ a: 1 }) const foo = Object.freeze({ a: 1 })
const bar = readonly(foo) try {
expect(isReadonly(bar)).toBe(true) readonly(foo)
expect(readonly(foo)).toBe(bar) } catch (e) {}
expect(
`Vue 2 does not support creating readonly proxy for non-extensible object`
).toHaveBeenWarned()
}) })
}) })
 End of changes. 2 change blocks. 
4 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)