File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed
packages/firestore/test/integration/api Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import {
32
32
33
33
// Since most of our tests are "synchronous" but require a Firestore instance,
34
34
// we have a helper wrapper around it() and withTestDb() to optimize for that.
35
- function validationIt (
35
+ const validationIt : any = function (
36
36
persistence : boolean ,
37
37
message : string ,
38
38
testFunction : ( db : firestore . FirebaseFirestore ) => void | Promise < any >
@@ -45,7 +45,30 @@ function validationIt(
45
45
}
46
46
} ) ;
47
47
} ) ;
48
- }
48
+ } ;
49
+
50
+ validationIt . skip = function (
51
+ persistence : boolean ,
52
+ message : string ,
53
+ _ : ( db : firestore . FirebaseFirestore ) => void | Promise < any >
54
+ ) {
55
+ it . skip ( message , ( ) => { } ) ;
56
+ } ;
57
+
58
+ validationIt . only = function (
59
+ persistence : boolean ,
60
+ message : string ,
61
+ testFunction : ( db : firestore . FirebaseFirestore ) => void | Promise < any >
62
+ ) {
63
+ it . only ( message , ( ) => {
64
+ return withTestDb ( persistence , async db => {
65
+ const maybePromise = testFunction ( db ) ;
66
+ if ( maybePromise ) {
67
+ return maybePromise ;
68
+ }
69
+ } ) ;
70
+ } ) ;
71
+ } ;
49
72
50
73
// NOTE: The JS SDK does extensive validation of argument counts, types, etc.
51
74
// since it is an untyped language. These tests are not exhaustive as that would
You can’t perform that action at this time.
0 commit comments