chore: run updated prettier

This commit is contained in:
Evan You
2021-07-19 18:24:18 -04:00
parent 69344ff1ae
commit 47f488350c
110 changed files with 695 additions and 698 deletions

View File

@@ -55,7 +55,8 @@ test('COMPONENT_FUNCTIONAL', async () => {
)
expect(
(deprecationData[DeprecationTypes.COMPONENT_FUNCTIONAL]
.message as Function)(func)
(
deprecationData[DeprecationTypes.COMPONENT_FUNCTIONAL].message as Function
)(func)
).toHaveBeenWarned()
})

View File

@@ -26,10 +26,7 @@ describe('FILTERS', () => {
}
function reverse(v: string) {
return v
.split('')
.reverse()
.join('')
return v.split('').reverse().join('')
}
function double(v: number) {

View File

@@ -145,10 +145,10 @@ describe('GLOBAL_EXTEND', () => {
})
it('should not merge nested mixins created with Vue.extend', () => {
const a = jest.fn();
const b = jest.fn();
const c = jest.fn();
const d = jest.fn();
const a = jest.fn()
const b = jest.fn()
const c = jest.fn()
const d = jest.fn()
const A = Vue.extend({
created: a
})
@@ -163,7 +163,9 @@ describe('GLOBAL_EXTEND', () => {
const D = Vue.extend({
mixins: [C],
created: d,
render() { return null },
render() {
return null
}
})
new D().$mount()
expect(a.mock.calls.length).toStrictEqual(1)
@@ -255,7 +257,7 @@ describe('GLOBAL_PROTOTYPE', () => {
})
test('method this context', () => {
Vue.prototype.$test = function() {
Vue.prototype.$test = function () {
return this.msg
}
const vm = new Vue({

View File

@@ -57,7 +57,7 @@ describe('INSTANCE_EVENT_EMITTER', () => {
})
it('$on', () => {
vm.$on('test', function(this: any) {
vm.$on('test', function (this: any) {
// expect correct context
expect(this).toBe(vm)
spy.apply(this, arguments)
@@ -71,7 +71,7 @@ describe('INSTANCE_EVENT_EMITTER', () => {
})
it('$on multi event', () => {
vm.$on(['test1', 'test2'], function(this: any) {
vm.$on(['test1', 'test2'], function (this: any) {
expect(this).toBe(vm)
spy.apply(this, arguments)
})
@@ -179,8 +179,10 @@ describe('INSTANCE_EVENT_HOOKS', () => {
vm.$mount()
expect(spy).toHaveBeenCalled()
expect(
(deprecationData[DeprecationTypes.INSTANCE_EVENT_HOOKS]
.message as Function)('hook:mounted')
(
deprecationData[DeprecationTypes.INSTANCE_EVENT_HOOKS]
.message as Function
)('hook:mounted')
).toHaveBeenWarned()
})
@@ -197,8 +199,10 @@ describe('INSTANCE_EVENT_HOOKS', () => {
}).$mount()
expect(spy).toHaveBeenCalled()
expect(
(deprecationData[DeprecationTypes.INSTANCE_EVENT_HOOKS]
.message as Function)('hook:mounted')
(
deprecationData[DeprecationTypes.INSTANCE_EVENT_HOOKS]
.message as Function
)('hook:mounted')
).toHaveBeenWarned()
})
})
@@ -319,7 +323,9 @@ test('INSTANCE_ATTR_CLASS_STYLE', () => {
)
expect(
(deprecationData[DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE]
.message as Function)('Anonymous')
(
deprecationData[DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE]
.message as Function
)('Anonymous')
).toHaveBeenWarned()
})

View File

@@ -213,15 +213,21 @@ test('ATTR_ENUMERATED_COERCION', () => {
expect(vm.$el.getAttribute('spellcheck')).toBe('true')
expect(vm.$el.getAttribute('contenteditable')).toBe('true')
expect(
(deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function)('draggable', null, 'false')
(
deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function
)('draggable', null, 'false')
).toHaveBeenWarned()
expect(
(deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function)('spellcheck', 0, 'true')
(
deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function
)('spellcheck', 0, 'true')
).toHaveBeenWarned()
expect(
(deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function)('contenteditable', 'foo', 'true')
(
deprecationData[DeprecationTypes.ATTR_ENUMERATED_COERCION]
.message as Function
)('contenteditable', 'foo', 'true')
).toHaveBeenWarned()
})