Restart browser once in a while during unit testing
The unit testing on mac is unreliable, making the last tests to hang. This seems to be related to the upstream bug: crbug.com/741689 For now, this patch restarts the browser in the middle of unit testing. This should be reverted once the upstream is fixed. References #100.
This commit is contained in:
parent
42edc3108a
commit
f5215b2ed0
@ -835,6 +835,14 @@ describe('Puppeteer', function() {
|
||||
expect(keyboard.modifiers().Alt).toBe(false);
|
||||
}));
|
||||
});
|
||||
|
||||
// FIXME: remove this when crbug.com/741689 is fixed.
|
||||
it('RESTART BROWSER crbug.com/741689', SX(async function() {
|
||||
page.close();
|
||||
browser = new Browser({headless, args: ['--no-sandbox']});
|
||||
page = await browser.newPage();
|
||||
}));
|
||||
|
||||
describe('Page.setUserAgent', function() {
|
||||
it('should work', SX(async function() {
|
||||
expect(page.userAgent()).toContain('Mozilla');
|
||||
|
Loading…
Reference in New Issue
Block a user