-
Notifications
You must be signed in to change notification settings - Fork 49
test(node): add unit tests to node sdk #206
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
test(node): add unit tests to node sdk #206
Conversation
asgardeo-github-bot
commented
Oct 20, 2025
⚠️ No Changeset found
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.
Refer Release Documentation to learn how to add a changeset.
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.
We use vitest instead of Jest.
Lets utilize that instead.
https://github.com/asgardeo/javascript/blob/52d5d7b987856e4896ea61f58d8d0f37115c82f8/packages/node/vitest.config.ts
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.
Please also check the Build failure and the Type Check.
Purpose
This PR introduces unit tests for the Node SDK to improve code reliability and maintainability.
The tests are implemented using Jest and cover core functionalities such as cookie configuration, session ID generation, and helper utilities.
Key Additions:
jest.config.js) and test-specific TypeScript config (tsconfig.spec.json).packages/node/src/__tests__/, including:constants/CookieConfig.test.tsfixtures/cookieOptions.tshelpers/mockHelpers.tsutils/generateSessionId.test.tsutils/getSessionCookieOptions.test.tspackage.jsonto include Jest dependencies and test scripts.