question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jestPuppeteer.debug support in Jest-circus

See original GitHub issue

💬 Questions and Help

I wonder if there any plans to support jest-circus. While jest-circus works kinda fine out of the box, I noticed that jestPuppeteer.debug() does not really work as expected.

I have this CustomEnvironemnt class that should stop the execution on test failure:

const PuppeteerEnvironment = require( 'jest-environment-puppeteer' );

class CustomEnvironemnt extends PuppeteerEnvironment {
	async handleTestEvent( event ) {
		if ( event.name === 'test_fn_failure' ) {
			await this.global.jestPuppeteer.debug();
		}
	}
}

It does trigger the chrome’s debugger, but unfortunately, after resuming the debugger - browser just closes itself.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sergtimoshcommented, Feb 8, 2020

Have you tried adding freaky timeout as test argument?(I’m not using custom environment, just add jestPuppeteer.debug() to each test while test development) It is the only way I can use debug Just like this:


jest.retryTimes(3)

describe('Test', () => {
    test('Test_1', async () => {
        await loginPage.login()
        await jestPuppeteer.debug() //paused in browser, and after resuming in browser stays paused in test runner
        await loginPageAssert.isLoggedIn()
    }, 999999) //timeout

})
0reactions
MatthiasEnghcommented, Oct 21, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - jestPuppeteer.debug support in Jest-circus -
I wonder if there any plans to support jest-circus. While jest-circus works kinda fine out of the box, I noticed that jestPuppeteer.debug() does...
Read more >
jest-circus | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Any way to make a retries for flaky tests using jest-puppeteer?
Have you tried installing jest-circus? With this test runner you could do next: //my_perfect_test.js jest.retryTimes(3) //set maximum ...
Read more >
JavaScript packages index - popularity: small - Page 88 - Snyk
... jdeploy · jdeploy-installer · jdescottes-jest-puppeteer-preset · jdesign-alert ... jest-editor-support · jest-electron · jest-environment-node-debug ...
Read more >
How to show latest package version in NPM - MailSlurp
... by @types/debug 4.1.6 4.1.7 4.1.7 node_modules/@types/debug mailslurp-app ... mailslurp-app jest-circus 26.6.3 26.6.3 27.0.6 node_modules/jest-circus ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found