Skip to content

Commit cdd849a

Browse files
authored
chore: fix tests (#2120)
1 parent c67e78a commit cdd849a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/compiler-sfc/src/compileScript.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import MagicString from 'magic-string'
22
import { BindingMetadata } from '@vue/compiler-core'
33
import { SFCDescriptor, SFCScriptBlock } from './parse'
4-
import { parse, ParserPlugin, ParserOptions } from '@babel/parser'
4+
import { parse, ParserPlugin } from '@babel/parser'
55
import { babelParserDefaultPlugins, generateCodeFrame } from '@vue/shared'
66
import {
77
Node,

packages/vue/__tests__/index.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('compiler + runtime integration', () => {
2424
mounted: jest.fn(),
2525
activated: jest.fn(),
2626
deactivated: jest.fn(),
27-
destroyed: jest.fn()
27+
unmounted: jest.fn()
2828
}
2929

3030
const toggle = ref(true)
@@ -50,7 +50,7 @@ describe('compiler + runtime integration', () => {
5050
expect(one.mounted).toHaveBeenCalledTimes(1)
5151
expect(one.activated).toHaveBeenCalledTimes(1)
5252
expect(one.deactivated).toHaveBeenCalledTimes(0)
53-
expect(one.destroyed).toHaveBeenCalledTimes(0)
53+
expect(one.unmounted).toHaveBeenCalledTimes(0)
5454

5555
toggle.value = false
5656
await nextTick()
@@ -59,7 +59,7 @@ describe('compiler + runtime integration', () => {
5959
expect(one.mounted).toHaveBeenCalledTimes(1)
6060
expect(one.activated).toHaveBeenCalledTimes(1)
6161
expect(one.deactivated).toHaveBeenCalledTimes(1)
62-
expect(one.destroyed).toHaveBeenCalledTimes(0)
62+
expect(one.unmounted).toHaveBeenCalledTimes(0)
6363

6464
toggle.value = true
6565
await nextTick()
@@ -68,7 +68,7 @@ describe('compiler + runtime integration', () => {
6868
expect(one.mounted).toHaveBeenCalledTimes(1)
6969
expect(one.activated).toHaveBeenCalledTimes(2)
7070
expect(one.deactivated).toHaveBeenCalledTimes(1)
71-
expect(one.destroyed).toHaveBeenCalledTimes(0)
71+
expect(one.unmounted).toHaveBeenCalledTimes(0)
7272
})
7373

7474
it('should support runtime template via CSS ID selector', () => {

0 commit comments

Comments
 (0)