[tests][firestore] added large and small sized blob read/write tests
This commit is contained in:
parent
912335062a
commit
93dc585ac3
|
@ -91,9 +91,9 @@ describe('firestore', () => {
|
|||
* USAGE TESTS
|
||||
* -----------------*/
|
||||
|
||||
describe.only('firestore', () => {
|
||||
describe('firestore', () => {
|
||||
describe('Blob', () => {
|
||||
it('reads and writes blobs', async () => {
|
||||
it('reads and writes small blobs', async () => {
|
||||
const { Blob } = firebase.firestore;
|
||||
|
||||
await firebase
|
||||
|
@ -110,5 +110,23 @@ describe.only('firestore', () => {
|
|||
blob._binaryString.should.equal(testString);
|
||||
blob.toBase64().should.equal(testBase64);
|
||||
});
|
||||
|
||||
it('reads and writes large blobs', async () => {
|
||||
const { Blob } = firebase.firestore;
|
||||
|
||||
await firebase
|
||||
.firestore()
|
||||
.doc('blob-tests/large')
|
||||
.set({ blobby: Blob.fromBase64String(testBase64Large) });
|
||||
|
||||
const snapshot = await firebase
|
||||
.firestore()
|
||||
.doc('blob-tests/large')
|
||||
.get();
|
||||
|
||||
const blob = snapshot.data().blobby;
|
||||
blob._binaryString.should.equal(testStringLarge);
|
||||
blob.toBase64().should.equal(testBase64Large);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue