immer icon indicating copy to clipboard operation
immer copied to clipboard

Add failing test for #819

Open chrissantamaria opened this issue 4 years ago • 8 comments

See #819

chrissantamaria avatar Jun 25 '21 23:06 chrissantamaria

Thanks for PR the test. Would you mind adding the other test case in your report as well, as I'd expect this PR to fail without fix :)

mweststrate avatar Jun 27 '21 13:06 mweststrate

Sure! Can you clarify which one you're referring to? I included this in my report but it's just a more specific variation of the original test:

it("maintains order when adding", () => {
  const objs = [
    {
      id: "a"
    },
    "b"
  ]

  const set = new Set([objs[0]])
  const newSet = produce(set, draft => {
    draft.add(objs[1])
  })

  // does not pass
  expect(Array.from(newSet)).toEqual([objs[0], objs[1]])
})

This branch should already be failing with yarn test

chrissantamaria avatar Jun 28 '21 17:06 chrissantamaria

@chrissantamaria yeah it'd be great to add that one as well. I had expected this branch to fail, but it seems the CI didn't run at all in the first place, which confusingly is represented as all green it seems.

mweststrate avatar Jun 28 '21 18:06 mweststrate

haha yeah I noticed that, looks like Travis stopped checking commits a few weeks ago

Would you prefer all of these to be in base.js or map-set.js? I noticed the latter has some tests specifically labeled by issue #, happy to follow that standard if you'd like

chrissantamaria avatar Jun 28 '21 19:06 chrissantamaria

Preferably map-set, base is a bit overcrowded :-P.

Well, I guess we have to migrate to GH actions finally.

mweststrate avatar Jun 28 '21 19:06 mweststrate

Done - wasn't quite sure how to differentiate those tests in the naming so feel free to edit

Happy to take a look at GH Actions integration if you want :) might be worth filing an issue regardless

chrissantamaria avatar Jun 28 '21 19:06 chrissantamaria

Done - wasn't quite sure how to differentiate those tests in the naming so feel free to edit

Looking good!

Happy to take a look at GH Actions integration if you want :) might be worth filing an issue regardless

If you'd be interested in taking a stab at it that would be brilliant :). Otherwise I'll try to find some time next week

mweststrate avatar Jun 28 '21 19:06 mweststrate

:heavy_check_mark: Deploy Preview for quizzical-lovelace-dcbd6a canceled.

:hammer: Explore the source changes: 38fa33c7b4892e3e706c8cde703dde82ed6ca13e

:mag: Inspect the deploy log: https://app.netlify.com/sites/quizzical-lovelace-dcbd6a/deploys/60e33c911d29f00007f13f5a

netlify[bot] avatar Jul 05 '21 17:07 netlify[bot]

Retest this PR after merging #976

mweststrate avatar Jan 15 '23 16:01 mweststrate

:tada: This PR is included in version 9.0.19 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Jan 27 '23 14:01 github-actions[bot]