vscode/test
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
..
automation Add Settings editor smoke tests (take 2) (#189867) 2023-08-08 13:01:53 -07:00
integration chore: update to Electron 25 (#188268) 2023-08-07 21:46:27 +09:00
leaks add leak test scaffolding 2021-05-06 14:45:12 +02:00
monaco Re-enable running our eslint rules using ts-node (#159495) 2022-08-30 08:40:04 +02:00
smoke Add Settings editor smoke tests (take 2) (#189867) 2023-08-08 13:01:53 -07:00
unit eng: add support for snapshot tests (#190444) 2023-08-15 12:03:51 -07:00
.mocharc.json eng: update mocha 2 -> 8 2020-12-17 11:24:15 -08:00
cgmanifest.json
README.md Cleanup package.json test scripts (#141210) 2022-01-22 13:07:14 +01:00

VSCode Tests

Contents

This folder contains the various test runners for VSCode. Please refer to the documentation within for how to run them:

  • unit: our suite of unit tests (README)
  • integration: our suite of API tests (README)
  • smoke: our suite of automated UI tests (README)