MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getPageLinks

Function getPageLinks

scripts/testDocs.js:65–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65async function getPageLinks() {
66 const rootPages = 'packages/dev/s2-docs/pages/react-aria/*.mdx';
67
68 let links = [];
69
70 const rootFiles = await glob(rootPages);
71 for await (const file of rootFiles) {
72 const relativePath = path.relative('packages/dev/s2-docs/pages', file);
73 const urlPath = path.join('/', path.dirname(relativePath), path.basename(relativePath, '.mdx'));
74 links.push(urlPath);
75 }
76
77 return links;
78}
79
80async function testDocs() {
81 let server;

Callers 1

testDocsFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected