Skip to content

Commit

Permalink
test: unflake cookie test on windows (#3489)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Nov 2, 2018
1 parent 60a8d41 commit 6b65407
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/headful.spec.js
Expand Up @@ -17,8 +17,8 @@
const path = require('path');
const os = require('os');
const fs = require('fs');
const rm = require('rimraf').sync;
const {helper} = require('../lib/helper');
const rmAsync = helper.promisify(require('rimraf'));
const utils = require('./utils');
const {waitEvent} = utils;
const puppeteer = utils.requireRoot('index.js');
Expand Down Expand Up @@ -97,7 +97,8 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions})
await headlessPage.goto(server.EMPTY_PAGE);
const cookie = await headlessPage.evaluate(() => document.cookie);
await headlessBrowser.close();
rm(userDataDir);
// This might throw. See https://github.com/GoogleChrome/puppeteer/issues/2778
await rmAsync(userDataDir).catch(e => {});
expect(cookie).toBe('foo=true');
});
it('OOPIF: should report google.com frame', async({server}) => {
Expand Down

0 comments on commit 6b65407

Please sign in to comment.