Skip to content

Commit

Permalink
Extra $nin test
Browse files Browse the repository at this point in the history
  • Loading branch information
john-gom committed Nov 20, 2023
1 parent bcd5c2f commit 0fe79e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/domain/services/query.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,18 @@ describe('count', () => {
expect(response).toBe(2);
});
});

it('should cope with $nin unknown value on a product field', async () => {
await createTestingModule([DomainModule], async (app) => {
const { originValue } = await createTestTags(app);
const queryService = app.get(QueryService);
const response = await queryService.count({
origins_tags: originValue,
creator: { $nin: [null, []] },
});
expect(response).toBe(2);
});
});
});

describe('aggregate', () => {
Expand Down

0 comments on commit 0fe79e0

Please sign in to comment.