Skip to content

Commit b65792d

Browse files
authored
Update table-tbody-row-events.spec.js
1 parent 45b5c2c commit b65792d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/components/table/table-tbody-row-events.spec.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Table from './table'
22
import { mount } from '@vue/test-utils'
3+
import Vue from 'vue'
34

45
const testItems = [{ a: 1, b: 2, c: 3 }, { a: 5, b: 5, c: 6 }, { a: 7, b: 8, c: 9 }]
56
const testFields = ['a', 'b', 'c']
@@ -286,11 +287,12 @@ describe('table tbody row events', () => {
286287
/* we just use a single row for testing */
287288
items: [testItems[0]]
288289
},
289-
scopedSlots: {
290-
a: '<div slot-scope="props"><button id="a">button {{ props.value }}</button></div>',
291-
b: '<div slot-scope="props"><input id="b" :name="props.value"/></div>',
292-
c: '<div slot-scope="props"><a href="#" id="c">link {{ props.value }}</a></div>',
293-
d: '<div slot-scope="props"><div class="dropdown-menu"><div id="d" class="dropdown-item">dropdown {{ props.value }}</div></div></div>'
290+
slots: {
291+
// in Vue 2.6x, slots get translated into scopedSlots
292+
a: '<button id="a">button {{ props.value }}</button>',
293+
b: '<input id="b" :name="props.value"/>',
294+
c: '<a href="#" id="c">link {{ props.value }}</a>',
295+
d: '<div class="dropdown-menu"><div id="d" class="dropdown-item">dropdown</div></div>'
294296
}
295297
})
296298
expect(wrapper).toBeDefined()

0 commit comments

Comments
 (0)