File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,11 @@ async function render(
1818 args : string [ ] = [ ] ,
1919 opts : Partial < RenderOptions > = { } ,
2020) : Promise < RenderResult > {
21- const { cwd = __dirname } = opts
21+ const { cwd = __dirname , spawnOpts = { } } = opts
2222
23+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
2324 const exec = childProcess . spawn ( command , args , {
25+ ...spawnOpts ,
2426 cwd,
2527 shell : true ,
2628 } )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type {
55} from '@testing-library/dom'
66
77import { getFireEventForElement } from "./events" ;
8+ import { SpawnOptionsWithoutStdio } from "child_process" ;
89
910export interface TestInstance {
1011 cleanup ( ) : void
@@ -18,7 +19,8 @@ export interface TestInstance {
1819
1920export interface RenderOptions {
2021 cwd : string ,
21- debug : boolean
22+ debug : boolean ,
23+ spawnOpts : Omit < SpawnOptionsWithoutStdio , 'cwd' >
2224}
2325
2426export type RenderResult = TestInstance & {
You can’t perform that action at this time.
0 commit comments