Skip to content

Commit 9132149

Browse files
committed
chore(firestore): quiet expected deprecation warnings from namespace tests
1 parent 97634eb commit 9132149

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+490
-8
lines changed

packages/firestore/e2e/Aggregate/count.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ describe('firestore().collection().count()', function () {
2222
});
2323

2424
describe('v8 compatibility', function () {
25+
beforeEach(async function beforeEachTest() {
26+
// @ts-ignore
27+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
28+
});
29+
30+
afterEach(async function afterEachTest() {
31+
// @ts-ignore
32+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
33+
});
34+
2535
it('throws if no argument provided', function () {
2636
try {
2737
firebase.firestore().collection(COLLECTION).startAt();

packages/firestore/e2e/Blob.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ const testBuffer = [123, 34, 104, 101, 108, 108, 111, 34, 58, 34, 119, 111, 114,
2121
const testBase64 = 'eyJoZWxsbyI6IndvcmxkIn0=';
2222

2323
describe('firestore.Blob', function () {
24+
beforeEach(async function beforeEachTest() {
25+
// @ts-ignore
26+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
27+
});
28+
29+
afterEach(async function afterEachTest() {
30+
// @ts-ignore
31+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
32+
});
33+
2434
it('should throw if constructed manually', function () {
2535
try {
2636
new firebase.firestore.Blob();

packages/firestore/e2e/Bundle/loadBundle.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ describe('firestore().loadBundle()', function () {
2727
});
2828

2929
describe('v8 compatibility', function () {
30+
beforeEach(async function beforeEachTest() {
31+
// @ts-ignore
32+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
33+
});
34+
35+
afterEach(async function afterEachTest() {
36+
// @ts-ignore
37+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
38+
});
39+
3040
it('loads the bundle contents', async function () {
3141
const bundle = getBundle();
3242
const progress = await firebase.firestore().loadBundle(bundle);

packages/firestore/e2e/Bundle/namedQuery.e2e.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,20 @@ describe('firestore().namedQuery()', function () {
2828

2929
// FIXME named query functionality appears to have an android-only issue
3030
// with loading and clearing and re-loading bundles. We test modular but not v8
31-
// APIs since they are the future, and idsable the v8 compat APIs for now
31+
// APIs since they are the future, and disable the v8 compat APIs for now
3232
// Still bears investigating, there could be a race condition either in our android
3333
// native code or in firebase-android-sdk
3434
xdescribe('v8 compatibility', function () {
35+
beforeEach(async function beforeEachTest() {
36+
// @ts-ignore
37+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
38+
});
39+
40+
afterEach(async function afterEachTest() {
41+
// @ts-ignore
42+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
43+
});
44+
3545
it('returns bundled QuerySnapshot', async function () {
3646
const query = firebase.firestore().namedQuery(BUNDLE_QUERY_NAME);
3747
const snapshot = await query.get({ source: 'cache' });

packages/firestore/e2e/CollectionReference/add.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ describe('firestore.collection().add()', function () {
2323
});
2424

2525
describe('v8 compatibility', function () {
26+
beforeEach(async function beforeEachTest() {
27+
// @ts-ignore
28+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
29+
});
30+
31+
afterEach(async function afterEachTest() {
32+
// @ts-ignore
33+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
34+
});
35+
2636
it('throws if data is not an object', function () {
2737
try {
2838
firebase.firestore().collection(COLLECTION).add(123);

packages/firestore/e2e/CollectionReference/doc.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ describe('firestore.collection().doc()', function () {
2323
});
2424

2525
describe('v8 compatibility', function () {
26+
beforeEach(async function beforeEachTest() {
27+
// @ts-ignore
28+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
29+
});
30+
31+
afterEach(async function afterEachTest() {
32+
// @ts-ignore
33+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
34+
});
35+
2636
it('throws if path is not a document', function () {
2737
try {
2838
firebase.firestore().collection(COLLECTION).doc('bar/baz');

packages/firestore/e2e/CollectionReference/properties.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ describe('firestore.collection()', function () {
2323
});
2424

2525
describe('v8 compatibility', function () {
26+
beforeEach(async function beforeEachTest() {
27+
// @ts-ignore
28+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
29+
});
30+
31+
afterEach(async function afterEachTest() {
32+
// @ts-ignore
33+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
34+
});
35+
2636
it('returns the firestore instance', function () {
2737
const instance = firebase.firestore().collection(COLLECTION);
2838
instance.firestore.app.name.should.eql('[DEFAULT]');

packages/firestore/e2e/DocumentChange.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ describe('firestore.DocumentChange', function () {
2323
});
2424

2525
describe('v8 compatibility', function () {
26+
beforeEach(async function beforeEachTest() {
27+
// @ts-ignore
28+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
29+
});
30+
31+
afterEach(async function afterEachTest() {
32+
// @ts-ignore
33+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
34+
});
35+
2636
it('.doc -> returns a DocumentSnapshot', async function () {
2737
if (Platform.other) {
2838
return;

packages/firestore/e2e/DocumentReference/collection.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ const COLLECTION = 'firestore';
1919

2020
describe('firestore.doc().collection()', function () {
2121
describe('v8 compatibility', function () {
22+
beforeEach(async function beforeEachTest() {
23+
// @ts-ignore
24+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
25+
});
26+
27+
afterEach(async function afterEachTest() {
28+
// @ts-ignore
29+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
30+
});
31+
2232
it('throws if path is not a string', function () {
2333
try {
2434
firebase.firestore().doc('bar/baz').collection(123);

packages/firestore/e2e/DocumentReference/delete.e2e.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ describe('firestore.doc().delete()', function () {
2323
});
2424

2525
describe('v8 compatibility', function () {
26+
beforeEach(async function beforeEachTest() {
27+
// @ts-ignore
28+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
29+
});
30+
31+
afterEach(async function afterEachTest() {
32+
// @ts-ignore
33+
globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = false;
34+
});
35+
2636
it('deletes a document', async function () {
2737
const ref = firebase.firestore().doc(`${COLLECTION}/deleteme`);
2838
await ref.set({ foo: 'bar' });

0 commit comments

Comments
 (0)