Skip to content

Commit

Permalink
feat: [] add taxonomy entities in CMA client
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcheremisin committed Nov 25, 2024
1 parent 9eb213f commit 1ac427a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/types/cmaClient.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export type CMAClient = {
bulkAction: PlainClientAPI['bulkAction']
comment: PlainClientAPI['comment']
contentType: PlainClientAPI['contentType']
concept: PlainClientAPI['concept']
conceptScheme: PlainClientAPI['conceptScheme']
editorInterface: PlainClientAPI['editorInterface']
environment: Pick<PlainClientAPI['environment'], 'get'>
environmentAlias: Pick<PlainClientAPI['environmentAlias'], 'get'>
Expand Down
7 changes: 7 additions & 0 deletions test/unit/cma.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@ describe('createCMAClient()', function () {
const client = createCMAClient(ids, { addHandler: () => {} } as any)
expect(client).to.be.an('object')
})

it('should have taxonomy methods', () => {
const client = createCMAClient({} as any, { addHandler: () => {} } as any)

expect(client.concept).to.haveOwnProperty('getMany')
expect(client.conceptScheme).to.haveOwnProperty('getMany')
})
})

0 comments on commit 1ac427a

Please sign in to comment.