@W-20937015: Adding windows test support#359
Merged
amit-kumar8-sf merged 10 commits intomainfrom Apr 21, 2026
Merged
Conversation
charithaT07
approved these changes
Apr 20, 2026
clavery
approved these changes
Apr 21, 2026
Collaborator
clavery
left a comment
There was a problem hiding this comment.
Looks pretty good. I like that we're skipping errors for now. Will test the loader.ts change
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
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.
Summary
Adds Windows CI coverage for the B2C developer tooling monorepo by introducing a sibling
test-windowsjob alongside the existing Linuxtestjob inci.yml, following the pwa-kit pattern (pwa-kit/pwa-kit-windows)..github/actions/setup-windows/action.yml— Node + pnpm + pnpm-store cache +pnpm install --frozen-lockfilefor reuse across all Windows jobs..github/workflows/ci.yml— newtest-windowsjob (matrix:[22.x, 24.x]) running SDK → MCP → CLI → VS Extension checks with Windows-suffixed coverage and test-result artifacts. Includes a diagnosticPrint Windows test failuresstep that parses each package'stest-results.jsonand echoes failing titles + error snippets to the job log (Mocha's JSON reporter otherwise hides the failures behind an opaque non-zero exit code)..github/workflows/e2e-tests.yml+.github/workflows/e2e-shell-tests.yml— bash-default shell wiring so existing E2E matrices can be extended to Windows in a follow-up without re-doing shell quirks.packages/b2c-tooling-sdk/test/operations/debug/source-mapping.test.ts— usepath.resolveso expectations match the drive-prefixed absolute path production returns on Windows.packages/b2c-tooling-sdk/test/discovery/utils.test.ts— normalize glob results to POSIX slashes before asserting.packages/b2c-tooling-sdk/test/scaffold/registry.test.ts— assertSCAFFOLDS_DATA_DIRviapath.join('data', 'scaffolds')so the substring check works on both separators.packages/b2c-dx-mcp/test/tools/mrt/index.test.ts— switch 4path.join(projectDir, 'build')expectations topath.resolve(...)(matchesservices.resolveWithProjectDirectory).packages/b2c-dx-mcp/test/services.test.ts—path.resolve(projectDir, 'subdir')assertion.packages/b2c-cli/test/commands/mrt/save-credentials.test.ts— skip the0o600mode-bit assertion onwin32; NTFS doesn't honor POSIX mode bits, credential files are protected via ACLs.packages/b2c-tooling-sdk/src/plugins/loader.ts— convert hook path to afile://URL viapathToFileURL(hookFilePath).hrefbefore dynamicimport(). Node's ESMimport()on Windows rejects raw backslash/drive-letter paths. Without this fix, every hook-based plugin silently failed to load on Windows.packages/b2c-dx-mcp/src/tools/storefrontnext/site-theming/theming-store.ts— replacefilePath.startsWith('/')(POSIX-only absolute detection) withpath.isAbsolute()soTHEMING_FILESenv entries resolve on both platforms; harden emoji-anchored section regexes with explicit Unicode escapes (\u26A0\uFE0F?,\u{1F4CB},\u{1F504},\u2705,\u{1F4DD}) and\r?\nCRLF tolerance to be robust against Git line-ending conversion on Windows checkouts.packages/b2c-cli/package.json— new sibling scripttest:ci:winthat runs the same Mocha suite withc8 --check-coverage=false. Used only by the Windows CI step; Linuxtest:ciis untouched and continues to enforce the 70% function-coverage gate.Design notes:
osmatrix row) — keeps the existing Ubuntu job untouched, allows an independent Windows Node matrix, and produces clearly labelled Windows reports/artifacts.defaults.run.shell: bashso the existingenv VAR=value mocha …inline-env npm scripts keep working unchanged under Git Bash — nocross-envdependency or script rewrites required.${{ runner.os }}produces a distinctWindows-pnpm-store-*cache key, preventing cross-OS cache pollution.test-windowsis markedcontinue-on-error: true. Windows coverage is new and the last infrastructure-level quirk (V8 coverage on Windows double-counting some TS files via thetsxloader registering them under two URL casings, dragging CLI function coverage from ~78% down to ~68%) is surfaced but not gated. The per-matrixtest-results-windows-node-*artifact is always uploaded and the diagnosticPrint Windows test failuresstep renders failures inline, so any remaining platform-specific issue can be read directly from the Actions run. Each job has a comment flagging thatcontinue-on-errorshould be removed once Windows tests are consistently green.Testing
Infrastructure + cross-platform test-hardening change; verified as follows:
b2c-tooling-sdkoperations/debug, plugins, scaffold, discovery — 209 passing.b2c-dx-mcpmrt + site-theming — 149 passing.b2c-climrt — 13 passing.c8 --check-coverage=falseconfirmed locally to disable the threshold gate while still producingcoverage/lcov.infofor artifact upload.pnpm run lintin each affected package).test-windowsat[22.x, 24.x]). The previous 24-failure baseline from the last Windows run is now expected to drop to 0 blocking failures with this PR.Dependencies
3pl-approvedis set by a maintainerpnpm test) — all scoped suites pass locally on macOS; Windows matrix runs withcontinue-on-error: trueduring the advisory rolloutpnpm run format) — ran lint on every modified file, no linter errors