browser tests on other ports

This commit is contained in:
SheetJS 2026-02-02 03:04:50 -05:00
parent ef89abda1f
commit 5633b2387a
19 changed files with 177 additions and 4 deletions

@ -303,7 +303,7 @@
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
<Cell ss:StyleID="s16"><Data ss:Type="String"></Data></Cell>
<Cell ss:StyleID="s16"><Data ss:Type="String"></Data></Cell>
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
<Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell>
</Row>

@ -1116,12 +1116,40 @@ This demo was tested in the following deployments:
|:-------------|:--------|:-----------|
| `darwin-x64` | `2.2.1` | 2026-01-21 |
| `darwin-arm` | `2.2.1` | 2026-01-23 |
| `win11-x64` | `2.2.1` | 2025-04-17 |
| `win11-x64` | `2.2.1` | 2026-02-02 |
| `win11-arm` | `2.2.1` | 2026-02-02 |
| `linux-x64` | `2.2.1` | 2026-01-08 |
| `linux-arm` | `2.2.1` | 2025-04-18 |
:::
:::caution pass
The `ducc` crate cannot compile Duktape from source in Windows on ARM, so the
x64 Rust toolchain must be used through the X64 compatibility layer.
<details>
<summary><b>Windows on ARM steps</b> (click to show)</summary>
The following commands switch to the X64 toolchain:
```pwsh
rustup toolchain install stable-x86_64-pc-windows-msvc --force-non-host
rustup default stable-x86_64-pc-windows-msvc --force-non-host
```
---
The following command switches back to the native toolchain:
```pwsh
rustup default stable
```
</details>
:::
1) Create a new project:
```bash

@ -100,6 +100,9 @@ Asterisks (✱) in the Windows columns mark tests that were run in Windows
Subsystem for Linux (WSL). In some cases, community efforts have produced forks
with native Windows support.
Crosses (✘) mark tests for Windows on ARM that use the X64 compatibility layer.
Proper Windows x64 binaries were cross-compiled and run in Windows on ARM.
Blank cells mark untested or unsupported configurations. With cross-compilation,
V8 can run natively in Windows on ARM. The `win11-arm` platform is not tested
since the official build infrastructure does not support Windows on ARM and the

@ -41,10 +41,10 @@ These instructions were tested on the following platforms:
| Platform | Architecture | Test Date |
|:------------------------------|:-------------|:-----------|
| Linux (Ubuntu Linux x64) | `linux-x64` | 2025-07-06 |
| Linux (Ubuntu Linux x64) | `linux-x64` | 2026-02-02 |
| Linux (Debian Linux AArch64) | `linux-arm` | 2025-01-14 |
| MacOS 15.6 (x64) | `darwin-x64` | 2026-01-21 |
| MacOS 15.2 (ARM64) | `darwin-arm` | 2025-03-07 |
| MacOS 15.7 (ARM64) | `darwin-arm` | 2026-02-02 |
| Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2025-06-20 |
| Windows 11 (ARM) + WSL Ubuntu | `win11-arm` | 2025-02-23 |
@ -734,6 +734,20 @@ Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/)
^^^^^^^^^^^^^^^^^^^^ URL
```
:::info pass
The local server is configured to start on port 8000. If another service is
listening on that port, the process will fail to start.
If the other process cannot be stopped, run the server manually. The following
snippet starts a server on port 9999:
```bash
npx -y http-server -p 9999 tests
```
:::
11) Open a browser window and access the displayed URL.
## Development

37
tests/engines/duktape-rust.ps1 Executable file

@ -0,0 +1,37 @@
#!/usr/bin/env pwsh
# https://docs.sheetjs.com/docs/demos/engines/duktape#rust-demo
$oldDir = Get-Location
$tempDir = Join-Path -Path $env:TEMP -ChildPath "sheetjs-duk-rs"
if (Test-Path -Path $tempDir) { Remove-Item -Path $tempDir -Recurse -Force }
New-Item -ItemType Directory -Path $tempDir | Out-Null
Set-Location -Path $tempDir
cargo new sheetjs-duk-rs
Set-Location -Path "sheetjs-duk-rs"
$version = "0.20.3"
Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-$version/package/dist/shim.min.js" -OutFile "src\shim.min.js"
Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-$version/package/dist/xlsx.full.min.js" -OutFile "src\xlsx.full.min.js"
Invoke-WebRequest -Uri "https://docs.sheetjs.com/pres.numbers" -OutFile "pres.numbers"
Invoke-WebRequest -Uri "https://docs.sheetjs.com/duk/main.rs" -OutFile "src\main.rs"
cargo add ducc base64
# On Windows ARM, ducc-sys fails to compile Duktape from source (intptr type detection issue).
# Use x64 Rust toolchain through Windows ARM x64 emulation (similar to Bun's approach).
$isWindowsArm = $env:PROCESSOR_ARCHITECTURE -eq "ARM64"
if ($isWindowsArm) {
# Install x64 toolchain with --force-non-host to allow cross-compilation
rustup toolchain install stable-x86_64-pc-windows-msvc --force-non-host
rustup default stable-x86_64-pc-windows-msvc --force-non-host
cargo run -- pres.numbers
rustup default stable
} else {
cargo run -- pres.numbers
}
npx -y xlsx-cli sheetjsw.xlsb
Set-Location $oldDir
Remove-Item -Path $tempDir -Recurse -Force

