]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix tests (#2120)
authorJonathan Wood <bamblehorse@gmail.com>
Tue, 15 Sep 2020 13:36:27 +0000 (14:36 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Sep 2020 13:36:27 +0000 (09:36 -0400)
packages/compiler-sfc/src/compileScript.ts
packages/vue/__tests__/index.spec.ts

index 45b754123fdaa3b7733a9daf0809a7a51b55887b..ed0911014ecf72ce30893f9a25d6e8f6338f7a21 100644 (file)
@@ -1,7 +1,7 @@
 import MagicString from 'magic-string'
 import { BindingMetadata } from '@vue/compiler-core'
 import { SFCDescriptor, SFCScriptBlock } from './parse'
-import { parse, ParserPlugin, ParserOptions } from '@babel/parser'
+import { parse, ParserPlugin } from '@babel/parser'
 import { babelParserDefaultPlugins, generateCodeFrame } from '@vue/shared'
 import {
   Node,
index 2de237e2a1baaf96aec8dc62de3338fe679d8c82..18c1c182e5a55c0554db060a6416a9ca4d17f18d 100644 (file)
@@ -24,7 +24,7 @@ describe('compiler + runtime integration', () => {
       mounted: jest.fn(),
       activated: jest.fn(),
       deactivated: jest.fn(),
-      destroyed: jest.fn()
+      unmounted: jest.fn()
     }
 
     const toggle = ref(true)
@@ -50,7 +50,7 @@ describe('compiler + runtime integration', () => {
     expect(one.mounted).toHaveBeenCalledTimes(1)
     expect(one.activated).toHaveBeenCalledTimes(1)
     expect(one.deactivated).toHaveBeenCalledTimes(0)
-    expect(one.destroyed).toHaveBeenCalledTimes(0)
+    expect(one.unmounted).toHaveBeenCalledTimes(0)
 
     toggle.value = false
     await nextTick()
@@ -59,7 +59,7 @@ describe('compiler + runtime integration', () => {
     expect(one.mounted).toHaveBeenCalledTimes(1)
     expect(one.activated).toHaveBeenCalledTimes(1)
     expect(one.deactivated).toHaveBeenCalledTimes(1)
-    expect(one.destroyed).toHaveBeenCalledTimes(0)
+    expect(one.unmounted).toHaveBeenCalledTimes(0)
 
     toggle.value = true
     await nextTick()
@@ -68,7 +68,7 @@ describe('compiler + runtime integration', () => {
     expect(one.mounted).toHaveBeenCalledTimes(1)
     expect(one.activated).toHaveBeenCalledTimes(2)
     expect(one.deactivated).toHaveBeenCalledTimes(1)
-    expect(one.destroyed).toHaveBeenCalledTimes(0)
+    expect(one.unmounted).toHaveBeenCalledTimes(0)
   })
 
   it('should support runtime template via CSS ID selector', () => {