mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
Merge remote-tracking branch 'origin/main' into feat/integrity-checks-izzy
This commit is contained in:
@@ -500,10 +500,12 @@ export const mockSpawn = vitest.fn((exitCode: number, stdout: string, stderr: st
|
||||
} as unknown as ChildProcessWithoutNullStreams;
|
||||
});
|
||||
|
||||
export const mockDuplex = vitest.fn(
|
||||
export const mockDuplex =
|
||||
(chunkCb?: (chunk: Buffer) => void) =>
|
||||
(command: string, exitCode: number, stdout: string, stderr: string, error?: unknown) => {
|
||||
const duplex = new Duplex({
|
||||
write(_chunk, _encoding, callback) {
|
||||
write(chunk, _encoding, callback) {
|
||||
chunkCb?.(chunk);
|
||||
callback();
|
||||
},
|
||||
|
||||
@@ -528,8 +530,7 @@ export const mockDuplex = vitest.fn(
|
||||
});
|
||||
|
||||
return duplex;
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const mockFork = vitest.fn((exitCode: number, stdout: string, stderr: string, error?: unknown) => {
|
||||
const stdoutStream = new Readable({
|
||||
|
||||
Reference in New Issue
Block a user