File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -26,20 +26,22 @@ export function spyOnSnapshot (ref) {
2626export 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
3738export 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
4547export function tick ( ) {
You can’t perform that action at this time.
0 commit comments