|
8 | 8 | <PropertyGroup Condition="'$(TargetOS)' == 'Browser'">
|
9 | 9 | <!-- This doesn't run on V8 because it lacks websocket support -->
|
10 | 10 | <Scenario>WasmTestOnBrowser</Scenario>
|
11 |
| - <TestArchiveTestsRoot>$(TestArchiveRoot)browseronly/</TestArchiveTestsRoot> |
| 11 | + <TestArchiveTestsRoot>$(TestArchiveRoot)browserornodejs/</TestArchiveTestsRoot> |
12 | 12 | <TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
|
13 | 13 | <DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
|
14 | 14 | </PropertyGroup>
|
|
20 | 20 | <WasmExtraFilesToDeploy Include="package-lock.json" />
|
21 | 21 | </ItemGroup>
|
22 | 22 |
|
23 |
| - <ItemGroup Condition="'$(OS)' != 'Windows_NT'"> |
24 |
| - <!-- WebSocket tests use self-signed certificates for wss protocol that are refused by NodeJS --> |
25 |
| - <SetScriptCommands Include="if [[ "$SCENARIO" == "WasmTestOnNodeJs" || "$SCENARIO" == "wasmtestonnodejs" ]]; then export NODE_TLS_REJECT_UNAUTHORIZED=0; fi" /> |
26 |
| - <SetScriptCommands Include="if [[ "$SCENARIO" == "WasmTestOnNodeJs" || "$SCENARIO" == "wasmtestonnodejs" ]]; then export WASM_XHARNESS_MONO_ARGS=--setenv=NPM_MODULES=ws:WebSocket; fi" /> |
27 |
| - <!-- Restore NPM packages --> |
28 |
| - <RunScriptCommands Include="if [[ "$SCENARIO" == "WasmTestOnNodeJs" || "$SCENARIO" == "wasmtestonnodejs" ]]; then npm ci; fi" /> |
29 |
| - </ItemGroup> |
30 |
| - <ItemGroup Condition="'$(OS)' == 'Windows_NT'"> |
31 |
| - <!-- WebSocket tests use self-signed certificates for wss protocol that are refused by NodeJS --> |
32 |
| - <SetScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( set "NODE_TLS_REJECT_UNAUTHORIZED=0" )" /> |
33 |
| - <SetScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( set "WASM_XHARNESS_MONO_ARGS=--setenv=NPM_MODULES=ws:WebSocket" )" /> |
34 |
| - <!-- Restore NPM packages --> |
35 |
| - <RunScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( call npm ci )" /> |
36 |
| - </ItemGroup> |
| 23 | + <Target Name="ProvideNpmRestoreScripts" BeforeTargets="GenerateRunScript"> |
| 24 | + <ItemGroup Condition="'$(OS)' != 'Windows_NT'"> |
| 25 | + <!-- WebSocket tests use self-signed certificates for wss protocol that are refused by NodeJS --> |
| 26 | + <SetScriptCommands Include="if [[ "$SCENARIO" == "WasmTestOnNodeJs" || "$SCENARIO" == "wasmtestonnodejs" ]]; then export NODE_TLS_REJECT_UNAUTHORIZED=0; fi" /> |
| 27 | + <SetScriptCommands Include="if [[ "$SCENARIO" == "WasmTestOnNodeJs" || "$SCENARIO" == "wasmtestonnodejs" ]]; then export WasmXHarnessMonoArgs="$WasmXHarnessMonoArgs --setenv=NPM_MODULES=ws:WebSocket"; fi" /> |
| 28 | + <!-- Restore NPM packages --> |
| 29 | + <RunScriptCommands Include="if [[ "$SCENARIO" == "WasmTestOnNodeJs" || "$SCENARIO" == "wasmtestonnodejs" ]]; then npm ci; fi" /> |
| 30 | + </ItemGroup> |
| 31 | + <ItemGroup Condition="'$(OS)' == 'Windows_NT'"> |
| 32 | + <!-- WebSocket tests use self-signed certificates for wss protocol that are refused by NodeJS --> |
| 33 | + <SetScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( set "NODE_TLS_REJECT_UNAUTHORIZED=0" )" /> |
| 34 | + <SetScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( set "WasmXHarnessMonoArgs=%WasmXHarnessMonoArgs% --setenv=NPM_MODULES^=ws:WebSocket" )" /> |
| 35 | + <!-- Restore NPM packages --> |
| 36 | + <RunScriptCommands Include="if /I [%SCENARIO%]==[WasmTestOnNodeJS] ( call npm ci )" /> |
| 37 | + </ItemGroup> |
| 38 | + </Target> |
37 | 39 |
|
38 | 40 | <!-- Browser specific files -->
|
39 | 41 | <ItemGroup Condition="'$(TargetOS)' == 'Browser'">
|
|
0 commit comments