[database][tests] Add tests for #489
This commit is contained in:
parent
f414796d16
commit
b12d9b29d0
|
@ -84,6 +84,30 @@ function issueTests({ describe, it, context, firebase }) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('issue_489', () => {
|
||||||
|
context('long numbers should', () => {
|
||||||
|
it('return as longs', async () => {
|
||||||
|
// Setup
|
||||||
|
|
||||||
|
const long1Ref = firebase.native.database().ref('tests/issues/489/long1');
|
||||||
|
const long2Ref = firebase.native.database().ref('tests/issues/489/long2');
|
||||||
|
const long2 = 1234567890123456;
|
||||||
|
|
||||||
|
// Test
|
||||||
|
|
||||||
|
let snapshot = await long1Ref.once('value');
|
||||||
|
snapshot.val().should.eql(DatabaseContents.ISSUES[489].long1);
|
||||||
|
|
||||||
|
|
||||||
|
await long2Ref.set(long2);
|
||||||
|
snapshot = await long2Ref.once('value');
|
||||||
|
snapshot.val().should.eql(long2);
|
||||||
|
|
||||||
|
return Promise.resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('issue_521', () => {
|
describe('issue_521', () => {
|
||||||
context('orderByChild (numerical field) and limitToLast', () => {
|
context('orderByChild (numerical field) and limitToLast', () => {
|
||||||
it('once() returns correct results', async () => {
|
it('once() returns correct results', async () => {
|
||||||
|
|
|
@ -92,6 +92,10 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
489: {
|
||||||
|
long1: 1508777379000,
|
||||||
|
},
|
||||||
|
|
||||||
// https://github.com/invertase/react-native-firebase/issues/521
|
// https://github.com/invertase/react-native-firebase/issues/521
|
||||||
521: {
|
521: {
|
||||||
key1: {
|
key1: {
|
||||||
|
|
Loading…
Reference in New Issue