fix(batch): resolve pandoc path handling and include-subfolders option

- Normalize pandoc command parsing with path.basename() to support bundled binary paths
- Use bundled pandoc binary in convertWithPandoc instead of relying on PATH
- Forward includeSubfolders checkbox state from renderer to main process
- Add pandoc availability check before batch conversion
- Re-enable Start button when batch conversion completes
- Clean up obsolete dist build artifact causing test snapshot warning
- Bump version to 4.4.4
This commit is contained in:
2026-06-30 12:56:33 +05:30
parent 02e307f758
commit d705cfc30b
86 changed files with 16876 additions and 13476 deletions
+15 -15
View File
@@ -25,61 +25,61 @@ global.window.electronAPI = {
exists: jest.fn(() => Promise.resolve(false)),
isDirectory: jest.fn(() => Promise.resolve(false)),
copy: jest.fn(() => Promise.resolve()),
move: jest.fn(() => Promise.resolve())
move: jest.fn(() => Promise.resolve()),
},
theme: {
get: jest.fn()
get: jest.fn(),
},
print: {
doPrint: jest.fn()
doPrint: jest.fn(),
},
export: {
withOptions: jest.fn(),
spreadsheet: jest.fn()
spreadsheet: jest.fn(),
},
batch: {
convert: jest.fn(),
selectFolder: jest.fn()
selectFolder: jest.fn(),
},
converter: {
convert: jest.fn(),
convertBatch: jest.fn()
convertBatch: jest.fn(),
},
headerFooter: {
getSettings: jest.fn(),
saveSettings: jest.fn(),
browseLogo: jest.fn(),
saveLogo: jest.fn(),
clearLogo: jest.fn()
clearLogo: jest.fn(),
},
page: {
getSettings: jest.fn(),
updateSettings: jest.fn(),
setCustomStartPage: jest.fn()
setCustomStartPage: jest.fn(),
},
pdf: {
processOperation: jest.fn(),
getPageCount: jest.fn(),
selectFolder: jest.fn()
}
selectFolder: jest.fn(),
},
};
// Mock marked library
global.window.marked = {
parse: jest.fn((text) => `<p>${text}</p>`),
use: jest.fn()
use: jest.fn(),
};
// Mock DOMPurify
global.window.DOMPurify = {
sanitize: jest.fn((html) => html)
sanitize: jest.fn((html) => html),
};
// Mock highlight.js
global.window.hljs = {
highlight: jest.fn((code, options) => ({ value: code })),
highlight: jest.fn((code, _options) => ({ value: code })),
highlightAuto: jest.fn((code) => ({ value: code })),
getLanguage: jest.fn(() => true)
getLanguage: jest.fn(() => true),
};
// Mock localStorage
@@ -87,7 +87,7 @@ const localStorageMock = {
getItem: jest.fn(),
setItem: jest.fn(),
removeItem: jest.fn(),
clear: jest.fn()
clear: jest.fn(),
};
global.localStorage = localStorageMock;