Skip to content

cartStore has no tests: add/remove/total logic is uncovered #899

Description

@nanaf6203-bit

cartStore has no tests: add/remove/total logic is uncovered

Labels / Complexity: testing · Trivial — Trivial

Summary

cartStore (src/store/cartStore.ts) manages the purchase cart (add, remove, totals). It has no tests. A regression that double-counts totals or fails to remove items ships silently in the checkout flow.

Proposal

  • Add a spec covering add, remove, quantity updates, and total calculations (including empty-cart and duplicate-add edge cases).

Acceptance criteria

  • The spec asserts cart mutations and totals; it passes via npm test.

Getting started

  • src/store/cartStore.ts — the store
  • src/store/__tests__/transactionStore.test.ts — the pattern

Commands: npm test.

Good first files to read: src/store/cartStore.ts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programTrivialtestingTest coverage or test reliability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions