feat(sfc): add defineEmits and deprecate defineEmit (#3725)
This commit is contained in:
committed by
GitHub
parent
6b6d566861
commit
a137da8a9f
@@ -5,15 +5,15 @@ import {
|
||||
render,
|
||||
SetupContext
|
||||
} from '@vue/runtime-test'
|
||||
import { defineEmit, defineProps, useContext } from '../src/apiSetupHelpers'
|
||||
import { defineEmits, defineProps, useContext } from '../src/apiSetupHelpers'
|
||||
|
||||
describe('SFC <script setup> helpers', () => {
|
||||
test('should warn runtime usage', () => {
|
||||
defineProps()
|
||||
expect(`defineProps() is a compiler-hint`).toHaveBeenWarned()
|
||||
|
||||
defineEmit()
|
||||
expect(`defineEmit() is a compiler-hint`).toHaveBeenWarned()
|
||||
defineEmits()
|
||||
expect(`defineEmits() is a compiler-hint`).toHaveBeenWarned()
|
||||
})
|
||||
|
||||
test('useContext (no args)', () => {
|
||||
|
||||
Reference in New Issue
Block a user