Skip to content

Commit 4909878

Browse files
schmidt-sebastianJustinBeckwith
authored andcommittedJul 11, 2018
Adding keyFilename for all tests (#253)
1 parent 1525e26 commit 4909878

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed
 

‎test/timestamp.js

+5-21
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function createInstance(opts, document) {
2727
let firestore = new Firestore(Object.assign({}, opts, {
2828
projectId: 'test-project',
2929
sslCreds: grpc.credentials.createInsecure(),
30+
keyFilename: './test/fake-certificate.json',
3031
}));
3132

3233
return firestore._ensureClient().then(() => {
@@ -79,7 +80,6 @@ describe('timestamps', function() {
7980
return createInstance(
8081
{
8182
timestampsInSnapshots: true,
82-
keyFilename: './test/fake-certificate.json',
8383
},
8484
DOCUMENT_WITH_TIMESTAMP)
8585
.then(firestore => {
@@ -110,11 +110,7 @@ describe('timestamps', function() {
110110

111111
it('retain seconds and nanoseconds', function() {
112112
return createInstance(
113-
{
114-
timestampsInSnapshots: true,
115-
keyFilename: './test/fake-certificate.json',
116-
},
117-
DOCUMENT_WITH_TIMESTAMP)
113+
{timestampsInSnapshots: true}, DOCUMENT_WITH_TIMESTAMP)
118114
.then(firestore => {
119115
return firestore.doc('coll/doc').get().then(res => {
120116
const timestamp = res.get('moonLanding');
@@ -126,11 +122,7 @@ describe('timestamps', function() {
126122

127123
it('convert to date', function() {
128124
return createInstance(
129-
{
130-
timestampsInSnapshots: true,
131-
keyFilename: './test/fake-certificate.json',
132-
},
133-
DOCUMENT_WITH_TIMESTAMP)
125+
{timestampsInSnapshots: true}, DOCUMENT_WITH_TIMESTAMP)
134126
.then(firestore => {
135127
return firestore.doc('coll/doc').get().then(res => {
136128
const timestamp = res.get('moonLanding');
@@ -143,11 +135,7 @@ describe('timestamps', function() {
143135

144136
it('convert to millis', function() {
145137
return createInstance(
146-
{
147-
timestampsInSnapshots: true,
148-
keyFilename: './test/fake-certificate.json',
149-
},
150-
DOCUMENT_WITH_TIMESTAMP)
138+
{timestampsInSnapshots: true}, DOCUMENT_WITH_TIMESTAMP)
151139
.then(firestore => {
152140
return firestore.doc('coll/doc').get().then(res => {
153141
const timestamp = res.get('moonLanding');
@@ -158,11 +146,7 @@ describe('timestamps', function() {
158146

159147
it('support missing values', function() {
160148
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)
166150
.then(firestore => {
167151
const expected = new Firestore.Timestamp(0, 0);
168152

0 commit comments

Comments
 (0)
Please sign in to comment.