-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgetSitemapNested.tests.ts
More file actions
30 lines (24 loc) · 976 Bytes
/
getSitemapNested.tests.ts
File metadata and controls
30 lines (24 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { createApiClient, createPreviewApiClient } from './apiClients.config';
/*
This file contains static references to content from the instance configured in the apiClient.config file.
*/
/* GET SITEMAP NESTED **************************************************/
describe('getSitemapNested:', () => {
jest.setTimeout(120000); // equivalent to this.timeout('120s')
it('should retrieve a sitemap in a nested format in live mode', async () => {
const api = createApiClient();
const sitemap = await api.getSitemapNested({
channelName: 'website',
locale: 'en-us',
});
expect(sitemap[0].pageID).toBe(2);
});
it('should retrieve a sitemap in a nested format in preview mode', async () => {
const api = createPreviewApiClient();
const sitemap = await api.getSitemapNested({
channelName: 'website',
locale: 'en-us',
});
expect(sitemap[0].pageID).toBe(2);
});
});