ssbc / ssb-meta-feeds

10 stars 0 forks source link

fix findAndTombstone to not use mutation #100

Closed staltz closed 1 year ago

staltz commented 1 year ago

Context

My tests in ssb-replication-scheduler were failing on findAndTombstone

Problem

There are two problems:

  1. feedformat is supposed to be feedFormat
  2. findAndTombstone mutates the input details to add .feedformat to it, so if you pass the same details object (like our tests do), it'll work, but if you pass two different objects that are deep equal, it won't work

Solution

Rename feedformat to feedFormat and don't mutate the inputs.

1st :x: 2nd :heavy_check_mark:

mixmix commented 1 year ago

good catch