mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
16a779a5ff
Previously, reporter would look for a stack frame directly in the test file. Often times, that is not a top stack frame, especially when the test uses some helper functions. This changes error snippets and locations to use the top frame. When top frame does not match the test file, we additionally show the location to avoid confusion: ``` 1) a.spec.ts:7:7 › foobar ======================================================================== Error: oh my at helper.ts:5 3 | 4 | export function ohMy() { > 5 | throw new Error('oh my'); | ^ 6 | } 7 | at ohMy (.../reporter-base-should-print-codeframe-from-a-helper/helper.ts:5:15) at .../reporter-base-should-print-codeframe-from-a-helper/a.spec.ts:8:9 at FixtureRunner.resolveParametersAndRunHookOrTest (.../src/fixtures.ts:281:12) ``` |
||
---|---|---|
.. | ||
src | ||
types | ||
.npmignore | ||
cli.js | ||
index.d.ts | ||
index.js | ||
index.mjs | ||
package.json | ||
README.md | ||
reporter.d.ts | ||
reporter.js | ||
reporter.mjs |
@playwright/test
This package contains Playwright Test. A test-runner for writing idiomatic and reliable end-to-end tests with Playwright.