@@ -27,6 +27,7 @@ function createInstance(opts, document) {
27
27
let firestore = new Firestore ( Object . assign ( { } , opts , {
28
28
projectId : 'test-project' ,
29
29
sslCreds : grpc . credentials . createInsecure ( ) ,
30
+ keyFilename : './test/fake-certificate.json' ,
30
31
} ) ) ;
31
32
32
33
return firestore . _ensureClient ( ) . then ( ( ) => {
@@ -79,7 +80,6 @@ describe('timestamps', function() {
79
80
return createInstance (
80
81
{
81
82
timestampsInSnapshots : true ,
82
- keyFilename : './test/fake-certificate.json' ,
83
83
} ,
84
84
DOCUMENT_WITH_TIMESTAMP )
85
85
. then ( firestore => {
@@ -110,11 +110,7 @@ describe('timestamps', function() {
110
110
111
111
it ( 'retain seconds and nanoseconds' , function ( ) {
112
112
return createInstance (
113
- {
114
- timestampsInSnapshots : true ,
115
- keyFilename : './test/fake-certificate.json' ,
116
- } ,
117
- DOCUMENT_WITH_TIMESTAMP )
113
+ { timestampsInSnapshots : true } , DOCUMENT_WITH_TIMESTAMP )
118
114
. then ( firestore => {
119
115
return firestore . doc ( 'coll/doc' ) . get ( ) . then ( res => {
120
116
const timestamp = res . get ( 'moonLanding' ) ;
@@ -126,11 +122,7 @@ describe('timestamps', function() {
126
122
127
123
it ( 'convert to date' , function ( ) {
128
124
return createInstance (
129
- {
130
- timestampsInSnapshots : true ,
131
- keyFilename : './test/fake-certificate.json' ,
132
- } ,
133
- DOCUMENT_WITH_TIMESTAMP )
125
+ { timestampsInSnapshots : true } , DOCUMENT_WITH_TIMESTAMP )
134
126
. then ( firestore => {
135
127
return firestore . doc ( 'coll/doc' ) . get ( ) . then ( res => {
136
128
const timestamp = res . get ( 'moonLanding' ) ;
@@ -143,11 +135,7 @@ describe('timestamps', function() {
143
135
144
136
it ( 'convert to millis' , function ( ) {
145
137
return createInstance (
146
- {
147
- timestampsInSnapshots : true ,
148
- keyFilename : './test/fake-certificate.json' ,
149
- } ,
150
- DOCUMENT_WITH_TIMESTAMP )
138
+ { timestampsInSnapshots : true } , DOCUMENT_WITH_TIMESTAMP )
151
139
. then ( firestore => {
152
140
return firestore . doc ( 'coll/doc' ) . get ( ) . then ( res => {
153
141
const timestamp = res . get ( 'moonLanding' ) ;
@@ -158,11 +146,7 @@ describe('timestamps', function() {
158
146
159
147
it ( 'support missing values' , function ( ) {
160
148
return createInstance (
161
- {
162
- timestampsInSnapshots : true ,
163
- keyFilename : './test/fake-certificate.json' ,
164
- } ,
165
- DOCUMENT_WITH_EMPTY_TIMESTAMP )
149
+ { timestampsInSnapshots : true } , DOCUMENT_WITH_EMPTY_TIMESTAMP )
166
150
. then ( firestore => {
167
151
const expected = new Firestore . Timestamp ( 0 , 0 ) ;
168
152
0 commit comments