Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent patch generation when adding undefined elements to an array #52

Open
eriksunsol opened this issue Aug 9, 2019 · 2 comments
Assignees

Comments

@eriksunsol
Copy link
Contributor

This is a continuation of dicussion here: #45 (comment)

Steps to reproduce

See failing test here: 7cf32fd

The test extends an array with 5 elements to 9 elements with undefined or null values.

Expected result

Four add patches to add null elements.

Actual result

One add patch and one replace patch.

@warpech
Copy link
Contributor

warpech commented Aug 14, 2019

I decided to implement the solution in the already opened PR #45, because I was afraid of creating a conflict that's troublesome to merge.

@warpech warpech self-assigned this Aug 14, 2019
@warpech
Copy link
Contributor

warpech commented Aug 15, 2019

This issue is partially solved in #45, but there are even more edge cases:

There are 3 kinds of arrays to test:

There are many kinds of array operations to test:

  • array.shift()
  • array.pop()
  • array.unshift()
  • array.push()
  • array.splice()
  • array.length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants