@@ -22,7 +22,7 @@ function createCounter(ref, num_shards) {
22
22
// [END create_counter]
23
23
24
24
// [START increment_counter]
25
- function incrementCounter ( db , ref , num_shards ) {
25
+ function incrementCounter ( ref , num_shards ) {
26
26
// Select a shard of the counter at random
27
27
const shard_id = Math . floor ( Math . random ( ) * num_shards ) . toString ( ) ;
28
28
const shard_ref = ref . collection ( 'shards' ) . doc ( shard_id ) ;
@@ -67,15 +67,15 @@ describe("firestore-solution-counters", () => {
67
67
// Create a counter, then increment it
68
68
const ref = db . collection ( 'counters' ) . doc ( ) ;
69
69
return createCounter ( ref , 10 ) . then ( ( ) => {
70
- return incrementCounter ( db , ref , 10 ) ;
70
+ return incrementCounter ( ref , 10 ) ;
71
71
} ) ;
72
72
} ) ;
73
73
74
74
it ( "should get the count of a counter" , ( ) => {
75
75
// Create a counter, increment it, then get the count
76
76
const ref = db . collection ( 'counters' ) . doc ( ) ;
77
77
return createCounter ( ref , 10 ) . then ( ( ) => {
78
- return incrementCounter ( db , ref , 10 ) ;
78
+ return incrementCounter ( ref , 10 ) ;
79
79
} ) . then ( ( ) => {
80
80
return getCount ( ref ) ;
81
81
} ) ;
0 commit comments