Skip to content

Commit

Permalink
Update puppeteer
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Aug 14, 2024
1 parent a732f51 commit 1cf5348
Show file tree
Hide file tree
Showing 3 changed files with 1,312 additions and 4,067 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
const JestPuppeteerEnvironment = require("jest-environment-puppeteer").TestEnvironment;

// expect-puppeteer requires jest's expect to be on the global object
global.expect = require('expect').expect;
const expect = require('expect-puppeteer').expect;

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

// Workaround puppeteer bug
// https://github.com/argos-ci/jest-puppeteer/issues/586
if (this.global.context.isIncognito === undefined) {
this.global.context.isIncognito = () => false;
}

console.log('Calling gRPC-Web client app');

var page = this.global.page;
Expand Down
Loading

0 comments on commit 1cf5348

Please sign in to comment.