I'm using aisMulti=true Creatable amd writing tests for it.
In my tests I have the following expects:
expect(value).toEqual([emails[0]]); // Passes
await selectEvent.select(getByLabelText("To:"), emails[1].label);
expect(value).toEqual([emails[0], emails[1]]); // Passes
await selectEvent.clearFirst(getByLabelText("To:"));
expect(value).toEqual([emails[1]]); // Fails
Which fails like so:
expect(received).toEqual(expected) // deep equality
- Expected - 6
+ Received + 1
- Array [
- Object {
- "label": "Howell Beier",
- "value": "howell.beier@example.com",
- },
- ]
+ Array []
I would expect this to only clear the very first value from the select, rather than all of them. Or am I misunderstanding something?
I'm using a
isMulti=trueCreatableamd writing tests for it.In my tests I have the following expects:
Which fails like so:
I would expect this to only clear the very first value from the select, rather than all of them. Or am I misunderstanding something?