-
Notifications
You must be signed in to change notification settings - Fork 2
Add Node.js support to @effectionx/bdd package #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
taras
wants to merge
15
commits into
main
Choose a base branch
from
tm/bdd-node-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Extract shared BDD logic into bdd.ts with createBDD factory function - Add mod.deno.ts for Deno with SanitizeOptions support - Add mod.node.ts for Node.js using node:test - Add package.json with conditional exports for Node/Deno - Update deno.json to export mod.deno.ts
- Add root package.json with npm workspaces for bdd and test-adapter - Add test-adapter/package.json for Node.js resolution - Update bdd/package.json to use npm-compatible dependency syntax - Add node_modules and package-lock.json to .gitignore
- Add verify-node.yaml workflow for Node.js CI on ubuntu/macos with Node 20/22 - Add bdd/bdd.test.ts for testing the BDD package - Add test scripts using npm workspaces (npm test --workspaces --if-present) - Update README with Node.js testing documentation
3d88e7d to
8bbaa44
Compare
- Add nodeModulesDir: "none" to deno.json to prevent Deno from using node_modules when package.json is present - Add pnpm-workspace.yaml for pnpm workspace configuration - Add package.json with Volta pinned versions and packageManager field - Update bdd/package.json to use workspace:* for local deps - Update CI to use pnpm/action-setup and actions/setup-node - Update README with Volta installation instructions
8bbaa44 to
b1a80ab
Compare
- Add explicit type imports for node:http (IncomingMessage, ServerResponse) - Add custom FSWatcherWithEvents interface to properly type chokidar watcher with EventEmitter methods that aren't exposed in the base type These explicit types ensure consistent type checking across different Deno environments and caching states.
f4d0329 to
ed141d1
Compare
- Create package.json with npm exports and dependencies - Add tinyexec to pnpm workspace
Explicitly use --frozen-lockfile to ensure reproducible builds and fail CI if lockfile is out of sync with package.json files.
- Create package.json with npm exports and dependencies - Add timebox to pnpm workspace
- Create package.json with npm exports and dependencies - Add context-api to pnpm workspace
- Create package.json with npm exports and dependencies - Add fx to pnpm workspace
- Create package.json with npm exports and dependencies - Add signals to pnpm workspace
- Add afterEachTest hook to BDD for assertion state cleanup - Implement assertion state checking in mod.node.ts - Add @std/expect and @std/internal via JSR registry (.npmrc) - Add test scripts to context-api, fx, signals, timebox packages - All 43 tests now pass on Node.js with expect.assertions() support
This reverts commit 12374ad.
cowboyd
reviewed
Dec 15, 2025
Member
cowboyd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. My only question is if we should extends the packages to be compatible with e4
cowboyd
approved these changes
Dec 18, 2025
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.
Motivation
Add Node.js support to the effectionx repository, starting with the
@effectionx/bddpackage. This enables running tests and using effectionx packages in Node.js environments alongside the existing Deno support.Approach
Node.js Support for BDD Package
bdd.tswith sharedcreateBDDfactory function that abstracts over platform-specific test runnersmod.deno.tsfor Deno (uses@std/testing/bdd)mod.node.tsfor Node.js (usesnode:test)package.jsonwith conditional exports (deno→mod.deno.ts,node→mod.node.ts)npm Workspace Configuration
package.jsonwith npm workspaces forbddandtest-adaptertest-adapter/package.jsonfor dependency resolutionnode_modules/andpackage-lock.jsonto.gitignoreCI Testing
verify-node.yamlworkflow for Node.js testing on Node 20/22 across ubuntu/macostestscript inpackage.jsonnpm testrunsnpm test --workspaces --if-presentDocumentation