Skip to content

Commit 1cf5348

Browse files
committed
Update puppeteer
1 parent a732f51 commit 1cf5348

File tree

3 files changed

+1312
-4067
lines changed

3 files changed

+1312
-4067
lines changed

testassets/InteropTestsGrpcWebWebsite/Tests/custom-environment.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
const JestPuppeteerEnvironment = require("jest-environment-puppeteer").TestEnvironment;
2+
3+
// expect-puppeteer requires jest's expect to be on the global object
4+
global.expect = require('expect').expect;
25
const expect = require('expect-puppeteer').expect;
36

47
class CustomEnvironment extends JestPuppeteerEnvironment {
58
// Load page and get test names to run
69
async setup() {
710
await super.setup();
811

12+
// Workaround puppeteer bug
13+
// https://github.com/argos-ci/jest-puppeteer/issues/586
14+
if (this.global.context.isIncognito === undefined) {
15+
this.global.context.isIncognito = () => false;
16+
}
17+
918
console.log('Calling gRPC-Web client app');
1019

1120
var page = this.global.page;

0 commit comments

Comments
 (0)