@@ -27,8 +27,8 @@ before(() => {
27
27
chai . use ( chaiAsPromised ) ;
28
28
} ) ;
29
29
30
- describe ( 'Testing Module Tests' , function ( ) {
31
- it ( 'assertSucceeds() iff success' , async function ( ) {
30
+ describe ( 'Testing Module Tests' , function ( ) {
31
+ it ( 'assertSucceeds() iff success' , async function ( ) {
32
32
const success = Promise . resolve ( 'success' ) ;
33
33
const failure = Promise . reject ( 'failure' ) ;
34
34
await firebase . assertSucceeds ( success ) . catch ( ( ) => {
@@ -39,24 +39,24 @@ describe('Testing Module Tests', function () {
39
39
. then ( ( ) => {
40
40
throw new Error ( 'Expected failure to fail.' ) ;
41
41
} )
42
- . catch ( ( ) => { } ) ;
42
+ . catch ( ( ) => { } ) ;
43
43
} ) ;
44
44
45
- it ( 'assertFails() iff failure' , async function ( ) {
45
+ it ( 'assertFails() iff failure' , async function ( ) {
46
46
const success = Promise . resolve ( 'success' ) ;
47
47
const failure = Promise . reject ( 'failure' ) ;
48
48
await firebase
49
49
. assertFails ( success )
50
50
. then ( ( ) => {
51
51
throw new Error ( 'Expected success to fail.' ) ;
52
52
} )
53
- . catch ( ( ) => { } ) ;
53
+ . catch ( ( ) => { } ) ;
54
54
await firebase . assertFails ( failure ) . catch ( ( ) => {
55
55
throw new Error ( 'Expected failure to succeed.' ) ;
56
56
} ) ;
57
57
} ) ;
58
58
59
- it ( 'initializeTestApp() with auth=null does not set access token' , async function ( ) {
59
+ it ( 'initializeTestApp() with auth=null does not set access token' , async function ( ) {
60
60
const app = firebase . initializeTestApp ( {
61
61
projectId : 'foo' ,
62
62
auth : undefined
@@ -69,7 +69,7 @@ describe('Testing Module Tests', function () {
69
69
expect ( authInternal ) . to . be . null ;
70
70
} ) ;
71
71
72
- it ( 'initializeTestApp() with auth sets the correct access token' , async function ( ) {
72
+ it ( 'initializeTestApp() with auth sets the correct access token' , async function ( ) {
73
73
const auth = { uid : 'alice' } ;
74
74
const app = firebase . initializeTestApp ( {
75
75
projectId : 'foo' ,
@@ -88,7 +88,7 @@ describe('Testing Module Tests', function () {
88
88
expect ( claims ) . to . deep . equal ( { uid : auth . uid , iat : 0 , sub : auth . uid } ) ;
89
89
} ) ;
90
90
91
- it ( 'initializeAdminApp() sets the access token to "owner"' , async function ( ) {
91
+ it ( 'initializeAdminApp() sets the access token to "owner"' , async function ( ) {
92
92
const app = firebase . initializeAdminApp ( { projectId : 'foo' } ) ;
93
93
const authInternal = ( ( app as unknown ) as _FirebaseApp ) . container
94
94
. getProvider ( 'auth-internal' )
@@ -99,7 +99,7 @@ describe('Testing Module Tests', function () {
99
99
expect ( token ! . accessToken ) . to . be . string ( 'owner' ) ;
100
100
} ) ;
101
101
102
- it ( 'loadDatabaseRules() throws if no databaseName or rules' , async function ( ) {
102
+ it ( 'loadDatabaseRules() throws if no databaseName or rules' , async function ( ) {
103
103
// eslint-disable-next-line @typescript-eslint/no-explicit-any
104
104
await expect ( ( firebase as any ) . loadDatabaseRules . bind ( null , { } ) ) . to . throw (
105
105
/ d a t a b a s e N a m e n o t s p e c i f i e d /
@@ -116,13 +116,13 @@ describe('Testing Module Tests', function () {
116
116
) . to . throw ( / d a t a b a s e N a m e n o t s p e c i f i e d / ) ;
117
117
} ) ;
118
118
119
- it ( 'loadDatabaseRules() tries to make a network request' , async function ( ) {
119
+ it ( 'loadDatabaseRules() tries to make a network request' , async function ( ) {
120
120
await expect (
121
121
firebase . loadDatabaseRules ( { databaseName : 'foo' , rules : '{}' } )
122
122
) . to . be . rejectedWith ( / E C O N N R E F U S E D / ) ;
123
123
} ) ;
124
124
125
- it ( 'loadFirestoreRules() succeeds on valid input' , async function ( ) {
125
+ it ( 'loadFirestoreRules() succeeds on valid input' , async function ( ) {
126
126
let promise = firebase . loadFirestoreRules ( {
127
127
projectId : 'foo' ,
128
128
rules : `service cloud.firestore {
@@ -134,28 +134,28 @@ describe('Testing Module Tests', function () {
134
134
await expect ( promise ) . to . be . rejectedWith ( / U N A V A I L A B L E / ) ;
135
135
} ) ;
136
136
137
- it ( 'clearFirestoreData() succeeds on valid input' , async function ( ) {
137
+ it ( 'clearFirestoreData() succeeds on valid input' , async function ( ) {
138
138
let promise = firebase . clearFirestoreData ( {
139
139
projectId : 'foo'
140
140
} ) ;
141
141
await expect ( promise ) . to . be . rejectedWith ( / U N A V A I L A B L E / ) ;
142
142
} ) ;
143
143
144
- it ( 'apps() returns apps created with initializeTestApp' , async function ( ) {
144
+ it ( 'apps() returns apps created with initializeTestApp' , async function ( ) {
145
145
const numApps = firebase . apps ( ) . length ;
146
146
await firebase . initializeTestApp ( { databaseName : 'foo' , auth : undefined } ) ;
147
147
expect ( firebase . apps ( ) . length ) . to . equal ( numApps + 1 ) ;
148
148
await firebase . initializeTestApp ( { databaseName : 'bar' , auth : undefined } ) ;
149
149
expect ( firebase . apps ( ) . length ) . to . equal ( numApps + 2 ) ;
150
150
} ) ;
151
151
152
- it ( 'there is a way to get database timestamps' , function ( ) {
152
+ it ( 'there is a way to get database timestamps' , function ( ) {
153
153
expect ( firebase . database . ServerValue . TIMESTAMP ) . to . deep . equal ( {
154
154
'.sv' : 'timestamp'
155
155
} ) ;
156
156
} ) ;
157
157
158
- it ( 'there is a way to get firestore timestamps' , function ( ) {
158
+ it ( 'there is a way to get firestore timestamps' , function ( ) {
159
159
expect ( firebase . firestore . FieldValue . serverTimestamp ( ) ) . not . to . be . null ;
160
160
} ) ;
161
161
} ) ;
0 commit comments