Skip to content

Commit 2569890

Browse files
committed
refactor: move mockWarn utility to @vue/shared
close #652
1 parent 95a8beb commit 2569890

20 files changed

+24
-26
lines changed

packages/compiler-sfc/__tests__/compileStyle.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { compileStyle } from '../src/compileStyle'
2-
import { mockWarn } from '@vue/runtime-test'
2+
import { mockWarn } from '@vue/shared'
33

44
function compile(source: string): string {
55
const res = compileStyle({

packages/compiler-sfc/__tests__/parse.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src'
2-
import { mockWarn } from '@vue/runtime-test'
2+
import { mockWarn } from '@vue/shared'
33
import { baseParse, baseCompile } from '@vue/compiler-core'
44

55
describe('compiler:sfc', () => {

packages/reactivity/__tests__/computed.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
ref,
77
WritableComputedRef
88
} from '../src'
9-
import { mockWarn } from '@vue/runtime-test'
9+
import { mockWarn } from '@vue/shared'
1010

1111
describe('reactivity/computed', () => {
1212
mockWarn()

packages/reactivity/__tests__/reactive.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ref, isRef } from '../src/ref'
22
import { reactive, isReactive, toRaw, markNonReactive } from '../src/reactive'
3-
import { mockWarn } from '@vue/runtime-test'
3+
import { mockWarn } from '@vue/shared'
44
import { computed } from '../src/computed'
55

66
describe('reactivity/reactive', () => {

packages/reactivity/__tests__/readonly.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
ref,
1313
shallowReadonly
1414
} from '../src'
15-
import { mockWarn } from '@vue/runtime-test'
15+
import { mockWarn } from '@vue/shared'
1616

1717
/**
1818
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html

packages/runtime-core/__tests__/apiApp.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
h,
44
nodeOps,
55
serializeInner,
6-
mockWarn,
76
provide,
87
inject,
98
resolveComponent,
@@ -13,6 +12,7 @@ import {
1312
ref,
1413
getCurrentInstance
1514
} from '@vue/runtime-test'
15+
import { mockWarn } from '@vue/shared'
1616

1717
describe('api: createApp', () => {
1818
mockWarn()

packages/runtime-core/__tests__/apiInject.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
readonly,
1010
reactive
1111
} from '../src/index'
12-
import { render, nodeOps, serialize, mockWarn } from '@vue/runtime-test'
12+
import { render, nodeOps, serialize } from '@vue/runtime-test'
13+
import { mockWarn } from '@vue/shared'
1314

1415
// reference: https://vue-composition-api-rfc.netlify.com/api.html#provide-inject
1516

packages/runtime-core/__tests__/apiOptions.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import {
88
nextTick,
99
renderToString,
1010
ref,
11-
defineComponent,
12-
mockWarn
11+
defineComponent
1312
} from '@vue/runtime-test'
13+
import { mockWarn } from '@vue/shared'
1414

1515
describe('api: options', () => {
1616
test('data', async () => {

packages/runtime-core/__tests__/apiWatch.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { watch, reactive, computed, nextTick, ref, h } from '../src/index'
2-
import { render, nodeOps, serializeInner, mockWarn } from '@vue/runtime-test'
2+
import { render, nodeOps, serializeInner } from '@vue/runtime-test'
33
import {
44
ITERATE_KEY,
55
DebuggerEvent,
66
TrackOpTypes,
77
TriggerOpTypes
88
} from '@vue/reactivity'
9+
import { mockWarn } from '@vue/shared'
910

1011
// reference: https://vue-composition-api-rfc.netlify.com/api.html#watch
1112

packages/runtime-core/__tests__/componentProxy.spec.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import {
2-
createApp,
3-
getCurrentInstance,
4-
nodeOps,
5-
mockWarn
6-
} from '@vue/runtime-test'
1+
import { createApp, getCurrentInstance, nodeOps } from '@vue/runtime-test'
2+
import { mockWarn } from '@vue/shared'
73
import { ComponentInternalInstance } from '../src/component'
84

95
describe('component: proxy', () => {

0 commit comments

Comments
 (0)