Skip to content

Commit 6bf5d48

Browse files
committed
refactor: code stlye
1 parent 6576780 commit 6bf5d48

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Diff for: test/helpers/index.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,22 @@ export function spyOnSnapshot (ref) {
2626
export function spyOnSnapshotCallback (ref) {
2727
const onSnapshot = ref.onSnapshot.bind(ref)
2828
const spy = jest.fn()
29-
ref.onSnapshot = fn => onSnapshot((...args) => {
30-
spy()
31-
fn(...args)
32-
})
29+
ref.onSnapshot = fn =>
30+
onSnapshot((...args) => {
31+
spy()
32+
fn(...args)
33+
})
3334
return spy
3435
}
3536

3637
// This makes sure some tests fail by delaying callbacks
3738
export function delayUpdate (ref, time = 0) {
3839
const onSnapshot = ref.onSnapshot.bind(ref)
39-
ref.onSnapshot = fn => onSnapshot(async (...args) => {
40-
await delay(time)
41-
fn(...args)
42-
})
40+
ref.onSnapshot = fn =>
41+
onSnapshot(async (...args) => {
42+
await delay(time)
43+
fn(...args)
44+
})
4345
}
4446

4547
export function tick () {

0 commit comments

Comments
 (0)