Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9ec5cd3

Browse filesBrowse files
committed
improve test for (index,val) syntax
1 parent b57cdf2 commit 9ec5cd3
Copy full SHA for 9ec5cd3

File tree

1 file changed

+5
-5
lines changed
Filter options

1 file changed

+5
-5
lines changed

‎test/unit/specs/directives/public/for/for_spec.js

Copy file name to clipboardExpand all lines: test/unit/specs/directives/public/for/for_spec.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,15 +609,15 @@ if (_.inBrowser) {
609609
assertObjectMutations(vm, el, done)
610610
})
611611

612-
it('key val syntax with array', function () {
613-
new Vue({
612+
it('key val syntax with array', function (done) {
613+
var vm = new Vue({
614614
el: el,
615-
template: '<div v-for="(ind,val) in items">{{ind}} {{val}}</div>',
615+
template: '<div v-for="(i, item) in items">{{i}} {{item.a}}</div>',
616616
data: {
617-
items: ['x', 'y']
617+
items: [{a: 1}, {a: 2}]
618618
}
619619
})
620-
expect(el.innerHTML).toBe('<div>0 x</div><div>1 y</div>')
620+
assertMutations(vm, el, done)
621621
})
622622

623623
it('key val syntax with nested v-for s', function () {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.