fix: Refactor function calls in JobExtractionWizard to remove unnecessary void usage. Enhance test setup by adding mock implementations for update checking and installation processes, improving test coverage for application updates.
This commit is contained in:
@@ -529,8 +529,8 @@ export function JobExtractionWizard({
|
||||
error={error}
|
||||
statusText={statusText}
|
||||
selectRoot={selectRoot}
|
||||
discoverSchema={() => void discoverSchema()}
|
||||
rediscoverWithOtherSample={() => void rediscoverWithOtherSample()}
|
||||
discoverSchema={() => discoverSchema()}
|
||||
rediscoverWithOtherSample={() => rediscoverWithOtherSample()}
|
||||
discoverySampleLabels={discoverySampleLabels}
|
||||
canRediscoverWithOtherSample={
|
||||
form.mode === "general"
|
||||
|
||||
@@ -13,5 +13,11 @@ beforeEach(() => {
|
||||
{ radicado: "R1", filename: "factura.pdf", docType: "Factura", localPath: "C:\\docs\\R1\\factura.pdf", size: 10 },
|
||||
]),
|
||||
readFile: vi.fn().mockResolvedValue({ filename: "factura.pdf", size: 10, data: new ArrayBuffer(8) }),
|
||||
checkForUpdates: vi.fn().mockResolvedValue({
|
||||
updateAvailable: false,
|
||||
currentVersion: "1.0.0",
|
||||
}),
|
||||
installUpdate: vi.fn().mockResolvedValue({ ok: true }),
|
||||
onUpdateProgress: vi.fn().mockReturnValue(() => undefined),
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user