// SPDX-License-Identifier: Apache-2.0
import { Flags } from '../../../../src/commands/flags.js';
import { getTestCacheDirectory } from '../../../test-utility.js';
export class BaseCommandTest {
    static newArgv() {
        return ['${PATH}/node', '${SOLO_ROOT}/solo.ts'];
    }
    static optionFromFlag(flag) {
        return `--${flag.name}`;
    }
    static argvPushGlobalFlags(argv, testName, shouldSetTestCacheDirectory = false, shouldSetChartDirectory = false) {
        argv.push(BaseCommandTest.optionFromFlag(Flags.devMode), BaseCommandTest.optionFromFlag(Flags.quiet));
        if (shouldSetChartDirectory && process.env.SOLO_CHARTS_DIR && process.env.SOLO_CHARTS_DIR !== '') {
            argv.push(BaseCommandTest.optionFromFlag(Flags.chartDirectory), process.env.SOLO_CHARTS_DIR);
        }
        if (shouldSetTestCacheDirectory) {
            argv.push(BaseCommandTest.optionFromFlag(Flags.cacheDir), getTestCacheDirectory(testName));
        }
        return argv;
    }
}
//# sourceMappingURL=base-command-test.js.map