Skip to content

chore: use node test runner#2854

Open
theorderingmachine wants to merge 9 commits into
slackapi:v5from
theorderingmachine:chore/remove-mocha-chai-c8
Open

chore: use node test runner#2854
theorderingmachine wants to merge 9 commits into
slackapi:v5from
theorderingmachine:chore/remove-mocha-chai-c8

Conversation

@theorderingmachine
Copy link
Copy Markdown
Contributor

Summary

  • remove mocha/chai/c8 and their type packages from devDependencies
  • switch unit tests to Node's built-in test runner and coverage
  • add lightweight test globals/assertion shims so the existing suite keeps working

Testing

  • nix shell nixpkgs#nodejs -c bash -lc "export NODE_ENV=development && npm run test:coverage -- --test-concurrency=1"

Notes

  • I ran the test suite locally in a Nix-provided Node environment.
  • I did not run npm run lint locally because the repo's vendored Biome binary does not execute under this NixOS environment; CI can validate that path on GitHub.

@theorderingmachine theorderingmachine requested a review from a team as a code owner April 8, 2026 20:32
@salesforce-cla
Copy link
Copy Markdown

salesforce-cla Bot commented Apr 8, 2026

Thanks for the contribution! Before we can merge this, we need @theorderingmachine to sign the Salesforce Inc. Contributor License Agreement.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: 506ef11

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@zimeg zimeg closed this May 15, 2026
@zimeg zimeg reopened this May 15, 2026
@zimeg zimeg added semver:patch tests M-T: Testing work only dependencies Pull requests that update a dependency file labels May 15, 2026
@theorderingmachine theorderingmachine force-pushed the chore/remove-mocha-chai-c8 branch from dfd6928 to 8bebff8 Compare May 15, 2026 00:49
…ai-c8

# Conflicts:
#	test/unit/App/middlewares/listener.spec.ts
#	test/unit/WorkflowStep.spec.ts
#	test/unit/conversation-store.spec.ts
@zimeg zimeg self-assigned this May 15, 2026
@theorderingmachine theorderingmachine changed the base branch from main to v5 May 15, 2026 07:45
@zimeg
Copy link
Copy Markdown
Member

zimeg commented May 15, 2026

# node:internal/process/esm_loader:40
#       internalBinding('errors').triggerUncaughtException(
#                                 ^
# TypeError [Error]: b.toReversed is not a function or its return value is not iterable

🔬 note: Node 18 tests are failing with some of these changes so we change to the next major version for #2644

# Conflicts:
#	package-lock.json
#	package.json
#	test/unit/App/middlewares/global.spec.ts
#	test/unit/WorkflowStep.spec.ts
#	test/unit/context/create-respond.spec.ts
@zimeg zimeg changed the title chore: remove mocha, chai, and c8 chore: use node test runner May 15, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v5@b942e38). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff          @@
##             v5    #2854   +/-   ##
=====================================
  Coverage      ?   92.40%           
=====================================
  Files         ?       42           
  Lines         ?     7295           
  Branches      ?      456           
=====================================
  Hits          ?     6741           
  Misses        ?      518           
  Partials      ?       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

This is awesome 💯

What do you think about holding off on this until we release V5 and merge the branch into the project 🤔 It would only be to keep the changes as targeted as possible to the major release

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

Labels

cla:signed dependencies Pull requests that update a dependency file semver:patch tests M-T: Testing work only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants