* chore: add core module test cases * chore: fix tests * chore: add code coverage report * chore: split coverage step * chore: split coverage step * Update jan-electron-linter-and-test.yml * Update jan-electron-linter-and-test.yml * Update jan-electron-linter-and-test.yml * chore: update tests * chore: add web utils test cases * chore: add restful and helper tests * chore: add tests
26 lines
787 B
TypeScript
26 lines
787 B
TypeScript
|
|
import { openFileTitle } from './titleUtils';
|
|
|
|
test('should return "Open Containing Folder" when neither isMac nor isWindows is true', () => {
|
|
(global as any).isMac = false;
|
|
(global as any).isWindows = false;
|
|
const result = openFileTitle();
|
|
expect(result).toBe('Open Containing Folder');
|
|
});
|
|
|
|
|
|
test('should return "Show in File Explorer" when isWindows is true', () => {
|
|
(global as any).isMac = false;
|
|
(global as any).isWindows = true;
|
|
const result = openFileTitle();
|
|
expect(result).toBe('Show in File Explorer');
|
|
});
|
|
|
|
|
|
test('should return "Show in Finder" when isMac is true', () => {
|
|
(global as any).isMac = true;
|
|
(global as any).isWindows = false;
|
|
const result = openFileTitle();
|
|
expect(result).toBe('Show in Finder');
|
|
});
|