mirror of
https://github.com/jely2002/youtube-dl-gui.git
synced 2021-11-01 22:46:21 +03:00
test: fix filepath unit tests & add
This commit is contained in:
@@ -128,6 +128,17 @@ describe('create portable folder', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('checkFfmpeg', () => {
|
||||
it('should do nothing when ffmpeg exists', () => {
|
||||
const instance = instanceBuilder(true);
|
||||
instance.ffmpeg = "ffmpeg/path";
|
||||
fs.copyFileSync = jest.fn();
|
||||
fs.promises.access = jest.fn().mockResolvedValue(true);
|
||||
instance.checkFfmpeg();
|
||||
expect(fs.copyFileSync).toBeCalledTimes(0);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function instanceBuilder(packaged, portable) {
|
||||
|
||||
Reference in New Issue
Block a user