You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node SDK: add unit tests for the change password and delete user commands #4796
CHANGE_PASSWORD.serialize and DELETE_USER.serialize in the Node SDK have no unit tests. client.socket.test.ts calls them through a mock server but does not check the bytes. CHANGE_PASSWORD writes the user identifier, then each password as a one byte length and the bytes, and throws when either password is under 1 or over 255 bytes (counted in bytes, not characters). DELETE_USER writes only the identifier.
Affected area / component
Node SDK
Proposed solution
Add foreign/node/src/wire/user/change-password.command.test.ts and delete-user.command.test.ts, following create-user.command.test.ts, including its UTF-8 case for the 255 byte limit.
Change password: the exact bytes for a numeric user id, an empty current password, an empty new password, a 255 byte password accepted, a 256 byte password refused, and a multi-byte password that is under 255 characters but over 255 bytes.
Delete user: the exact bytes for a numeric and a string identifier.
Build the expected buffers by hand, so the test does not call the code it checks.
How to test:npm run test:unit and npm run lint pass in foreign/node.
Good first issue
I think this could be a good first issue for a new contributor
Activity
Yasas-Sri commentedon Nov 9, 2026
@justinmclean i would like to work on this issue.can you assign me
justinmclean commentedon Nov 9, 2026
Thank for offering to work on this.