Skip to content

Commit 41832eb

Browse files
authoredJul 13, 2018
Removing assert that fails the system-tests on CI (#260)
1 parent f01d512 commit 41832eb

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed
 

‎src/index.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,7 @@ class Firestore {
455455
* for existing documents, otherwise a DocumentSnapshot.
456456
*/
457457
snapshot_(documentOrName, readTime, encoding) {
458-
if (!this._initalizationSettings.projectId) {
459-
throw new Error(
460-
'Cannot use `snapshot_()` without a Project ID. Please provide a ' +
461-
'Project ID via `Firestore.settings()`.');
462-
}
458+
// TODO: Assert that Firestore Project ID is valid.
463459

464460
let convertTimestamp;
465461
let convertDocument;

‎test/index.js

-11
Original file line numberDiff line numberDiff line change
@@ -540,17 +540,6 @@ describe('snapshot_() method', function() {
540540
});
541541
});
542542

543-
it('validates Project ID provided', function() {
544-
firestore = new Firestore({
545-
sslCreds: grpc.credentials.createInsecure(),
546-
keyFilename: './test/fake-certificate.json'
547-
});
548-
549-
assert.throws(
550-
() => firestore.snapshot_(),
551-
/Cannot use `snapshot_\(\)` without a Project ID. Please provide a Project ID via `Firestore.settings\(\)`./);
552-
});
553-
554543
it('handles ProtobufJS', function() {
555544
let doc = firestore.snapshot_(
556545
document('doc', {

0 commit comments

Comments
 (0)
Please sign in to comment.