Commit Graph

16 Commits

Author SHA1 Message Date
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
Benjamin Pasero
424388032a tests - increase timeout when running in CI (#182288) 2023-05-12 13:02:15 +02:00
Benjamin Pasero
0a7226e9ad Revert "Increase timeout of web unit tests" (#157065)
Revert "Increase timeout of web unit tests (#156894)"

This reverts commit f86beb18e8.
2022-08-04 11:52:56 +02:00
Benjamin Pasero
f86beb18e8 Increase timeout of web unit tests (#156894)
* Windows: some Firefox web tests are timing out randomly (#155760)

See if this is a fundamental issue or really Firefox is slower.

* mention issue
2022-08-03 06:55:58 +02:00
Benjamin Pasero
eecbd962ef debt - rename iconv-lite-umd package (#140650) 2022-01-14 07:28:41 +01:00
Connor Peet
fa9255c0de almost complete update for run configurations 2021-07-12 17:28:01 -07:00
Henning Dieterichs
00123b32a7 Updates sinon from 1.17 to 11.1. 2021-06-09 10:03:46 +02:00
Henning Dieterichs
294b3bdf16 Revert "Include sinon-test in renderer.html / index.html"
This reverts commit e4e0f8be89.
2021-06-08 17:18:34 +02:00
Henning Dieterichs
e4e0f8be89 Include sinon-test in renderer.html / index.html 2021-06-08 17:16:54 +02:00
Connor Peet
04d7411785 eng: update mocha 2 -> 8 2020-12-17 11:24:15 -08:00
Fedor Nezhivoi
05613d7a1c Move read and write logic from nativeTextFileService to textFileService for #79275 (#100804)
* move encoding logic from NativeTextFileService to AbstractTextFileService for #79275

* some cleanup things - just cosmetic

* fix tests

* review

* use correct comparison

Co-authored-by: Benjamin Pasero <benjpas@microsoft.com>
2020-07-03 15:55:44 +02:00
Daniel Imms
5cfae257fd Merge pull request #90245 from microsoft/tyriar/browser_tests
Move terminal unit tests to browser and common
2020-02-10 04:58:40 -08:00
Benjamin Pasero
cdf4026fb6 Add browser unit tests to product build (#90353)
* wip - add browser unit tests to product build

* run with more output

* load loader via script tag
2020-02-10 12:44:28 +01:00
Daniel Imms
8a4cd00f8f Move terminal tests to common and browser 2020-02-07 08:52:37 -08:00
Alex Dima
97f826b007 Move assert.js into test/unit 2020-02-07 12:32:06 +01:00
Benjamin Pasero
5393954877 tests - have a test/unit folder 2020-02-07 09:51:28 +01:00