Skip to content

Integration test: txHash retained in synced set after chain-trade delete #71

@heyitsStylez

Description

@heyitsStylez

Parent

#68

What to build

A jsdom integration test asserting that after deleteTrade is called on a chain-imported trade, the trade is absent from trades and the txHash is still present in hw_synced_v1.

This locks ADR 0006's invariant as an executable specification so it cannot be accidentally broken by future changes to deleteTrade or the synced-set management.

Prior art: test/integration/chain-sync-outcomes.test.js — boots the full app via setupJsdom(), drives globals, and asserts on localStorage.

Acceptance criteria

  • Test file exists under test/integration/
  • Test boots the full app via setupJsdom() and calls t.after(teardown)
  • Test adds a chain-imported trade (with a txHash) to trades and the txHash to hw_synced_v1
  • Test calls deleteTrade(id) on that trade
  • Assertion: trade is no longer in trades
  • Assertion: txHash is still present in hw_synced_v1
  • npm test passes with the new test included

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions