mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
a1d6795533
- Upgrades to latest Docusaurus - Upgrades our OpenAPI plugin to latest too - Removes old, unneeded dependencies - Our configs and sidebar files now use TypeScript [Preview link](https://unleash-docs-git-alvin-docusaurus-v3-unleash-team.vercel.app/) --------- Co-authored-by: melindafekete <melinda.fekete@getunleash.io> Co-authored-by: Christopher Kolstad <chriswk@getunleash.io>
37 lines
1.4 KiB
JavaScript
37 lines
1.4 KiB
JavaScript
import { docs } from './edge-proxy';
|
|
|
|
test('Should get all sub pages', () => {
|
|
expect(docs.urls).toStrictEqual([
|
|
'unleash-proxy/main/README.md',
|
|
'unleash-edge/main/README.md',
|
|
'unleash-edge/main/docs/concepts.md',
|
|
'unleash-edge/main/docs/deploying.md',
|
|
]);
|
|
});
|
|
|
|
test('Modifies filenames and content properly', () => {
|
|
const proxyContent = docs.modifyContent(docs.urls[0], '');
|
|
const edgeMainContent = docs.modifyContent(docs.urls[1], '');
|
|
const firstSubpage = docs.modifyContent(docs.urls[2], '');
|
|
const secondSubpage = docs.modifyContent(docs.urls[3], '');
|
|
|
|
expect(proxyContent.filename).toBe('unleash-proxy.md');
|
|
expect(edgeMainContent.filename).toBe('unleash-edge.md');
|
|
expect(firstSubpage.filename).toBe('unleash-edge/concepts.md');
|
|
expect(secondSubpage.filename).toBe('unleash-edge/deploying.md');
|
|
|
|
expect(edgeMainContent.content).toContain('title: Unleash Edge');
|
|
expect(edgeMainContent.content).toContain('slug: /reference/unleash-edge');
|
|
expect(edgeMainContent.content).toContain(
|
|
'custom_edit_url: https://github.com/Unleash/unleash-edge/edit/main/README.md',
|
|
);
|
|
|
|
expect(firstSubpage.content).toContain('title: Concepts');
|
|
expect(firstSubpage.content).toContain(
|
|
'slug: /reference/unleash-edge/concepts',
|
|
);
|
|
expect(firstSubpage.content).toContain(
|
|
'custom_edit_url: https://github.com/Unleash/unleash-edge/edit/main/docs/concepts.md',
|
|
);
|
|
});
|