Skip to content

test: add vitest tests for shared-cart-ws.js - #7550

Merged
janavipandole merged 2 commits into
janavipandole:mainfrom
tmdeveloper007:test/#7525-shared-cart-ws-tests
Aug 13, 2026
Merged

test: add vitest tests for shared-cart-ws.js#7550
janavipandole merged 2 commits into
janavipandole:mainfrom
tmdeveloper007:test/#7525-shared-cart-ws-tests

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

📄 Description

Created tests/unit/shared-cart-ws.test.js with vitest coverage for SharedCartWS including tests for generateSessionId (format and uniqueness), the constructor with default and custom options, getStatus() return value shape, and broadcast() guards against null/closed WebSocket.

🔗 Related Issues

Closes #7525

🧩 Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Style / UI improvement
  • Refactor
  • Test
  • Chore / dependency update

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Note: This task is being handled by tmdeveloper007 as part of GSSOC (GirlScript Summer of Code) — please assign this PR to the tmdeveloper007 account when picking it up.

@tmdeveloper007 tmdeveloper007 changed the title test : add vitest tests for shared-cart-ws.js test: add vitest tests for shared-cart-ws.js Aug 12, 2026
@janavipandole
janavipandole merged commit e93e503 into janavipandole:main Aug 13, 2026
19 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add vitest coverage for shared-cart-ws.js SharedCartWS class

2 participants