Skip to content

hide

hide(fn): Promise<void>

Defined in: hide.ts:39

Runs fn while suppressing recording. The hidden section is cut from the final video — viewers never see it.

Use it for logins, navigations, page loads, and any setup that would bore a human to tears. Especially useful at the very start of a video so you jump straight into the live app.

In a screenshot() this is a no-op: a still keeps only the final frame, so there is no timeline to cut a hidden section from. The wrapped setup still runs, but screenci warns since the hide() wrapper has no effect.

() => void | Promise<void>

Promise<void>

await hide(async () => {
await page.goto('/login')
await page.fill('input[type="email"]', '[email protected]')
await page.fill('input[type="password"]', 'secret')
await page.click('[type="submit"]')
await page.waitForURL('/dashboard')
})
// video starts here — dashboard is already open