/** * Where a `variancePrecondition` call stands in a Playwright worker. * * The worker runs one test at a time, and `test.info()` names it in the body * and in every hook. Which hook is running Playwright knows and does not * publish: `_currentHookType` is read. A recording worker without it fails at * setup, in `enterDescribes`; anywhere else a call it cannot tell from a * `beforeAll`'s is placed on no case, not guessed to be the body's. * * Nor does it publish which `describe` declared a running `beforeEach`. The * worker runs a test from a clone of the file's suite tree, which its loader * keeps per file, and a clone shares its hooks with the tree it was made from. * So each `beforeEach`'s depth is read from that tree once per file, before a * test's hooks run, keyed by the location object Playwright made when the hook * was declared; the running hook is the one whose location object the worker's * timeout slot holds. */ import { type TestInfo } from '@playwright/test'; import type { PreconditionStanding } from '@variance-authority/sense/journal'; /** * Read which `describe` declared each `beforeEach` in a test's file, before * its hooks run. * * Every read here is of something Playwright keeps to itself. When one is * missing this throws, in the worker, naming that internal and the installed * Playwright, and throws the same for every test after: a worker that cannot * say a hook's `describe` fails at setup, not at the first precondition a hook * happens to say. */ export declare function enterDescribes(testInfo: TestInfo): Promise; /** * Where a call stands, asked at the moment it is made. * * @param owner The file a test's case is filed under, as the recorder spells it. */ export declare function playwrightStanding(owner: (testInfo: TestInfo) => string): () => PreconditionStanding; /** The installed Playwright's version, as its package says it. */ export declare function playwrightVersion(): string; //# sourceMappingURL=preconditions.d.ts.map