fix(tests): add missing smoke fixtures and SPDX headers#23
Open
igorjs wants to merge 6 commits into
Open
Conversation
Contributor
Contributor Checks❌ DCO Check FailedThe following commits are missing a Please amend your commits with ✅ CLA Signed |
Add the four fixture files the deno, bun, cf-workers, and browser CI jobs depend on. Without these files the integration matrix fails with module-not-found errors. - tests/smoke-core.mjs: cross-runtime smoke test that exports runSmokeCore(lib), exercises expect(), spyFn, and the describe/it/runRegistered runner API. Self-executes on Node/Deno/Bun; also used as the payload for Workers and Browser harnesses. - tests/smoke-platform.mjs: standalone platform smoke test covering lifecycle hooks, it.skip, it.each, async tests, fake timers, spies, and nested describe. Runs on Node/Deno/Bun via runRegistered(). - tests/workers/run.mjs: inlines smoke-core into a temporary Miniflare worker and asserts all 72 assertions pass in the Workers runtime. - tests/browser/run.mjs: serves dist and test files over a local HTTP server, opens headless Chromium via Playwright, and collects results. Also add SPDX-License-Identifier: Apache-2.0 headers to all tracked .mjs and .ts files that were missing them. The CI lint-and-test job checks every tracked file with git ls-files and exits 1 for any file without the header. Verified locally: smoke-core and smoke-platform pass on Node 26, Deno 2.4, and Bun 1.3. Workers runner passes via miniflare. Browser runner passes via Playwright/Chromium. Signed-off-by: Igor Santos <oss@mail.igorjs.io>
igorjs
force-pushed
the
feat/add-smoke-fixtures
branch
from
July 1, 2026 15:52
a1a1d53 to
b8cde56
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The deno, bun, cf-workers, and browser CI integration jobs fail with module-not-found errors because the fixture files they invoke don't exist in the repo:
tests/smoke-platform.mjsandtests/smoke-core.mjstests/workers/run.mjstests/browser/run.mjsWhat changed
Four new fixture files, modeled on
igorjs/pure-fx's fixtures and adapted to pure-test's actual public API:tests/smoke-core.mjs: exportsrunSmokeCore(lib), exercisesexpect()matchers,spyFn, and thedescribe/it/runRegisteredrunner API. Self-executes on Node/Deno/Bun. Also the shared payload for the Workers and Browser harnesses.tests/smoke-platform.mjs: standalone platform smoke test. Registers a suite with lifecycle hooks,it.skip,it.each, async tests, fake timers, spies, and nesteddescribe. Runs viarunRegistered()on Node/Deno/Bun.tests/workers/run.mjs: readssmoke-core.mjs, strips the self-execute block, inlines it into a temporary Miniflare worker that importsdist/index.js, dispatches a fetch, and asserts all assertions pass.tests/browser/run.mjs: spins up a local HTTP server, opens headless Chromium via Playwright, loadssmoke-core.mjsas an ES module, and collects the result.API adaptation decisions vs pure-fx:
smoke-core.mjstests pure-test's own API (expect,spyFn,describe/it/runRegistered) instead of pure-fx's data library..rejects.toThrow()is NOT used: pure-test'stoThrowrequires a function, not an Error value. The.rejectssections use.toMatchObject({ message })instead.AssertionError.is()does not exist on the class; replaced withinstanceof AssertionErrorand a message-length check.SPDX headers: The CI's
lint-and-testjob checks every tracked.mjsand.tsfile forSPDX-License-Identifier. All existing tracked files inbin/,scripts/, andtests/were missing the header. Added// SPDX-License-Identifier: Apache-2.0to all 16 affected files as a one-line prepend (shebang inbin/pure-test.mjsis preserved on line 1).What was verified locally vs deferred to CI
Verified locally:
node tests/smoke-core.mjs: 72 passed, 0 faileddeno run --allow-all tests/smoke-core.mjs: 72 passed, 0 failedbun tests/smoke-core.mjs: 72 passed, 0 failednode tests/smoke-platform.mjs: 18 passed, 0 failed, 1 skippeddeno run --allow-all tests/smoke-platform.mjs: 18 passed, 0 failed, 1 skippedbun tests/smoke-platform.mjs: 18 passed, 0 failed, 1 skippednode tests/workers/run.mjs(miniflare): all 72 tests passednode tests/browser/run.mjs(Playwright/Chromium): all 72 tests passednode tests/self-test.mjs: 342 passed, 0 failed (main test suite unaffected)Deferred to CI: matrix runs on deno-canary, bun-canary, Node 22/24, and the pinned CI environment.