Skip to content

Commit f0db35f

Browse files
committed
Merge branch 'master' into onIdTokenChanged
2 parents 568e8e9 + e8690c8 commit f0db35f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
one.
2222
- `DataSnapshot.child` now correctly splits child paths by '/'
2323
characters
24+
- `Query.startAt`, `Query.endAt`, and `Query.equalTo` now correctly
25+
accept boolean parameters.
2426

2527

2628
[Unreleased]: https://github.com/dmurvihill/firebase-mock/compare/v2.2.10...HEAD

src/query.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ MockQuery.prototype.endAt = function (priority, key) {
174174
};
175175

176176
function assertQuery (method, pri, key) {
177-
if (pri !== null && typeof(pri) !== 'string' && typeof(pri) !== 'number') {
178-
throw new Error(method + ' failed: first argument must be a valid firebase priority (a string, number, or null).');
177+
if (pri !== null && typeof(pri) !== 'string' && typeof(pri) !== 'number' && typeof(pri) !== 'boolean') {
178+
throw new Error(method + ' failed: first argument must be a valid firebase priority (a string, number, boolean, or null).');
179179
}
180180
if (!_.isUndefined(key)) {
181181
utils.assertKey(method, key, 'second');

test/unit/query.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,8 @@ describe('MockQuery', function () {
345345

346346
it('should start at the key+priority given');
347347
});
348+
349+
describe('equalTo', function() {
350+
it('should start and stop at the key given');
351+
});
348352
});

0 commit comments

Comments
 (0)