diff --git a/src/domain/services/query.service.spec.ts b/src/domain/services/query.service.spec.ts index 072c8e4..c513097 100644 --- a/src/domain/services/query.service.spec.ts +++ b/src/domain/services/query.service.spec.ts @@ -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', () => {