test: move mockWarn into setup files

This commit is contained in:
Evan You
2020-07-27 22:58:37 -04:00
parent d4527230e4
commit 5c74243211
35 changed files with 103 additions and 199 deletions

View File

@@ -1,9 +1,7 @@
import { renderSlot } from '../../src/helpers/renderSlot'
import { h } from '../../src/h'
import { mockWarn } from '@vue/shared'
describe('renderSlot', () => {
mockWarn()
it('should render slot', () => {
let child
const vnode = renderSlot(

View File

@@ -12,11 +12,8 @@ import {
Comment,
VNode
} from '@vue/runtime-test'
import { mockWarn } from '@vue/shared'
describe('resolveAssets', () => {
mockWarn()
test('should work', () => {
const FooBar = () => null
const BarBaz = { mounted: () => null }

View File

@@ -1,9 +1,6 @@
import { toHandlers } from '../../src/helpers/toHandlers'
import { mockWarn } from '@vue/shared'
describe('toHandlers', () => {
mockWarn()
it('should not accept non-objects', () => {
toHandlers(null as any)
toHandlers(undefined as any)