|
1 | 1 | import { expect } from 'chai'; |
| 2 | +import { |
| 3 | + getOrganizations, |
| 4 | + getOrganizationsWhereUserIsAdmin, |
| 5 | + getOrgUsers, |
| 6 | + getOrgRoles, |
| 7 | + getStacks, |
| 8 | + getContentTypeCount, |
| 9 | + getContentTypes, |
| 10 | + getLanguages, |
| 11 | + getEntriesCount, |
| 12 | + getEntries, |
| 13 | + getEnvironments, |
| 14 | + getAllTeams, |
| 15 | + exportOrgTeams, |
| 16 | + getAllTaxonomies, |
| 17 | + getAllTermsOfTaxonomy, |
| 18 | + getTaxonomy, |
| 19 | + createImportableCSV, |
| 20 | +} from '../../../src/utils/api-client'; |
2 | 21 |
|
3 | 22 | // API client functions are tightly coupled to the Contentstack SDK |
4 | 23 | // These tests verify the function signatures and basic structure |
5 | 24 | // Full integration testing requires actual SDK mocking or E2E tests |
6 | 25 |
|
7 | 26 | describe('api-client', () => { |
8 | 27 | describe('module exports', () => { |
9 | | - it('should export all expected functions', async () => { |
10 | | - // Import from the barrel export with explicit index.js |
11 | | - const utils = await import('../../../dist/utils/index.js'); |
12 | | - |
13 | | - expect(utils.getOrganizations).to.be.a('function'); |
14 | | - expect(utils.getOrganizationsWhereUserIsAdmin).to.be.a('function'); |
15 | | - expect(utils.getOrgUsers).to.be.a('function'); |
16 | | - expect(utils.getOrgRoles).to.be.a('function'); |
17 | | - expect(utils.getStacks).to.be.a('function'); |
18 | | - expect(utils.getContentTypeCount).to.be.a('function'); |
19 | | - expect(utils.getContentTypes).to.be.a('function'); |
20 | | - expect(utils.getLanguages).to.be.a('function'); |
21 | | - expect(utils.getEntriesCount).to.be.a('function'); |
22 | | - expect(utils.getEntries).to.be.a('function'); |
23 | | - expect(utils.getEnvironments).to.be.a('function'); |
24 | | - expect(utils.getAllTeams).to.be.a('function'); |
25 | | - expect(utils.exportOrgTeams).to.be.a('function'); |
26 | | - expect(utils.getAllTaxonomies).to.be.a('function'); |
27 | | - expect(utils.getAllTermsOfTaxonomy).to.be.a('function'); |
28 | | - expect(utils.getTaxonomy).to.be.a('function'); |
29 | | - expect(utils.createImportableCSV).to.be.a('function'); |
| 28 | + it('should export all expected functions', () => { |
| 29 | + expect(getOrganizations).to.be.a('function'); |
| 30 | + expect(getOrganizationsWhereUserIsAdmin).to.be.a('function'); |
| 31 | + expect(getOrgUsers).to.be.a('function'); |
| 32 | + expect(getOrgRoles).to.be.a('function'); |
| 33 | + expect(getStacks).to.be.a('function'); |
| 34 | + expect(getContentTypeCount).to.be.a('function'); |
| 35 | + expect(getContentTypes).to.be.a('function'); |
| 36 | + expect(getLanguages).to.be.a('function'); |
| 37 | + expect(getEntriesCount).to.be.a('function'); |
| 38 | + expect(getEntries).to.be.a('function'); |
| 39 | + expect(getEnvironments).to.be.a('function'); |
| 40 | + expect(getAllTeams).to.be.a('function'); |
| 41 | + expect(exportOrgTeams).to.be.a('function'); |
| 42 | + expect(getAllTaxonomies).to.be.a('function'); |
| 43 | + expect(getAllTermsOfTaxonomy).to.be.a('function'); |
| 44 | + expect(getTaxonomy).to.be.a('function'); |
| 45 | + expect(createImportableCSV).to.be.a('function'); |
30 | 46 | }); |
31 | 47 | }); |
32 | 48 |
|
|
0 commit comments