diff --git a/packages/repository-tests/src/crud/relations/acceptance/belongs-to.inclusion-resolver.relation.acceptance.ts b/packages/repository-tests/src/crud/relations/acceptance/belongs-to.inclusion-resolver.relation.acceptance.ts index 110d05e282d3..fa350f457a1c 100644 --- a/packages/repository-tests/src/crud/relations/acceptance/belongs-to.inclusion-resolver.relation.acceptance.ts +++ b/packages/repository-tests/src/crud/relations/acceptance/belongs-to.inclusion-resolver.relation.acceptance.ts @@ -165,6 +165,16 @@ export function belongsToInclusionResolverAcceptance( expect(toJSON(result)).to.deepEqual(toJSON(expected)); }); + it('throws error if the inclusion query contains a non-empty scope', async () => { + await orderRepo.create({ + description: 'shiba', + customerId: existingCustomerId, + }); + expect( + orderRepo.find({include: [{relation: 'customer'}], limit: 1}), + ).to.be.rejectedWith(`Invalid "scope is not supported`); + }); + it('throws error if the target repository does not have the registered resolver', async () => { await orderRepo.create({ description: 'shiba',