MCPcopy
hub / github.com/vitejs/vite / getLinks

Function getLinks

playground/css-dynamic-import/__tests__/css-dynamic-import.spec.ts:47–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47async function getLinks() {
48 const links = await page.$$('link')
49 return await Promise.all(
50 links.map((handle) => {
51 return handle.evaluate((link) => ({
52 pathname: new URL(link.href).pathname,
53 rel: link.rel,
54 as: link.as,
55 }))
56 }),
57 )
58}
59
60baseOptions.forEach(({ base, label }) => {
61 test.runIf(isBuild)(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected