Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 0a2a431 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
View your CI Pipeline Execution ↗ for commit 925994c
💡 Dealing with memory or CPU issues? See memory and CPU details with the resource usage add-on ↗. ☁️ Nx Cloud last updated this comment at |
commit: |
e3eef3b to
0a2a431
Compare
0a2a431 to
925994c
Compare
There was a problem hiding this comment.
Nx Cloud is proposing a fix for your failed CI:
We fixed the failing javascript-sdk:test run by running device.store.test.ts in the node vitest environment. After the Node 24 upgrade, native fetch rejects the jsdom AbortSignal that RTK Query passes to it, which caused the "RequestInit: Expected signal" errors. Under node, both come from the same realm, so the requests succeed. Locally, pnpm nx test javascript-sdk now passes.
Tip
✅ We verified this fix by re-running javascript-sdk:test.
diff --git a/packages/javascript-sdk/src/device-client/device.store.test.ts b/packages/javascript-sdk/src/device-client/device.store.test.ts
index 897e45b..c60d2a2 100644
--- a/packages/javascript-sdk/src/device-client/device.store.test.ts
+++ b/packages/javascript-sdk/src/device-client/device.store.test.ts
@@ -1,3 +1,4 @@
+// @vitest-environment node
/*
* @forgerock/javascript-sdk
*
diff --git a/packages/javascript-sdk/vitest.setup.ts b/packages/javascript-sdk/vitest.setup.ts
index 644736e..b90f600 100644
--- a/packages/javascript-sdk/vitest.setup.ts
+++ b/packages/javascript-sdk/vitest.setup.ts
@@ -1 +1,4 @@
-import 'vitest-canvas-mock';
+// Tests that opt into the node environment (e.g. for native fetch) have no window to mock
+if (typeof window !== 'undefined') {
+ await import('vitest-canvas-mock');
+}
Or Apply changes locally with:
npx nx-cloud apply-locally iq1g-J99C
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
JIRA Ticket
Description