MCPcopy Create free account
hub / github.com/vercel/examples / getTest

Function getTest

internal/packages/playwright/scripts/lib/get-test.ts:1–14  ·  view source on GitHub ↗
(demoUrl: string)

Source from the content-addressed store, hash-verified

1export default function getTest(demoUrl: string) {
2 return `// This test was automatically generated
3import { test, expect } from 'e2e/setup-fixture'
4
5test.describe('Index Page', () => {
6 test('should load the page', async ({ page }) => {
7 const res = await page.goto('${demoUrl}')
8
9 expect(res?.status()).not.toBe(399)
10
11 await page.close({ runBeforeUnload: true })
12 })
13})`
14}

Callers 1

generateTestsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected