test: move mockWarn into setup files
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
import { reactive, effect, toRaw, isReactive } from '../../src'
|
||||
import { mockWarn } from '@vue/shared'
|
||||
|
||||
describe('reactivity/collections', () => {
|
||||
describe('Map', () => {
|
||||
mockWarn()
|
||||
|
||||
test('instanceof', () => {
|
||||
const original = new Map()
|
||||
const observed = reactive(original)
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import { reactive, effect, isReactive, toRaw } from '../../src'
|
||||
import { mockWarn } from '@vue/shared'
|
||||
|
||||
describe('reactivity/collections', () => {
|
||||
describe('Set', () => {
|
||||
mockWarn()
|
||||
|
||||
it('instanceof', () => {
|
||||
const original = new Set()
|
||||
const observed = reactive(original)
|
||||
|
||||
@@ -7,11 +7,8 @@ import {
|
||||
WritableComputedRef,
|
||||
isReadonly
|
||||
} from '../src'
|
||||
import { mockWarn } from '@vue/shared'
|
||||
|
||||
describe('reactivity/computed', () => {
|
||||
mockWarn()
|
||||
|
||||
it('should return updated value', () => {
|
||||
const value = reactive<{ foo?: number }>({})
|
||||
const cValue = computed(() => value.foo)
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import { ref, isRef } from '../src/ref'
|
||||
import { reactive, isReactive, toRaw, markRaw } from '../src/reactive'
|
||||
import { mockWarn } from '@vue/shared'
|
||||
import { computed } from '../src/computed'
|
||||
|
||||
describe('reactivity/reactive', () => {
|
||||
mockWarn()
|
||||
|
||||
test('Object', () => {
|
||||
const original = { foo: 1 }
|
||||
const observed = reactive(original)
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
shallowReadonly,
|
||||
isProxy
|
||||
} from '../src'
|
||||
import { mockWarn } from '@vue/shared'
|
||||
|
||||
/**
|
||||
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html
|
||||
@@ -18,8 +17,6 @@ import { mockWarn } from '@vue/shared'
|
||||
type Writable<T> = { -readonly [P in keyof T]: T[P] }
|
||||
|
||||
describe('reactivity/readonly', () => {
|
||||
mockWarn()
|
||||
|
||||
describe('Object', () => {
|
||||
it('should make nested values readonly', () => {
|
||||
const original = { foo: 1, bar: { baz: 2 } }
|
||||
|
||||
Reference in New Issue
Block a user