🌐 AI搜索 & 代理 主页
Skip to content

Commit b5d6d3a

Browse files
authored
Update table-provider.spec.js
1 parent 439eb93 commit b5d6d3a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/table/table-provider.spec.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,12 @@ describe('table > provider functions', () => {
323323
return testItems.slice()
324324
}
325325
const App = {
326-
data() {
326+
data {
327327
// We use `this.$data` to get around a "bug" in Vue test utils that
328328
// doesn't let us change a child property in an object and update
329329
//that prop with the same object reference
330330
// https://forum.vuejs.org/t/vue-test-utils-watchers-on-object-properties-not-triggered/50900/11?u=tmorehouse
331-
return {
332-
a: '123'
333-
}
331+
a: '123'
334332
},
335333
render(h) {
336334
h(BTable, { props: { filter: this.$data, items: provider } })
@@ -342,6 +340,9 @@ describe('table > provider functions', () => {
342340
await waitNT(wrapper.vm)
343341
await waitNT(wrapper.vm)
344342
await waitNT(wrapper.vm)
343+
expect(wrapper.$data).toEqual({
344+
a: '123'
345+
})
345346

346347
expect(lastProviderContext.filter).toEqual({
347348
a: '123'

0 commit comments

Comments
 (0)