Skip to content

Commit

Permalink
fix(remote-config): nits
Browse files Browse the repository at this point in the history
  • Loading branch information
exaby73 committed Sep 19, 2023
1 parent 3b07778 commit dacdb4c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 32 deletions.
27 changes: 1 addition & 26 deletions packages/database/e2e/database.modular.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ describe('database()', function () {
});
});

it('supports custom database URL', async function () {
firebase.database().app.name.should.eql('[DEFAULT]');

firebase
.database(firebase.app('secondaryFromNative'))
.app.name.should.eql('secondaryFromNative');

firebase.app('secondaryFromNative').database().app.name.should.eql('secondaryFromNative');
});

describe('ref()', function () {
it('throws if path is not a string', async function () {
try {
Expand Down Expand Up @@ -217,7 +207,7 @@ describe('database()', function () {
const { getDatabase } = databaseModular;

const app = firebase.app();
const database = getDatabase();
const database = getDatabase(app);
should.exist(app.database);
database.app.should.eql(app);
});
Expand All @@ -235,21 +225,6 @@ describe('database()', function () {
});
});

it.skip('supports custom database URL', async function () {
// FIXME: the v8 API doesn't seem to have a URL argument
throw new Error('Incomplete test');

// Below is the v8 test, which has nothing to do with custom database URLs

// firebase.database().app.name.should.eql('[DEFAULT]');

// firebase
// .database(firebase.app('secondaryFromNative'))
// .app.name.should.eql('secondaryFromNative');

// firebase.app('secondaryFromNative').database().app.name.should.eql('secondaryFromNative');
});

describe('ref()', function () {
it('throws if path is not a string', async function () {
const { getDatabase, ref } = databaseModular;
Expand Down
10 changes: 4 additions & 6 deletions packages/database/lib/modular/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,12 @@ export function setPersistenceCacheSizeBytes(db, bytes) {
return db.setPersistenceCacheSizeBytes(bytes);
}

// TODO: check if this function is supported on mobile
export function forceLongPolling() {
throw new Error('Unimplemented');
throw new Error('forceLongPolling() is not implemented');
}

// TODO: check if this function is supported on mobile
export function forceWebSockets() {
throw new Error('Unimplemented');
throw new Error('forceWebSockets() is not implemented');
}

/**
Expand All @@ -122,5 +120,5 @@ export function increment(delta) {
return firebase.database.ServerValue.increment(delta);
}

export * from './api/query';
export * from './api/transaction';
export * from './query';
export * from './transaction';
File renamed without changes.
File renamed without changes.

0 comments on commit dacdb4c

Please sign in to comment.