Formatting

This commit is contained in:
2026-04-20 12:26:35 +00:00
parent 32c42cdc2d
commit dbfb2c68d2
32 changed files with 3557 additions and 1828 deletions

View File

@@ -92,27 +92,36 @@ export const createMockIO = (): MockIO => {
* @param spies - The mock IO spies from createMockIO
* @param logs - Array of log expectations to validate
*/
export const expectLogs = (spies: MockIOSpies, logs: LogExpectation[]): void => {
export const expectLogs = (
spies: MockIOSpies,
logs: LogExpectation[],
): void => {
for (const log of logs) {
if (log.out !== undefined) {
if (log.exact) {
expect(spies.out).toHaveBeenCalledWith(log.out);
} else {
expect(spies.out).toHaveBeenCalledWith(expect.stringContaining(log.out));
expect(spies.out).toHaveBeenCalledWith(
expect.stringContaining(log.out),
);
}
}
if (log.err !== undefined) {
if (log.exact) {
expect(spies.err).toHaveBeenCalledWith(log.err);
} else {
expect(spies.err).toHaveBeenCalledWith(expect.stringContaining(log.err));
expect(spies.err).toHaveBeenCalledWith(
expect.stringContaining(log.err),
);
}
}
if (log.verbose !== undefined) {
if (log.exact) {
expect(spies.verbose).toHaveBeenCalledWith(log.verbose);
} else {
expect(spies.verbose).toHaveBeenCalledWith(expect.stringContaining(log.verbose));
expect(spies.verbose).toHaveBeenCalledWith(
expect.stringContaining(log.verbose),
);
}
}
}