Bläddra i källkod

test: fix tests in IE/Edge

Evan You 7 år sedan
förälder
incheckning
8cb2069aa4

+ 1 - 1
test/unit/features/component/component-scoped-slot.spec.js

@@ -458,7 +458,7 @@ describe('Component scoped slot', () => {
   // new in 2.6, unifying all slots as functions
   it('non-scoped slots should also be available on $scopedSlots', () => {
     const vm = new Vue({
-      template: `<foo>before <div slot="bar" slot-scope="{ msg }">{{ msg }}</div> after</foo>`,
+      template: `<foo>before <div slot="bar" slot-scope="scope">{{ scope.msg }}</div> after</foo>`,
       components: {
         foo: {
           render(h) {

+ 3 - 3
test/unit/features/instance/properties.spec.js

@@ -149,15 +149,15 @@ describe('Instance properties', () => {
   // #6263
   it('$attrs should not be undefined when no props passed in', () => {
     const vm = new Vue({
-      template: `<foo/>`,
+      template: `<foo ref="foo" />`,
       data: { foo: 'foo' },
       components: {
         foo: {
-          template: `<div>{{ this.foo }}</div>`
+          template: `<div>foo</div>`
         }
       }
     }).$mount()
-    expect(vm.$attrs).toBeDefined()
+    expect(vm.$refs.foo.$attrs).toBeDefined()
   })
 
   it('warn mutating $attrs', () => {