Skip to content

test: migrate to zekr CLI test runner - #33

Open
brnrdog wants to merge 1 commit into
mainfrom
zekr-cli
Open

test: migrate to zekr CLI test runner#33
brnrdog wants to merge 1 commit into
mainfrom
zekr-cli

Conversation

@brnrdog

@brnrdog brnrdog commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Installs zekr@2.1.0-beta.2 and refactors both packages' tests to run through zekr's new zekr CLI instead of hand-written Runner entrypoints.

The CLI discovers every *.test.res file and runs each one in its own process. Suites created with Suite.make register themselves with zekr automatically, so the explicit Runner.runSuites calls and the aggregating RunTests.res are no longer needed.

beta.2's harness loads the Runner module compiled with the same suffix as each test file, so both share one Registry instance. That means the CLI works with this repo's existing .res.mjs build — no packaging/suffix changes required.

Changes

  • Install zekr@2.1.0-beta.2 (root dev dependency).
  • Rename test files to the *.test.res convention the CLI matches:
    • SignalTests.resSignal.test.res
    • ComputedTests.resComputed.test.res
    • EffectTests.resEffect.test.res
    • SignalsReact_test.resSignalsReactHooks.test.res (the react package has no namespace, so a SignalsReact.test.res module name would collide with src/SignalsReact.res).
  • Remove RunTests.res and the explicit Runner.runSuites(...) call from the react tests — suites now auto-register.
  • Update test scripts in both packages to rescript && zekr --dir tests.
  • Refresh the CONTRIBUTING testing guide for the new zekr API and *.test.res convention.

No changes to the published build output, rescript.json suffix, main/module, or benchmark scripts.

Verification

npm test (clean build) passes:

  • rescript-signals: 3 files — Signal (18), Computed (19), Effect (15)
  • rescript-signals-react: 1 file — 17 hook/edge-case tests

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

ReScript Signals benchmark: PR vs main

Compared implementations:

  • ReScript Signals (main)
  • ReScript Signals (PR)

Overall:

Version Total ms Avg ms/test
ReScript Signals (main) 5531.38 276.57
ReScript Signals (PR) 5695.27 284.76
Delta (ReScript Signals (PR) - ReScript Signals (main)) 163.89 2.96%

Per-test delta (lower is better):

Test Main ms PR ms Diff ms Diff %
2-10x5 - lazy80% 530.33 526.84 -3.49 -0.66%
25-1000x5 1026.53 1048.34 21.81 2.12%
3-5x500 224.41 209.97 -14.44 -6.43%
4-1000x12 - dyn5% 753.69 898.15 144.45 19.17%
6-100x15 - dyn50% 447.58 420.19 -27.40 -6.12%
6-10x10 - dyn25% - lazy80% 290.48 273.39 -17.09 -5.88%
avoidablePropagation 308.25 306.24 -2.01 -0.65%
broadPropagation 225.04 225.28 0.24 0.11%
cellx1000 18.30 16.52 -1.78 -9.72%
cellx2500 86.93 73.46 -13.46 -15.49%
createComputations 265.27 322.98 57.71 21.76%
createSignals 3.24 2.87 -0.37 -11.55%
deepPropagation 91.85 85.90 -5.95 -6.48%
diamond 182.30 177.61 -4.69 -2.57%
molBench 45.01 44.91 -0.10 -0.21%
mux 256.48 251.58 -4.90 -1.91%
repeatedObservers 41.96 38.85 -3.10 -7.40%
triangle 58.28 56.25 -2.03 -3.48%
unstable 63.53 58.74 -4.80 -7.55%
updateSignals 611.93 657.21 45.28 7.40%

Note: single-machine run in CI. Numbers can vary with runner load and Node/V8 version.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Reactivity benchmark: PR vs top frameworks

Compared implementations:

  • Alien Signals
  • Preact Signals
  • SolidJS
  • Svelte v5
  • Vue
  • ReScript Signals (PR)

Overall ranking (lower total ms is better):

Rank Framework Total ms Avg ms/test
1 Preact Signals 3879.69 193.98
2 Alien Signals 4006.66 200.33
3 ReScript Signals (PR) 5599.33 279.97
4 Vue 5985.58 299.28
5 Svelte v5 8628.99 431.45
6 SolidJS 10567.00 528.35

Per-test runtime (ms):

Framework 2-10x5 - lazy80% 25-1000x5 3-5x500 4-1000x12 - dyn5% 6-100x15 - dyn50% 6-10x10 - dyn25% - lazy80% avoidablePropagation broadPropagation cellx1000 cellx2500 createComputations createSignals deepPropagation diamond molBench mux repeatedObservers triangle unstable updateSignals
Preact Signals 387.61 728.00 188.25 614.42 325.80 230.44 107.33 198.17 9.37 24.99 86.91 1.96 73.84 137.18 32.05 159.29 19.82 42.92 35.49 475.83
Alien Signals 341.63 842.76 198.53 686.87 317.13 235.21 85.91 189.28 8.52 21.18 82.00 2.58 61.95 131.17 32.15 173.98 32.90 39.86 48.97 474.08
ReScript Signals (PR) 537.78 930.00 199.32 880.87 424.61 280.77 319.24 229.66 13.25 41.01 324.15 2.37 106.61 180.32 44.82 291.20 38.23 52.03 58.38 644.74
Vue 574.61 1107.23 286.74 960.16 483.79 361.33 232.95 300.33 22.06 61.83 135.74 2.80 114.18 200.50 69.93 256.67 28.72 64.10 53.00 668.91
Svelte v5 1098.85 1274.02 309.13 1191.97 467.89 395.15 538.83 472.21 14.22 41.38 149.40 1.94 168.65 437.29 34.48 272.81 74.88 130.57 116.15 1439.15
SolidJS 2279.62 1559.04 487.83 1307.13 740.23 748.54 337.12 525.32 20.07 55.58 149.40 4.10 183.31 363.73 39.66 291.86 94.68 126.51 131.54 1121.72

Note: single-machine run in CI. Numbers can vary with runner load and Node/V8 version.

Install zekr 2.1.0-beta.2 and use its `zekr` CLI to discover and
run `*.test.res` files, replacing the hand-written Runner entry
points.

- Rename test files to the `*.test.res` convention. Suites now
  register themselves via `Suite.make`, so `RunTests.res` and the
  explicit `Runner.runSuites` calls are removed.
- beta.2's harness loads the Runner compiled with the same suffix
  as each test file, so the CLI works with the existing `.res.mjs`
  build with no packaging changes.
- Refresh the CONTRIBUTING testing guide for the new convention.
@brnrdog

brnrdog commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

Testing the scan-and-run feature from brnrdog/zekr#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant