playwright/packages/playwright-test/src
Andrey Lushnikov b0daa7754f
feat: filter stack traces to exclude test runner frames (#11795)
Before:

```bash
Running 1 test using 1 worker
  1) [chromium] › tests/example.spec.ts:3:1 › should work ==========================================

    Error: expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

      2 |
      3 | test('should work', async({page}) => {
    > 4 |   expect(1).toBe(2);
        |             ^
      5 | });
      6 |

        at Proxy.<anonymous> (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/expect.ts:151:30)
        at /Users/andreylushnikov/tmp/tests/example.spec.ts:4:13
        at /Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:335:13
        at runNextTicks (node:internal/process/task_queues:61:5)
        at processImmediate (node:internal/timers:437:9)
        at TestInfoImpl._runFn (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/testInfo.ts:164:7)
        at WorkerRunner._runTestWithBeforeHooks (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:317:24)
        at TimeoutRunner.run (/Users/andreylushnikov/prog/playwright/packages/playwright-core/src/utils/async.ts:48:14)
        at TestInfoImpl._runWithTimeout (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/testInfo.ts:151:7)
        at WorkerRunner._runTestOrAllHook (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:276:5)
        at WorkerRunner._runSuite (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:190:11)
        at WorkerRunner.run (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/workerRunner.ts:137:9)
        at process.<anonymous> (/Users/andreylushnikov/prog/playwright/packages/playwright-test/src/worker.ts:87:5)
```

after:

```
Running 1 test using 1 worker
  1) [chromium] › tests/example.spec.ts:3:1 › should work ==========================================

    Error: expect(received).toBe(expected) // Object.is equality

    Expected: 2
    Received: 1

      2 |
      3 | test('should work', async({page}) => {
    > 4 |   expect(1).toBe(2);
        |             ^
      5 | });
      6 |

        at /Users/andreylushnikov/tmp/tests/example.spec.ts:4:13
```
2022-02-01 18:40:44 -08:00
..
matchers chore(test runner): extract TestInfoImpl (#11725) 2022-01-28 17:39:42 -08:00
reporters fix(html-reporter): open tests from required file (#11784) 2022-02-01 11:01:52 -08:00
third_party fix(baseurl): support path-less baseurl (#11527) 2022-01-20 18:11:56 -08:00
cli.ts fix(debug): don't apply infinite timeouts when using debugger (#11785) 2022-02-01 11:51:37 -08:00
dispatcher.ts chore(test-runner): force colors in worker processes (#11799) 2022-02-01 17:29:15 -08:00
expect.ts feat: support clarification message for expect (#11735) 2022-01-31 17:14:59 -08:00
experimentalLoader.ts fix(test runner): resolve tsconfig for each file (#11662) 2022-01-26 18:28:42 -08:00
fixtures.ts feat(breaking): always report onBegin/onEnd, report file errors (#11758) 2022-01-31 17:09:04 -08:00
globals.ts chore(test runner): extract TestInfoImpl (#11725) 2022-01-28 17:39:42 -08:00
index.ts fix(fixtures): make sure defaultLaunchOptions are always there (#11713) 2022-01-28 10:51:55 -08:00
ipc.ts chore(test runner): create TestResult instances lazily in dispatcher (#10921) 2021-12-14 14:10:56 -08:00
loader.ts chore: do not expose suite load error (#11797) 2022-02-01 15:34:16 -08:00
profiler.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
project.ts test: expose repeatEachIndex (#11158) 2022-01-03 17:29:54 -08:00
runner.ts chore: do not expose suite load error (#11797) 2022-02-01 15:34:16 -08:00
test.ts chore: do not expose suite load error (#11797) 2022-02-01 15:34:16 -08:00
testInfo.ts chore(test runner): extract TestInfoImpl (#11725) 2022-01-28 17:39:42 -08:00
testType.ts docs: fix broken link (#11687) 2022-01-27 13:00:09 -08:00
transform.ts chore: allow pre-processing scripts (#11702) 2022-01-27 14:32:23 -08:00
types.ts chore(test runner): extract TestInfoImpl (#11725) 2022-01-28 17:39:42 -08:00
util.ts feat: filter stack traces to exclude test runner frames (#11795) 2022-02-01 18:40:44 -08:00
webServer.ts feat(test-runner): wait for a url before starting tests (#10138) 2022-01-26 16:32:58 -08:00
worker.ts chore(test runner): extract TestInfoImpl (#11725) 2022-01-28 17:39:42 -08:00
workerRunner.ts feat(breaking): always report onBegin/onEnd, report file errors (#11758) 2022-01-31 17:09:04 -08:00