Commit Graph

69 Commits

Author SHA1 Message Date
Ladislau Szomoru
4d7c56ee82 Engineering - Add GitHub action for pull requests (#254056)
* Test - handle running tests as part of a GitHub action

* Add GitHub action files
2025-07-04 08:21:56 +00:00
Benjamin Pasero
cdf404ff47 debt - restore old layer name (#250928) 2025-06-09 07:08:43 +00:00
Samuel Rigaud
e975fc9be8 test: fix typos (#247259)
Co-authored-by: Samuel Rigaud <rigaud@gmail.com>
2025-04-23 23:38:49 +00:00
Benjamin Pasero
7d2083ed1d tests - allow to run our tests in chrome or msedge (#244969) 2025-03-28 08:17:16 -07:00
João Moreno
ae43cc72b6 make unit tests faster (#241847) 2025-02-25 15:18:20 +01:00
Benjamin Pasero
c5b6ef14e6 esm - more cleanup (#230285) 2024-10-02 11:55:17 +02:00
Benjamin Pasero
332b89f198 esm - remove AMD build scripts, tests and variables 2024-09-27 08:04:01 +02:00
Sandeep Somavarapu
ebc02af2d8 rename electron-node to electron-utility (#227672) 2024-09-05 00:49:23 -07:00
Sandeep Somavarapu
01fcf004a6 Use electron net directly in shared process (#227553)
* Use electron net directly in shared process

* add built file

* introduce shared electron-node layer

* remove electron-utility layer

* fix (overlook): move back cli files to node
2024-09-04 07:26:43 -07:00
Benjamin Pasero
f0417069c6 esm - restore lost changes in tests from migration (#227225) 2024-08-30 09:12:48 -07:00
Benjamin Pasero
6b924c5152 ESM merge to main (#227184)
Co-authored-by: Johannes Rieken <jrieken@microsoft.com>
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
2024-08-30 10:31:46 +02:00
Benjamin Pasero
48bf32d320 esm - fix browser tests to run (#225791) 2024-08-16 17:13:07 +02:00
Benjamin Pasero
02fcc994ac esm - port over unit test changes (#225711) 2024-08-15 19:58:52 +02:00
Benjamin Pasero
4c1b0e9ff1 esm - reduce diff (#224919)
* esm - reduce diff

* .

* .

* .

* .

* .
2024-08-06 17:32:43 +03:00
Alex Ross
eb4633fe7f Re-merge introduction of tree sitter (#223474)
* Make space for tree sitter

* Add the tree sitter wasm file

* Very naive tree-sitter syntax highlighting for html, with a layer breaker

* Update tree when content changes

* WIP for making abstract tokens class

* Handle theme changes

* Replace entire text model value with parse callback

* Perf improvements

* Add tree-sitter-typescript

* Add typescript + better initial parsing

* Refactor into tree parsing service and fix flaw in parse callback

* Remove things that aren't the parser service

* Add yielding

* Remove changes that aren't required for PR

* Remove more file changes

* Reduce yield to 50 ms

* Fix incremental parsing

* Try update node-abi

* Revert "Try update node-abi"

This reverts commit df28801e31.

* Update text buffer chunk api

* fix build

* Remove tree-sitter dependency

* Adopt new, as yet unpublished, `@vscode/tree-sitter-wasm` package

* Use published `@vscode/tree-sitter-wasm` package

* Break `TreeSitterTree` and `TreeSitterParserService` into better pieces
and:
- document the order of editor changes
- use service injection where `TextModel` is constructed

* Fix tests

* Remove unneeded import

* Fix missing tree-sitter-wasm in web and remote

* Make package.jsons match

* Add @vscode/tree-sitter-wasm to web loader config

* Try using importAMDNodeModule

* PR feedback

* Add race condition test for changing language while loading language

* Use same timeout

* Queue content changes

* Remove override dispose

* Move queue into TreeSitterTree

---------

Co-authored-by: Peng Lyu <penn.lv@gmail.com>
2024-07-29 11:31:28 +02:00
Alex Ross
7ed4cdc56d Revert "Add telemtry for how long it takes to parse files with tree-sitter" (#223317)
Revert "Add telemtry for how long it takes to parse files with tree-sitter (#…"

This reverts commit 6c15586994.
2024-07-24 08:47:51 +02:00
Alex Ross
6c15586994 Add telemtry for how long it takes to parse files with tree-sitter (#213565)
* Make space for tree sitter

* Add the tree sitter wasm file

* Very naive tree-sitter syntax highlighting for html, with a layer breaker

* Update tree when content changes

* WIP for making abstract tokens class

* Handle theme changes

* Replace entire text model value with parse callback

* Perf improvements

* Add tree-sitter-typescript

* Add typescript + better initial parsing

* Refactor into tree parsing service and fix flaw in parse callback

* Remove things that aren't the parser service

* Add yielding

* Remove changes that aren't required for PR

* Remove more file changes

* Reduce yield to 50 ms

* Fix incremental parsing

* Try update node-abi

* Revert "Try update node-abi"

This reverts commit df28801e31.

* Update text buffer chunk api

* fix build

* Remove tree-sitter dependency

* Adopt new, as yet unpublished, `@vscode/tree-sitter-wasm` package

* Use published `@vscode/tree-sitter-wasm` package

* Break `TreeSitterTree` and `TreeSitterParserService` into better pieces
and:
- document the order of editor changes
- use service injection where `TextModel` is constructed

* Fix tests

* Remove unneeded import

* Fix missing tree-sitter-wasm in web and remote

* Make package.jsons match

* Add @vscode/tree-sitter-wasm to web loader config

* Try using importAMDNodeModule

* PR feedback

* Add race condition test for changing language while loading language

* Use same timeout

* Queue content changes

* Remove override dispose

* Move queue into TreeSitterTree

---------

Co-authored-by: Peng Lyu <penn.lv@gmail.com>
2024-07-23 14:59:04 +02:00
Benjamin Pasero
f6f90e0163 Implement NLS without AMD loader (#214588) 2024-06-28 11:55:48 +02:00
Connor Peet
81ea8669f2 eng: support runGlob in browser unit tests (#199979)
Fixes #183507
2023-12-04 12:14:25 -08:00
Daniel Imms
1532b5aebd Add xterm scope to moore places 2023-11-02 06:34:09 -07:00
João Moreno
a5d71aad39 Cleanup dependencies (#195026)
* move build dependencies to devDependencies

* build: bump tree-sitter

* dependencies cleanup

* remove leftover file
2023-10-09 09:34:15 +02:00
Connor Peet
31067371f2 eng: fix snapshot tests in macos webkit for real? (#193734)
Second attempt at this, which should work. Stop trying to use
exposeFunction, which seems to work poorly on macOS webkit in CI, and
just run a server with HTTP endpoints to do the "RPC."

Reuses Alex's "yaserver" module that we were already using for other
tests. Uses a secure random prefix for security in each run.
2023-09-21 22:48:21 +01:00
Connor Peet
8730f56c09 eng: add io warmup for webkit tests in ci (#193711)
Should fix the issue that @roblourens and @Yoyokrazy were hitting with snapshot tests on macOS WebKit in CI. Not pretty, but I'd rather do this than spend a bunch of time chasing down something that certainly seems to be a browser issue.
2023-09-21 11:03:20 -07:00
Johannes
8f4d4d4bad workaround browser bug, fix browser test debugging 2023-09-05 11:47:13 +02: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
Benjamin Pasero
424388032a tests - increase timeout when running in CI (#182288) 2023-05-12 13:02:15 +02: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
Alexandru Dima
06b97f6be7 Add more logging and perf markers around resolving the connection token and the socket factory (#170490)
* Add more logging and perf markers around resolving the connection token and the socket factory

* set `exposeFunction` earlier

* bla windows

* also expose function for unit tests beofre opening

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2023-01-05 10:17:19 +01: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
86e7410278 unit tests - help diagnose test failure reason for web tests (#155967) 2022-07-22 18:50:34 +02:00
Alexandru Dima
3530e85ba8 Properly return a non 0 exit code in case a test times out and fix tests which used to time out (#152329) 2022-06-16 13:02:37 +00:00
Johannes
0656d21d11 auto-fixed prefer-const violation 2022-06-08 17:49:21 +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
Alex Dima
cab9713422 Fixes #141994: Address eslint problems 2022-02-02 13:18:12 +01:00
Benjamin Pasero
9be2757019 🆙 playwright@1.18 (#140767)
* tests - use `@playwright/test@1.18.0-rc1`

* fix bad dependency

* clear more weird ts dependencies
2022-01-15 09:35:39 +01:00
Benjamin Pasero
eecbd962ef debt - rename iconv-lite-umd package (#140650) 2022-01-14 07:28:41 +01:00
Benjamin Pasero
af5de88a44 tests - add --sequential option and use in CI runs 2022-01-11 10:48:20 +01:00
Connor Peet
fa9255c0de almost complete update for run configurations 2021-07-12 17:28:01 -07:00
Connor Peet
583f6d1418 open the devtools for browser tests when debug is passed 2021-07-07 12:58:19 -07:00
Robo
92999c339e fix: setuid helper permission (#126798)
* ci: fix setuid helper binary permission

* ci: allow privilege for CLONE_NEWPID | CLONE_NEWNET

* ci: fix chrome-sandbox permission with rpm

* ci: fix permissions on snap

* ci: download electron earlier for arm builds
2021-06-22 08:42:30 -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
Benjamin Pasero
e2954beb4b Remove --no-sandbox (#122909)
* linux - remove `--no-sandbox` flag

We should not disable sandbox on Linux.
We only added this to support running on Kernel <= 3.8 where setuid sandbox is used.

* fix ci

* add some docs
2021-05-04 11:18:19 +02:00
Benjamin Pasero
7a6a45fb2c browser tests - fix regression from updating playwright 2021-02-02 16:53:30 +01:00
Johannes Rieken
b90166177b reuse stats collector for EchoRunner, fix missing titlePath-property, fixes https://github.com/microsoft/vscode/issues/114190 2021-01-12 11:21:32 +01:00
Connor Peet
04d7411785 eng: update mocha 2 -> 8 2020-12-17 11:24:15 -08:00
Ladislau Szomoru
41b661eb3d Add process.arch into unit test results file names 2020-08-18 18:08:37 +02:00
Ladislau Szomoru
cf4e4c1754 Add JUnit reporter for unit tests (#104354) 2020-08-10 11:20:34 +02:00