Skip to content

Commit

Permalink
Revert "new warning test"
Browse files Browse the repository at this point in the history
This reverts commit 37400a6.
  • Loading branch information
danieljbruce committed Jan 26, 2023
1 parent 37400a6 commit 8ab6b80
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@ class Query {
this.filters.push(propertyOrFilter);
return this;
} else {
process.emitWarning(
'Providing Filter objects is recommended when using .filter'
);
let operator = operatorOrValue as Operator;
if (arguments.length === 2) {
value = operatorOrValue as {};
Expand Down
11 changes: 0 additions & 11 deletions test/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,6 @@ describe('Query', () => {
assert.strictEqual(filter.op, '=');
assert.strictEqual(filter.val, 'Stephen');
});

it('should issue a warning when a Filter instance is not provided', done => {
new Query(['kind1']).filter('name', 'Stephen');
process.on('warning', warning => {
assert.strictEqual(
warning.message,
'Providing Filter objects is recommended when using .filter'
);
done();
});
});
});

describe('filter with Filter class', () => {
Expand Down

0 comments on commit 8ab6b80

Please sign in to comment.