mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
refactor(runtime): gate settings backup file save by capability
This commit is contained in:
1 parent
c9a0d5210e
commit
582422c512
4 files changed
+81
-2
No files matched your search
@@ -258,6 +258,24 @@ describe('RuntimeCapabilitiesService', () => {
|
||||
expect(service.supportsDownloads).toBe(true);
|
||||
});
|
||||
|
||||
it('requires both desktop file-save preload methods', () => {
|
||||
testWindow.electron = {
|
||||
saveFileDialog: jest.fn(),
|
||||
};
|
||||
|
||||
const service = new RuntimeCapabilitiesService();
|
||||
|
||||
expect(service.isElectron).toBe(true);
|
||||
expect(service.supportsDesktopFileSave).toBe(false);
|
||||
|
||||
testWindow.electron = {
|
||||
saveFileDialog: jest.fn(),
|
||||
writeFile: jest.fn(),
|
||||
};
|
||||
|
||||
expect(service.supportsDesktopFileSave).toBe(true);
|
||||
});
|
||||
|
||||
it('requires the complete playlist refresh preload surface', () => {
|
||||
testWindow.electron = {
|
||||
refreshPlaylist: jest.fn(),
|
||||
|
||||
Reference in new issue
Block a user