test: move mockWarn into setup files
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils'
|
||||
import path from 'path'
|
||||
import { mockWarn } from '@vue/shared'
|
||||
import { h, createApp, Transition } from 'vue'
|
||||
|
||||
describe('e2e: Transition', () => {
|
||||
mockWarn()
|
||||
const {
|
||||
page,
|
||||
html,
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { E2E_TIMEOUT, setupPuppeteer } from './e2eUtils'
|
||||
import path from 'path'
|
||||
import { mockWarn } from '@vue/shared'
|
||||
import { createApp, ref } from 'vue'
|
||||
|
||||
describe('e2e: TransitionGroup', () => {
|
||||
mockWarn()
|
||||
const { page, html, nextFrame, timeout } = setupPuppeteer()
|
||||
const baseUrl = `file://${path.resolve(__dirname, './transition.html')}`
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { createApp, ref, nextTick } from '../src'
|
||||
import { mockWarn } from '@vue/shared'
|
||||
|
||||
describe('compiler + runtime integration', () => {
|
||||
mockWarn()
|
||||
|
||||
it('should support runtime template compilation', () => {
|
||||
const container = document.createElement('div')
|
||||
const App = {
|
||||
@@ -55,7 +52,7 @@ describe('compiler + runtime integration', () => {
|
||||
expect(one.deactivated).toHaveBeenCalledTimes(0)
|
||||
expect(one.destroyed).toHaveBeenCalledTimes(0)
|
||||
|
||||
toggle.value = false;
|
||||
toggle.value = false
|
||||
await nextTick()
|
||||
expect(container.innerHTML).toBe(`<!--v-if-->`)
|
||||
expect(one.created).toHaveBeenCalledTimes(1)
|
||||
@@ -64,7 +61,7 @@ describe('compiler + runtime integration', () => {
|
||||
expect(one.deactivated).toHaveBeenCalledTimes(1)
|
||||
expect(one.destroyed).toHaveBeenCalledTimes(0)
|
||||
|
||||
toggle.value = true;
|
||||
toggle.value = true
|
||||
await nextTick()
|
||||
expect(container.innerHTML).toBe(`one`)
|
||||
expect(one.created).toHaveBeenCalledTimes(1)
|
||||
|
||||
Reference in New Issue
Block a user