Repository navigation
feat: pause at test end or error when debugging - #828
Dmitry Gozman (dgozman) wants to merge 1 commit into
Conversation
Relands microsoft#719, reverted in microsoft#770.
| private async _onTestPaused(params: { errors: reporterTypes.TestError[] }) { | ||
| if (!this._testUnderDebug) | ||
| return; | ||
| const errors = params.errors.filter(e => !!e.message); |
There was a problem hiding this comment.
errors from throwing a string only have value so this drops the failure and shows a pause at the end instead
| FORCE_COLOR: '1', | ||
| PW_TEST_SOURCE_TRANSFORM: require.resolve('./debugTransform'), | ||
| PW_TEST_SOURCE_TRANSFORM_SCOPE: testDirs.join(pathSeparator), | ||
| PW_TEST_SOURCE_TRANSFORM: this._model.config.version < kMinTestPausedVersion ? require.resolve('./debugTransform') : undefined, |
There was a problem hiding this comment.
disabling this transform loses the existing debugger stop when a test body passes but afterEach fails in a batch because the runner checks pauseOnError before the hook runs
the cutoff needs to require a runner version that pauses on hook and teardown failures before the remaining cleanup
| locations: locationPatterns, | ||
| testIds, | ||
| timeout: 0, | ||
| pauseAtEnd: isSingleTest, |
There was a problem hiding this comment.
isSingleTest is calculated separately for each confi so selecting one test from each of two configs makes the first passing test pause and blocks the second config
the existing enqueuedSingleTest flag from the overall request could be passed through as an additional guard
Summary