Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Aug 27, 2019
1 parent db6affc commit 31c1077
Show file tree
Hide file tree
Showing 3 changed files with 388 additions and 473 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"babel-jest": "^24.7.1",
"codecov": "^3.3.0",
"eslint": "^6.0.1",
"eslint-config-posva": "^3.0.1",
"eslint-config-posva": "^3.0.2",
"faked-promise": "^2.1.0",
"jest": "^24.7.1",
"typescript": "^3.4.3",
Expand Down
18 changes: 9 additions & 9 deletions tests/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const tick = () => new Promise(resolve => timeout(resolve, 0))
jest.useFakeTimers()

const slots = {
pending: `<span>pending</span>`,
pending: '<span>pending</span>',
}
const scopedSlots = {
default: `<span slot-scope="data">{{ data }}</span>`,
rejected: `<span class="error" slot-scope="error">{{ error.message }}</span>`,
default: '<span slot-scope="data">{{ data }}</span>',
rejected: '<span class="error" slot-scope="error">{{ error.message }}</span>',
}

describe('Promised', () => {
Expand Down Expand Up @@ -56,7 +56,7 @@ describe('Promised', () => {
propsData: { promise, pendingDelay: 0 },
slots: {
...slots,
default: `<p>finished</p>`,
default: '<p>finished</p>',
},
})
resolve('whatever')
Expand All @@ -70,7 +70,7 @@ describe('Promised', () => {
propsData: { promise, pendingDelay: 0 },
slots: {
...slots,
rejected: `<p>oh no</p>`,
rejected: '<p>oh no</p>',
},
})
reject('whatever')
Expand All @@ -83,7 +83,7 @@ describe('Promised', () => {
wrapper = mount(Promised, {
propsData: { promise, pendingDelay: 0 },
scopedSlots: {
pending: `<p>pending</p>`,
pending: '<p>pending</p>',
},
})
expect(wrapper.text()).toBe('pending')
Expand All @@ -94,8 +94,8 @@ describe('Promised', () => {
wrapper = mount(Promised, {
propsData: { promise, pendingDelay: 0 },
scopedSlots: {
pending: `<p>pending: {{ props }}</p>`,
default: `<p>data: {{ props }}</p>`,
pending: '<p>pending: {{ props }}</p>',
default: '<p>data: {{ props }}</p>',
},
})
resolve('ok')
Expand Down Expand Up @@ -423,7 +423,7 @@ describe('Promised', () => {
expect(() => {
wrapper = mount(Promised, {
scopedSlots: {
combined: `<template></template>`,
combined: '<template></template>',
},
propsData: { promise: null, pendingDelay: 0 },
})
Expand Down
Loading

0 comments on commit 31c1077

Please sign in to comment.