Skip to content

Commit 5b5dc5c

Browse files
committed
style: prettier
1 parent b3cb974 commit 5b5dc5c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {throttle, debounce} from '../index'
22
import {throttle as decoratorThrottle, debounce as decoratorDebounce} from '../decorators'
33
import {beforeEach, describe, it} from 'mocha'
44
import {expect} from 'chai'
5-
const delay = (m: number) => new Promise((r) => setTimeout(r, m))
5+
const delay = (m: number) => new Promise(r => setTimeout(r, m))
66

77
interface Throttler<T extends unknown[]> {
88
(...args: T): void
@@ -57,7 +57,7 @@ describe('throttle', () => {
5757
await delay(100)
5858
expect(calls).to.eql([
5959
[1, 2, 3],
60-
[10, 11, 12],
60+
[10, 11, 12]
6161
])
6262
})
6363

@@ -157,22 +157,22 @@ describe('marbles', () => {
157157
})
158158

159159
it('throttle(fn, 100)', async () => {
160-
await loop(throttle((x) => calls.push(x), 100))
160+
await loop(throttle(x => calls.push(x), 100))
161161
expect(calls).to.eql([1, 2, 4, 6, 8, 10])
162162
})
163163

164164
it('throttle(fn, 100, {start:false})', async () => {
165-
await loop(throttle((x) => calls.push(x), 100, {start: false}))
165+
await loop(throttle(x => calls.push(x), 100, {start: false}))
166166
expect(calls).to.eql([2, 4, 6, 8, 10])
167167
})
168168

169169
it('throttle(fn, 100, {middle:false})', async () => {
170-
await loop(throttle((x) => calls.push(x), 100, {middle: false}))
170+
await loop(throttle(x => calls.push(x), 100, {middle: false}))
171171
expect(calls).to.eql([1, 10])
172172
})
173173

174174
it('debounce(fn, 100)', async () => {
175-
await loop(debounce((x) => calls.push(x), 100))
175+
await loop(debounce(x => calls.push(x), 100))
176176
expect(calls).to.eql([10])
177177
})
178178
})
@@ -195,7 +195,7 @@ describe('decorators', () => {
195195
}
196196
}
197197
const instance = new MyClass()
198-
await loop((x) => instance.foo(x))
198+
await loop(x => instance.foo(x))
199199
expect(calls).to.eql([1, 2, 4, 6, 8, 10])
200200
})
201201
})
@@ -209,7 +209,7 @@ describe('decorators', () => {
209209
}
210210
}
211211
const instance = new MyClass()
212-
await loop((x) => instance.foo(x))
212+
await loop(x => instance.foo(x))
213213
expect(calls).to.eql([10])
214214
})
215215
})

0 commit comments

Comments
 (0)