Skip to content

Commit 2ce2dc1

Browse files
committed
fix: add boolean as acceptable query priority type
1 parent 8fe31b9 commit 2ce2dc1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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)