Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-shivamsingh committed Oct 24, 2023
1 parent be0b768 commit a9cbe39
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,17 @@ describe('AutomateProvider', () => {
it('throw error if statusCode:13', async () => {
const automateProvider = new AutomateProvider('1234', 'https://localhost/command-executor', { platform: 'win' }, {}, {}, 'client', 'environment', {}, percyBuildInfo);
await automateProvider.createDriver();
automateProvider.driver.executeScript = jasmine.createSpy().and.returnValue(Promise.resolve({ status: 13, value: 'OS/Browser/Selenium combination is not supported'}));
automateProvider.driver.executeScript = jasmine.createSpy().and.returnValue(Promise.resolve({ status: 13, value: 'OS/Browser/Selenium combination is not supported' }));
await expectAsync(automateProvider.percyScreenshotBegin('abc')).toBeRejectedWithError('OS/Browser/Selenium combination is not supported');
})
});

it('mark percy sesssion as failure', async () => {
const automateProvider = new AutomateProvider('1234', 'https://localhost/command-executor', { platform: 'win' }, {}, {}, 'client', 'environment', {}, percyBuildInfo);
await automateProvider.createDriver();
automateProvider.driver.executeScript = jasmine.createSpy().and.returnValue(Promise.reject({ response: { body: JSON.stringify({value: { error: "OS/Browser/Selenium combination is not supported", message: "OS/Browser/Selenium combination is not supported"}})} }));
// eslint-disable-next-line prefer-promise-reject-errors
automateProvider.driver.executeScript = jasmine.createSpy().and.returnValue(Promise.reject({ response: { body: JSON.stringify({ value: { error: 'OS/Browser/Selenium combination is not supported', message: 'OS/Browser/Selenium combination is not supported' } }) } }));
await expectAsync(automateProvider.percyScreenshotBegin('abc')).toBeRejectedWithError('OS/Browser/Selenium combination is not supported');
})
});
});

describe('percyScreenshotEnd', () => {
Expand Down

0 comments on commit a9cbe39

Please sign in to comment.