Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Split Tests/UnitTests/Scripts/tests.ts into per-polyfill spec files

Open
#180 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
testing

Research direction

Start by reading Tests/UnitTests/Scripts/tests.ts and tracing how the test harness loads it. Identify the shared server bootstrap and fixtures, then separate the existing describe blocks into per-polyfill spec files under Scripts/tests with a small barrel or entrypoint. Done means the harness still loads every spec and the full unit test suite passes.

Written by the indexing model from the issue text.

Description

Summary

Tests/UnitTests/Scripts/tests.ts has grown to ~1.5k lines spanning 15+ describe blocks across 10+ polyfills (XHR, WebSocket, Blob, File, FileReader, TextEncoder/Decoder, URL, Console, Scheduling, AbortController, napi prototype isolation, ...). Every new polyfill grows this single file further, which hurts readability, makes ownership/blame noisy, and increases merge-conflict surface.

Proposal

Split the suite into one spec file per polyfill (e.g. Scripts/tests/xhr.ts, blob.ts, file.ts, filereader.ts, ...) with a small barrel/entrypoint that the test harness loads. Keep shared helpers (server bootstrap, fixtures) in a common module.

Context

Raised in review of #169 (File / FileReader polyfill). Filing as a standalone follow-up so that PR's diff stays focused on the polyfill itself rather than a large test reorganization.

Dominant language
C++
Stars
22
Forks
23
Avg merge
4d 8h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BabylonJS/JsRuntimeHost

All issues in BabylonJS/JsRuntimeHost

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.