@ -0,0 +1,6 @@
# https://docs.sheetjs.com/docs/demos/mobile/capacitor
Write-Host "These tests must be run manually. You can find the demo at:"
Write-Host ""
Write-Host " https://docs.sheetjs.com/docs/demos/mobile/capacitor"
Write-Host ""

7
tests/mobile/capacitor.sh Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# https://docs.sheetjs.com/docs/demos/mobile/capacitor
echo "These tests must be run manually. You can find the demo at:"
echo ""
echo " https://docs.sheetjs.com/docs/demos/mobile/capacitor"
echo ""

6
tests/mobile/flutter.ps1 Normal file

@ -0,0 +1,6 @@
# https://docs.sheetjs.com/docs/demos/mobile/flutter
Write-Host "These tests must be run manually. You can find the demo at:"
Write-Host ""
Write-Host " https://docs.sheetjs.com/docs/demos/mobile/flutter"
Write-Host ""

7
tests/mobile/flutter.sh Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# https://docs.sheetjs.com/docs/demos/mobile/flutter
echo "These tests must be run manually. You can find the demo at:"
echo ""
echo " https://docs.sheetjs.com/docs/demos/mobile/flutter"
echo ""

6
tests/mobile/ionic.ps1 Normal file

@ -0,0 +1,6 @@
# https://docs.sheetjs.com/docs/demos/mobile/ionic
Write-Host "These tests must be run manually. You can find the demo at:"
Write-Host ""
Write-Host " https://docs.sheetjs.com/docs/demos/mobile/ionic"
Write-Host ""

7
tests/mobile/ionic.sh Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# https://docs.sheetjs.com/docs/demos/mobile/ionic
echo "These tests must be run manually. You can find the demo at:"
echo ""
echo " https://docs.sheetjs.com/docs/demos/mobile/ionic"
echo ""

6
tests/mobile/lynx.ps1 Normal file

@ -0,0 +1,6 @@
# https://docs.sheetjs.com/docs/demos/mobile/lynx
Write-Host "These tests must be run manually. You can find the demo at:"
Write-Host ""
Write-Host " https://docs.sheetjs.com/docs/demos/mobile/lynx"
Write-Host ""

7
tests/mobile/lynx.sh Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# https://docs.sheetjs.com/docs/demos/mobile/lynx
echo "These tests must be run manually. You can find the demo at:"
echo ""
echo " https://docs.sheetjs.com/docs/demos/mobile/lynx"
echo ""

@ -0,0 +1,6 @@
# https://docs.sheetjs.com/docs/demos/mobile/nativescript
Write-Host "These tests must be run manually. You can find the demo at:"
Write-Host ""
Write-Host " https://docs.sheetjs.com/docs/demos/mobile/nativescript"
Write-Host ""

7
tests/mobile/nativescript.sh Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# https://docs.sheetjs.com/docs/demos/mobile/nativescript
echo "These tests must be run manually. You can find the demo at:"
echo ""
echo " https://docs.sheetjs.com/docs/demos/mobile/nativescript"
echo ""

6
tests/mobile/quasar.ps1 Normal file

@ -0,0 +1,6 @@
# https://docs.sheetjs.com/docs/demos/mobile/quasar
Write-Host "These tests must be run manually. You can find the demo at:"
Write-Host ""
Write-Host " https://docs.sheetjs.com/docs/demos/mobile/quasar"
Write-Host ""

7
tests/mobile/quasar.sh Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# https://docs.sheetjs.com/docs/demos/mobile/quasar
echo "These tests must be run manually. You can find the demo at:"
echo ""
echo " https://docs.sheetjs.com/docs/demos/mobile/quasar"
echo ""

@ -0,0 +1,6 @@
# https://docs.sheetjs.com/docs/demos/mobile/reactnative
Write-Host "These tests must be run manually. You can find the demo at:"
Write-Host ""
Write-Host " https://docs.sheetjs.com/docs/demos/mobile/reactnative"
Write-Host ""

7
tests/mobile/reactnative.sh Executable file

@ -0,0 +1,7 @@
#!/bin/bash
# https://docs.sheetjs.com/docs/demos/mobile/reactnative
echo "These tests must be run manually. You can find the demo at:"
echo ""
echo " https://docs.sheetjs.com/docs/demos/mobile/reactnative"
echo ""