Function: launchInkFixture()
@termwright/ink / launchInkFixture
Function: launchInkFixture()
Section titled “Function: launchInkFixture()”launchInkFixture(
options):Promise<InkFixtureHarness>
Defined in: ink/src/fixture.ts:131
Starts a fixture process in a real pty and returns a harness over it.
The fixture renders component’s export with normal Ink under the same
injected probe a production app uses, in the alternate screen, so its tree
matches what mountInk produces for the same element.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<InkFixtureHarness>
Example
Section titled “Example”const harness = await launchInkFixture({ component: new URL('./counter-app.mjs', import.meta.url), props: { label: 'Approve' }, columns: 40, rows: 10,});await harness.press('Enter');await harness.waitForText('pressed 1');await harness.close();