Skip to content

Make the existing v12 unit tests runnable from a clean checkout - #113

Closed
simple-analytics-ai[bot] wants to merge 1 commit into
v12from
chore/v12-runnable-unit-tests
Closed

simple-analytics-ai[bot] wants to merge 1 commit into
v12from
chore/v12-runnable-unit-tests

Conversation

@simple-analytics-ai

@simple-analytics-ai simple-analytics-ai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Base: #40 (v12). Merge this support PR into v12.

Status: Closed as superseded by the parallel #107 cleanup. For this request, the branch was updated afterward with v12@3395422 in merge commit 40c69f3. It remains closed; no new CI run was triggered.

Summary

Fixes #107

Make pnpm run test:unit build the tracker before running Mocha, while retaining v12's --exit option. CI calls that single command.

-test:unit: mocha "test/unit/*.test.js" --exit
+test:unit: node compile.js && mocha "test/unit/*.test.js" --exit

Requested update: resolve PR #113's conflicts and merge the current v12 branch into it. The jsdom dependency and CI unit-test step have since landed through #106; keep those changes and the newer Handlebars dependency. Only two tooling lines differ from v12; tracker source and committed distribution bytes match it exactly.

Security implications

  • No security impact
  • Has security impact - described as:

Testing

  • Before: GitHub reported conflicts with v12; its standalone unit command depended on an existing build.
  • After: Node 24.18.0 / pnpm 11.17.0 frozen installation passed; test:unit rebuilt successfully and all 41 tests passed.
  • BrowserStack matrix tests: 11 passed. Deployment tests: 12 passed. TypeScript, formatting of the two changed files, and git diff --check passed.
  • Current main was refreshed through the broker and is included in the merged v12 history.
  • Full BrowserStack runs in CI; local validation used the offline suites.

Merge Danger

Door: two-way. Blast Radius: tooling.

Checklist

  • Linked to an issue
  • Tested
  • Asked for a review

Review of the requested compatibility PRs found the unit suite lacked jsdom and a test:unit command. Keep this support repair separate, run it in CI, and leave shipped script bytes unchanged.

Refs #107
@github-actions

Copy link
Copy Markdown
Claude review checkpoint

Reviewed commit 1fcd13803adcac9d799c0f37732233a8fabd40fa. This is used to keep later automated reviews focused on changes Claude has not checked yet.

@github-actions github-actions Bot added the change: routine Changes to internal tools or low-risk changes (e.g., design updates or content modifications) label Oct 15, 2026
@github-actions

Copy link
Copy Markdown

SDLC label: change: routine because Developer tooling only: adds a test:unit npm script, a jsdom devDependency with matching lockfile entries, and a CI step running the existing unit tests; no customer data, authorization, billing, schema, or production runtime behavior is affected

@simple-analytics-ai

Copy link
Copy Markdown
Author

Superseded by current v12: package.json already declares jsdom 26.1.0 and test:unit, the frozen lockfile includes that dependency, and the workflow runs the build plus unit suite even when BrowserStack is skipped. Current v12 passes a clean frozen install and 39 unit tests after building. Merging this older branch would replace the current test command and conflict with already-landed workflow and dependency updates, so it is no longer needed for #107.

simple-analytics-ai Bot pushed a commit that referenced this pull request Oct 15, 2026
Requested: resolve conflicts on scripts PR #113 and merge the latest v12 branch into it.

Keep the unit-test command self-building and retain v12's Mocha --exit option, current jsdom/Handlebars dependencies, tracker changes, and CI setup.

Validation: frozen installation, build plus 41 unit tests, 11 matrix tests, 12 deployment tests, TypeScript, changed-file formatting, and diff checks passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change: routine Changes to internal tools or low-risk changes (e.g., design updates or content modifications)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant