File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import * as grpc from 'grpc';
22
22
import { resolve } from 'path' ;
23
23
import * as fs from 'fs' ;
24
24
25
+ export { database , firestore } from 'firebase' ;
26
+
25
27
const PROTO_ROOT = {
26
28
root : resolve (
27
29
__dirname ,
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import * as chai from 'chai';
18
18
import * as chaiAsPromised from 'chai-as-promised' ;
19
19
import * as firebase from '../src/api' ;
20
20
import { base64 } from '@firebase/util' ;
21
- import '@firebase/firestore' ;
22
21
23
22
const expect = chai . expect ;
24
23
@@ -90,7 +89,6 @@ describe('Testing Module Tests', function() {
90
89
await expect ( firebase . loadDatabaseRules . bind ( null , { } ) ) . to . throw (
91
90
/ d a t a b a s e N a m e n o t s p e c i f i e d /
92
91
) ;
93
- console . log ( 'b' ) ;
94
92
await expect ( firebase . loadDatabaseRules . bind ( null , {
95
93
databaseName : 'foo'
96
94
} ) as Promise < void > ) . to . throw ( / m u s t p r o v i d e r u l e s / ) ;
@@ -124,4 +122,13 @@ describe('Testing Module Tests', function() {
124
122
await firebase . initializeTestApp ( { databaseName : 'bar' , auth : { } } ) ;
125
123
expect ( firebase . apps ( ) . length ) . to . equal ( numApps + 2 ) ;
126
124
} ) ;
125
+
126
+ it ( 'there is a way to get database timestamps' , function ( ) {
127
+ expect ( firebase . database . ServerValue . TIMESTAMP ) . to . deep . equal ( {
128
+ '.sv' : 'timestamp'
129
+ } ) ;
130
+ } ) ;
131
+ it ( 'there is a way to get firestore timestamps' , function ( ) {
132
+ expect ( firebase . firestore . FieldValue . serverTimestamp ( ) ) . not . to . be . null ;
133
+ } ) ;
127
134
} ) ;
You can’t perform that action at this time.
0 commit comments