Skip to content

Commit

Permalink
test: add sub-item test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed May 31, 2024
1 parent fd807f0 commit a2cdc4f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,21 @@ describe('search', () => {
values: ['John Doe']
});
});

it('should find all sub-items', async () => {
const response = await new Promise<SearchResponse>(r => {
mockFind(server);
const client = getClient(true);
client.search(server.cfg.get('ldap:base_dn'), {
scope: 'sub'
}, async (err, res) => {
r(await readResponse(res));
})
});

console.log(response.entries)
expect(response.error).toBe(undefined);
expect(response.entries).not.toBe(undefined);
expect(response.entries).lengthOf(5);
});
});

0 comments on commit a2cdc4f

Please sign in to comment.