Skip to content

Commit

Permalink
Failing test cases for #1055
Browse files Browse the repository at this point in the history
  • Loading branch information
rhodgkins committed Mar 10, 2022
1 parent f45e45f commit 39fc092
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/v1/providers/database.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,22 @@ describe('Database Functions', () => {
expect(path).to.equal('/bar');
});

it('should return the correct instance and path strings if root path is /refs', () => {
const [instance, path] = database.extractInstanceAndPath(
'projects/_/instances/foo/refs/refs'
);
expect(instance).to.equal('https://foo.firebaseio.com');
expect(path).to.equal('/refs');
});

it('should return the correct instance and path strings if a child path contain /refs', () => {
const [instance, path] = database.extractInstanceAndPath(
'projects/_/instances/foo/refs/root/refs'
);
expect(instance).to.equal('https://foo.firebaseio.com');
expect(path).to.equal('/root/refs');
});

it('should return the correct multi-region instance and path strings if domain is present', () => {
const [instance, path] = database.extractInstanceAndPath(
'projects/_/instances/foo/refs/bar',
Expand Down

0 comments on commit 39fc092

Please sign in to comment.