|
|
@@ -660,6 +660,22 @@ if (_.inBrowser) {
|
|
|
expect(hasWarned(_, 'It seems you are using two-way binding')).toBe(true)
|
|
|
})
|
|
|
|
|
|
+ it('warn filters that return non-Array values', function () {
|
|
|
+ new Vue({
|
|
|
+ el: el,
|
|
|
+ template: '<div v-for="item in items | test"></div>',
|
|
|
+ data: {
|
|
|
+ items: []
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ test: function (val) {
|
|
|
+ return {}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ expect(hasWarned(_, 'should always return Arrays')).toBe(true)
|
|
|
+ })
|
|
|
+
|
|
|
it('nested track by', function (done) {
|
|
|
var vm = new Vue({
|
|
|
el: el,
|