Skip to content

refactor: remove old test suite update docs#7498

Merged
jasonsaayman merged 4 commits intov1.xfrom
refactor/remove-old-test-suite-update-docs
Mar 13, 2026
Merged

refactor: remove old test suite update docs#7498
jasonsaayman merged 4 commits intov1.xfrom
refactor/remove-old-test-suite-update-docs

Conversation

@jasonsaayman
Copy link
Copy Markdown
Member

@jasonsaayman jasonsaayman commented Mar 13, 2026

Summary by cubic

Removed the legacy karma/mocha tests and moved CI to vitest with playwright. Release PRs are gated on build, unit, browser, and smoke tests, with the axios dist uploaded and consumed across jobs.

Description

  • Summary of changes

    • Deleted karma.conf.cjs and removed karma/mocha scripts from package.json.
    • Standardized on vitest (test, test:vitest:*) and kept existing build/version scripts.
    • CI/workflows now use a build-and-run-vitest job, then CJS smoke (Node 12–18 via mocha) and ESM smoke (Node 20–24 via vitest).
    • Added playwright install step for browser tests.
    • Release workflow uploads the axios dist artifact and creates the release PR only after all test jobs pass; job names and dependencies updated.
    • Minor workflow cleanup (caching with cache-dependency-path, artifact handling, consistent quoting).
  • Reasoning

    • Remove flaky, slow karma/SauceLabs paths and reduce maintenance.
    • Unify test runner across unit and browser for faster, more reliable CI.
    • Keep package compatibility guarantees via explicit CJS/ESM smoke suites.
  • Additional context

    • New tests/README.md documents structure, naming, and shared utilities for contributors.

Docs

  • Added tests/README.md covering:
    • Directory layout (browser, unit, smoke, setup) and when to use each.
    • File naming patterns and suite authoring guidelines.
    • Shared helpers in tests/setup and fixture conventions.

Testing

  • No new product tests added; infrastructure only.
  • CI now runs:
    • npm run test:vitest:unit
    • npm run test:vitest:browser:headless
    • CJS smoke tests (Node 12/14/16/18) via npm run test:smoke:cjs:mocha
    • ESM smoke tests (Node 20/22/24) via npm run test:smoke:esm:vitest
  • This replaces mocha/karma runs. If any behavior was only covered by karma, port it to vitest in tests/browser.

Written for commit 965c4a1. Summary will update on new commits.

@jasonsaayman jasonsaayman self-assigned this Mar 13, 2026
@jasonsaayman jasonsaayman added priority::medium A medium priority commit::refactor The PR is related to refactoring labels Mar 13, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 6 files

Confidence score: 3/5

  • There is a concrete regression risk in .github/workflows/release-branch.yml: the dependency-review-action step is likely to fail for workflow_dispatch runs without PR context (or explicit base-ref/head-ref), which can break manual release flow execution.
  • package.json changes the default test behavior to skip package-compat smoke suites and run a headed browser project, increasing the chance of missed compatibility issues and less stable CI defaults.
  • Given one high-severity workflow failure path and one medium-severity test coverage/defaults change, this carries some merge risk but appears fixable without broad code rewrites.
  • Pay close attention to .github/workflows/release-branch.yml and package.json - workflow dispatch compatibility and test-script default coverage need validation.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="package.json">

<violation number="1" location="package.json:51">
P2: The new `test` script skips the package-compat smoke suites and runs the headed browser project by default.</violation>
</file>

<file name=".github/workflows/release-branch.yml">

<violation number="1" location=".github/workflows/release-branch.yml:48">
P1: This step will fail in a `workflow_dispatch` run because `dependency-review-action` needs a pull-request context or explicit `base-ref`/`head-ref`.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release-branch.yml">

<violation number="1" location=".github/workflows/release-branch.yml:129">
P2: Avoid persisting checkout credentials in this release job. It leaves a write-capable repo token available to later `npm` scripts even though `create-pull-request` can use its own `GITHUB_TOKEN` input.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@jasonsaayman jasonsaayman merged commit bc3b631 into v1.x Mar 13, 2026
13 checks passed
@jasonsaayman jasonsaayman deleted the refactor/remove-old-test-suite-update-docs branch March 13, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::refactor The PR is related to refactoring priority::medium A medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant