Commit Graph

23 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
Robo
e5f61433b5 chore: update to Electron 22 (#177600)
* Revert "chore: revert to Electron 19 (#175851)"

This reverts commit 3a11b47eee.

* chore: bump electron@22.3.3

* build: use custom version for V8 sandbox

* chore: update electron@22.4.1

* chore: enable forceAllocationsToV8Sandbox for extension host

* chore: bump electron@22.4.2

* chore: bump electron@22.4.3

* sandbox - cleanup from electron 22 update (#178919)

* Revert "chore: revert to Electron 19 (#175851)"

This reverts commit 3a11b47eee.

* chore: bump electron@22.3.3

* build: use custom version for V8 sandbox

* chore: update electron@22.4.1

* chore: enable forceAllocationsToV8Sandbox for extension host

* chore: bump electron@22.4.2

* chore: bump electron@22.4.3

* temp: update distro

* sandbox - cleanup from electron 22 update

* missing comile

* more changes

* fix build

* restore

* 💄

* compile

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2023-04-03 09:09:31 +02:00
Johannes
d555777b1a simplify _VSCODE_NODE_MODULES util 2022-11-18 09:42:32 +01:00
Johannes
824c70b275 fix node tests 2022-11-18 09:42:15 +01:00
Raymond Zhao
9feaed8f51 Revert "joh/representative canidae" (#166641) 2022-11-17 13:53:17 -08:00
Johannes
6dd2726c73 simplify _VSCODE_NODE_MODULES util 2022-11-17 17:58:51 +01:00
Johannes
1a0223da3f fix node tests 2022-11-17 17:19:29 +01:00
Alexandru Dima
a68f9da5fe There is no need to pass in nodeMain when passing in baseUrl (#160893) 2022-09-14 13:04:14 +02:00
Johannes
0656d21d11 auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
Benjamin Pasero
08ac1bb67c tests - improve exclusion handling for node.js tests 2022-04-21 17:10:16 +02:00
Benjamin Pasero
12500e46ac properly skip unit test (#137853) 2022-04-11 17:02:34 +02:00
Benjamin Pasero
9a78ee3b1a unit - skip all tests for test component in node 2022-04-05 17:27:24 +02:00
Benjamin Pasero
2ada17080c Use playwright for desktop smoke tests (#146692)
* Use `playwright` for desktop smoke tests

* fix distro issues

* tests - enable prefs tests for web
2022-04-04 10:13:08 +02:00
Connor Peet
6fcf02f29a testing: re-enable possibly fixed tests 2022-04-01 13:20:50 -07:00
Robo
32d40cf44e chore: update to electron 17 (#143223)
* chore: bump electron@17.0.0

* Revert "chore: revert to electron@13 (#143851)"

This reverts commit df645f1450.

* chore: bump electron@17.1.0

* Revert "ci: fix build with latest node-gyp"

This reverts commit c3e948aa30.

* chore: revert ci changes for node v16

* chore: update yarn.lock

* chore: bump electron@17.1.1
2022-03-11 00:51:37 +09:00
Robo
df645f1450 chore: revert to electron@13 (#143851)
* Revert "chore: update to electron 16 (#137241)"

This reverts commit 01df559c18.
This reverts commit 46301339b7

* ci: fix remote compiler for sdl-scan

* chore: fix remote/.yarnrc

* chore: fix build/npm/postinstall.js

* chore: rm crash reporter from shared process

* chore: rm crash reporter from ext host

* chore: fix build/lib/layersChecker.ts

* :chore: preserve some more changes

* fix tests

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2022-02-24 17:49:49 +01:00
Benjamin Pasero
f613ab462e tests - skip some, enable some 2022-02-09 07:14:42 +01:00
Alex Dima
cab9713422 Fixes #141994: Address eslint problems 2022-02-02 13:18:12 +01:00
Alex Dima
1498d0f340 Add explicit layers for editor contributions (fixes #140995) 2022-01-21 10:29:55 +01:00
Connor Peet
2b19344369 testing: debug test failures
For #137853
2021-12-14 11:29:14 -08:00
Benjamin Pasero
687521092d smoke - print running tasks after smoke test run 2021-11-29 10:12:42 +01:00
Benjamin Pasero
12178a4cf7 unit - exclude more tests for node.js runs (#137853) 2021-11-29 10:02:03 +01:00
Benjamin Pasero
754190f326 Run unit tests against node.js too (#137790)
* tests - run unit tests also against node.js

* fixes

* fail if major node.js version mismatch

* -tfs is unsupported

* Add `@ts-check` and remove `jsdom`

* tests - process.env layer breaker

* Improve loader config

* skip one test

* address todos

* try to force color output

* Use a file: URI as baseUrl

Co-authored-by: Alex Dima <alexdima@microsoft.com>
2021-11-24 13:45:17 +01:00