In order to be able to run tests, the following JavaScript engines should be installed:
- V8
- JavaScriptCore
- SpiderMonkey
They can be installed as a part of jsvu.
Please make sure that a JavaScript engine binary is available via command line, e.g. for V8:
$ v8
V8 version 8.5.62If you use jsvu, first add its location to PATH variable
e.g. for V8
PATH=/Users/<your_user>/.jsvu/:$PATH V8Now we're ready to build everything for WebAssembly (for more details, please read this document):
./build.sh -os Browser -c Releaseand even run tests one by one for each library:
./build.sh libs.tests -test -os Browser -c Release
The following shows how to run tests for a specific library
./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release
It's possible to set a JavaScript engine explicitly by adding /p:JSEngine property:
./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:JSEngine=SpiderMonkey
At the moment supported values are:
V8JavaScriptCoreSpiderMonkey
By default, V8 engine is used.
TBD
TBD
TBD