mirror of
https://github.com/jely2002/youtube-dl-gui.git
synced 2021-11-01 22:46:21 +03:00
test: explicitly set platform to use in test
This commit is contained in:
@@ -55,10 +55,12 @@ describe('getRemoteVersion', () => {
|
||||
});
|
||||
});
|
||||
it('returns object with the links and the version', async () => {
|
||||
const axiosGetSpy = jest.spyOn(axios, 'get').mockReturnValue({
|
||||
status: 200,
|
||||
const axiosGetSpy = jest.spyOn(axios, 'get').mockResolvedValue({
|
||||
data: { version: "4.2.1", bin: { "windows-32": { ffmpeg: "ffmpeg/link", ffprobe: "ffprobe/link" } } },
|
||||
});
|
||||
Object.defineProperty(process, "platform", {
|
||||
value: "win32"
|
||||
});
|
||||
const instance = new FfmpegUpdater({platform: "win32"});
|
||||
const result = await instance.getRemoteVersion();
|
||||
expect(result).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user