mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 16:16:02 +00:00
trigger repository-find-[one|many]-[before|after] based on limit (#160)
This commit is contained in:
@@ -266,5 +266,12 @@ describe("[data] Repository (Events)", async () => {
|
||||
expect(events.has(RepositoryEvents.RepositoryFindManyBefore.slug)).toBeTrue();
|
||||
expect(events.has(RepositoryEvents.RepositoryFindManyAfter.slug)).toBeTrue();
|
||||
events.clear();
|
||||
|
||||
// check find one on findMany with limit 1
|
||||
await repo.findMany({ where: { id: 1 }, limit: 1 });
|
||||
await repo.emgr.executeAsyncs();
|
||||
expect(events.has(RepositoryEvents.RepositoryFindOneBefore.slug)).toBeTrue();
|
||||
expect(events.has(RepositoryEvents.RepositoryFindOneAfter.slug)).toBeTrue();
|
||||
events.clear();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user