Skip to content

Commit 867d9c0

Browse files
One more test
1 parent 5297d47 commit 867d9c0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/firestore/lite/test/integration.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,17 @@ describe('Firestore', () => {
4343
const fs2 = getFirestore(app);
4444
expect(fs1 === fs2).to.be.true;
4545
});
46+
47+
it('cannot call initializeFirestore() twice', () => {
48+
const app = initializeApp(
49+
{ apiKey: 'fake-api-key', projectId: 'test-project' },
50+
'test-app-initializeFirestore-twice'
51+
);
52+
initializeFirestore(app, { host: 'localhost', ssl: false });
53+
expect(() => {
54+
initializeFirestore(app, { host: 'localhost', ssl: false });
55+
}).to.throw(
56+
'Firestore has already been started and its settings can no longer be changed.'
57+
);
58+
});
4659
});

0 commit comments

Comments
 (0)