Commit Graph

27 Commits

Author SHA1 Message Date
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
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
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
Daniel Imms
1532b5aebd Add xterm scope to moore places 2023-11-02 06:34:09 -07: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
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