UNPKG

@augment-vir/test

Version:

A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.

34 lines (33 loc) 1.17 kB
import { type GenericTreePaths } from 'spa-router-vir'; import { type UrlOverrides } from 'url-vir'; import { type UniversalTestContext } from '../augments/universal-testing-suite/universal-test-context.js'; /** * Converts {@link NavOptions} into an actionable URL string. * * @category Internal */ export declare function extractNavUrl(testContext: Readonly<UniversalTestContext>, options: Readonly<NavOptions>): string; /** * Used for the `path` argument of `testPlaywright.nav`. * * @category Internal */ export type NavOptions = Omit<UrlOverrides, 'paths'> & { /** If not provided, the page's current URL will be used. */ baseFrontendUrl?: string | undefined; paths?: string[] /** Prefer using tree paths with `frontendPathTree` */ | GenericTreePaths; }; /** * The test name appended to the frontend when `testPlaywright.nav` is used. * * @category Internal */ export declare const playwrightTeatNameUrlParam = "test-name"; /** * Navigate to a URL in Playwright via given paths. * * @category Internal */ export declare function navigateTo(testContext: Readonly<UniversalTestContext>, options: Readonly<NavOptions>): Promise<void>;