/**
 * Copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import type { Fixtures } from '@playwright/test';
import type { ChildProcess } from 'child_process';
type TestChildParams = {
    command: string[];
    cwd?: string;
    env?: NodeJS.ProcessEnv;
    shell?: boolean;
    onOutput?: () => void;
};
export declare class TestChildProcess {
    params: TestChildParams;
    process: ChildProcess;
    output: string;
    stdout: string;
    stderr: string;
    fullOutput: string;
    onOutput?: (chunk: string | Buffer) => void;
    exited: Promise<{
        exitCode: number | null;
        signal: string | null;
    }>;
    exitCode: Promise<number | null>;
    private _outputCallbacks;
    constructor(params: TestChildParams);
    outputLines(): string[];
    kill(signal?: 'SIGINT' | 'SIGKILL'): Promise<{
        exitCode: number | null;
        signal: string | null;
    }>;
    private _killProcessTree;
    cleanExit(): Promise<void>;
    waitForOutput(substring: string, count?: number): Promise<void>;
    clearOutput(): void;
    write(chars: string): void;
}
export declare function killProcessGroup(pid: number, signal?: 'SIGINT' | 'SIGKILL'): void;
export type CommonFixtures = {
    childProcess: (params: TestChildParams) => TestChildProcess;
    waitForPort: (port: number) => Promise<void>;
    findFreePort: () => Promise<number>;
};
export type CommonWorkerFixtures = {
    daemonProcess: (params: TestChildParams) => TestChildProcess;
};
export declare const commonFixtures: Fixtures<CommonFixtures, CommonWorkerFixtures>;
export declare function countTimes(s: string, sub: string): number;
export {};
//# sourceMappingURL=commonFixtures.d.ts.map