import { runResult } from '../helpers.js';
export const matchWrittenFiles = (title, expectedFilesGetter, shouldMatch) => [
    shouldMatch ? `writes ${title} files` : `doesn't write ${title} files`,
    () => {
        if (shouldMatch) {
            runResult.assertFile(expectedFilesGetter());
        }
        else {
            runResult.assertNoFile(expectedFilesGetter());
        }
    },
];
export const matchWrittenConfig = (title, config, shouldMatch) => [
    shouldMatch ? `writes ${title} config` : `doesn't write ${title} config`,
    () => {
        if (shouldMatch) {
            runResult.assertJsonFileContent('.yo-rc.json', config);
        }
        else {
            runResult.assertNoJsonFileContent('.yo-rc.json', config);
        }
    },
];
