Commit Graph

8 Commits

Author SHA1 Message Date
Connor Peet
358a3a65d3 fix incomplete coverage reports on macos (#212639)
* eng: fix incomplete coverage reports on macos

Wait for stdout to drain before exiting

* better fix
2024-05-13 15:27:00 -07:00
Connor Peet
41f6f5ad6e yea actually that doesn't work 2024-05-08 20:57:52 -07:00
Connor Peet
2aa1079dbb just use v8-to-istanbul 2024-05-08 15:42:43 -07:00
Connor Peet
6a847ba6d1 eng: add support for snapshot tests (#190444)
* eng: add support for snapshot tests

This adds Jest-like support for snapshot testing.
Developers can do something like:

```js
await assertSnapshot(myComplexObject)
```

The first time this is run, the snapshot expectation file is written
to a `__snapshots__` directory beside the test file. Subsequent runs
will compare the object to the snapshot, and fail if it doesn't match.

You can see an example of this in the test for snapshots themselves!

After a successful run, any unused snapshots are cleaned up. On a failed
run, a gitignored `.actual` snapshot file is created beside the
snapshot for easy processing and inspection.

Shortly I will do some integration with the selfhost test extension to
allow developers to easily update snapshots from the vscode UI.

For #189680

cc @ulugbekna @hediet

* fix async stacktraces getting clobbered

* random fixes

* comment out leak detector, for now

* add option to snapshot file extension
2023-08-15 12:03:51 -07:00
Alex Dima
cab9713422 Fixes #141994: Address eslint problems 2022-02-02 13:18:12 +01:00
Henning Dieterichs
98c1725c7d Encode actual and expected value as JSON to enable https://github.com/microsoft/vscode-selfhost-test-provider/pull/2.
Only a proof of concept yet.
2021-09-13 18:44:06 +02:00
Connor Peet
fa8ccff4d8 testing: initial output correlation 2021-08-11 13:08:58 -07:00
Connor Peet
2b5ae783bf testing: add full json reporter to show more complete output 2021-01-13 15:30:11 -08:00