Skip to content

Commit

Permalink
Removing assert that fails the system-tests on CI (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian committed Jul 13, 2018
1 parent f01d512 commit 41832eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
6 changes: 1 addition & 5 deletions src/index.js
Expand Up @@ -455,11 +455,7 @@ class Firestore {
* for existing documents, otherwise a DocumentSnapshot.
*/
snapshot_(documentOrName, readTime, encoding) {
if (!this._initalizationSettings.projectId) {
throw new Error(
'Cannot use `snapshot_()` without a Project ID. Please provide a ' +
'Project ID via `Firestore.settings()`.');
}
// TODO: Assert that Firestore Project ID is valid.

let convertTimestamp;
let convertDocument;
Expand Down
11 changes: 0 additions & 11 deletions test/index.js
Expand Up @@ -540,17 +540,6 @@ describe('snapshot_() method', function() {
});
});

it('validates Project ID provided', function() {
firestore = new Firestore({
sslCreds: grpc.credentials.createInsecure(),
keyFilename: './test/fake-certificate.json'
});

assert.throws(
() => firestore.snapshot_(),
/Cannot use `snapshot_\(\)` without a Project ID. Please provide a Project ID via `Firestore.settings\(\)`./);
});

it('handles ProtobufJS', function() {
let doc = firestore.snapshot_(
document('doc', {
Expand Down

0 comments on commit 41832eb

Please sign in to comment.