chore: fix typos (#1090)

This commit is contained in:
HiiTea
2020-05-01 21:42:58 +08:00
committed by GitHub
parent a6a939f5e0
commit 22717772dd
25 changed files with 42 additions and 42 deletions

View File

@@ -664,7 +664,7 @@ describe('BaseTransition', () => {
expect(props.onAfterEnter).toHaveBeenCalledTimes(1)
assertCalledWithEl(props.onAfterEnter, falseSerialized)
// toggele again
// toggle again
toggle.value = true
await nextTick()
expect(serializeInner(root)).toBe(`${falseSerialized}<!---->`)
@@ -740,7 +740,7 @@ describe('BaseTransition', () => {
await nextTick()
// expected behavior: the previous true branch is preserved,
// and a placeholder is injected for the replacement.
// the leaving node is repalced with the replace node (of the same branch)
// the leaving node is replaced with the replace node (of the same branch)
// when it finishes leaving
expect(serializeInner(root)).toBe(`${trueSerialized}<!---->`)
// enter hooks should never be called (for neither branch)

View File

@@ -112,7 +112,7 @@ describe('hot module replacement', () => {
test('reload', async () => {
const root = nodeOps.createElement('div')
const childId = 'test3-child'
const unmoutSpy = jest.fn()
const unmountSpy = jest.fn()
const mountSpy = jest.fn()
const Child: ComponentOptions = {
@@ -120,7 +120,7 @@ describe('hot module replacement', () => {
data() {
return { count: 0 }
},
unmounted: unmoutSpy,
unmounted: unmountSpy,
render: compileToFunction(`<div @click="count++">{{ count }}</div>`)
}
createRecord(childId, Child)
@@ -142,7 +142,7 @@ describe('hot module replacement', () => {
})
await nextTick()
expect(serializeInner(root)).toBe(`<div>1</div>`)
expect(unmoutSpy).toHaveBeenCalledTimes(1)
expect(unmountSpy).toHaveBeenCalledTimes(1)
expect(mountSpy).toHaveBeenCalledTimes(1)
})
})

View File

@@ -653,7 +653,7 @@ describe('SSR hydration', () => {
// fragment ends early and attempts to hydrate the extra <div>bar</div>
// as 2nd fragment child.
expect(`Hydration text content mismatch`).toHaveBeenWarned()
// exccesive children removal
// excessive children removal
expect(`Hydration children mismatch`).toHaveBeenWarned()
})
})

View File

@@ -62,7 +62,7 @@ describe('scheduler', () => {
const calls: string[] = []
const job1 = () => {
calls.push('job1')
// job2 will be excuted after job1 at the same tick
// job2 will be executed after job1 at the same tick
queueJob(job2)
}
const job2 = () => {
@@ -123,7 +123,7 @@ describe('scheduler', () => {
const calls: string[] = []
const cb1 = () => {
calls.push('cb1')
// cb2 will be excuted after cb1 at the same tick
// cb2 will be executed after cb1 at the same tick
queuePostFlushCb(cb2)
}
const cb2 = () => {

View File

@@ -199,7 +199,7 @@ describe('vnode', () => {
expect(cloneVNode(node2)).toEqual(node2)
expect(cloneVNode(node2)).toEqual(cloned2)
// #1041 should use reoslved key/ref
// #1041 should use resolved key/ref
expect(cloneVNode(createVNode('div', { key: 1 })).key).toBe(1)
expect(cloneVNode(createVNode('div', { key: 1 }), { key: 2 }).key).toBe(2)
expect(cloneVNode(createVNode('div'), { key: 2 }).key).toBe(2)
@@ -260,15 +260,15 @@ describe('vnode', () => {
})
test('handlers', () => {
let clickHander1 = function() {}
let clickHander2 = function() {}
let focusHander2 = function() {}
let clickHandler1 = function() {}
let clickHandler2 = function() {}
let focusHandler2 = function() {}
let props1: Data = { onClick: clickHander1 }
let props2: Data = { onClick: clickHander2, onFocus: focusHander2 }
let props1: Data = { onClick: clickHandler1 }
let props2: Data = { onClick: clickHandler2, onFocus: focusHandler2 }
expect(mergeProps(props1, props2)).toMatchObject({
onClick: [clickHander1, clickHander2],
onFocus: focusHander2
onClick: [clickHandler1, clickHandler2],
onFocus: focusHandler2
})
})
@@ -359,7 +359,7 @@ describe('vnode', () => {
// #1039
// <component :is="foo">{{ bar }}</component>
// - content is compiled as slot
// - dynamic component reoslves to plain element, but as a block
// - dynamic component resolves to plain element, but as a block
// - block creation disables its own tracking, accidentally causing the
// slot content (called during the block node creation) to be missed
test('element block should track normalized slot children', () => {