/** * The Babel plugin that cuts a Playwright spec, so each case records which of * its statements first reached each region of the application. * * Playwright compiles every spec through Babel, and `babelPlugins` under * `'@playwright/test'` in the configuration is the one place it lets a project * add to that, which is where `withTestSelection` puts this. The cut is the one * every runner's seam makes ([`cadence`](https://github.com/Variance-Authority/variance-authority/blob/main/packages/sense/src/instrument/cadence.ts)), * awaited: the page is outside the test's realm, so each statement of an async * body waits while the `context` fixture drains what the statement before it * reached ([`documents.ts`](./documents.ts)). * * The cut has to happen before Babel parses, because it is a walk of the text * and not of Babel's tree, so this overrides the parser rather than visiting: * it parses the cut text and moves every position back to the text the project * wrote. Lines never move; a column inside an inserted call names the place it * was inserted at. That keeps Babel's map, and so every stack frame Playwright * reads a location from, naming the file as written — an inline aria snapshot * is written back by that location. * * CommonJS, because Playwright `require`s each plugin by its path. */ /** Babel's parser, as `parserOverride` is handed it. */ type Parse = (code: string, options: ParserOptions) => object; interface ParserOptions { readonly sourceFileName?: string; } export = cadenceBabel; declare function cadenceBabel(): { readonly name: string; readonly parserOverride: (code: string, options: ParserOptions, parse: Parse) => object | undefined; }; //# sourceMappingURL=cadence-babel.d.cts.map