Skip to content

Fix react 18 failing test #897

Description

@redonkulus

During React 18 testing one unit test was not passing, further debugging is required. The package was published to unblock users from upgrading to React 18. This bug could break your application!

Issue when running the test:

  ● Sticky › should release when height gets changed (long Sticky)

    expect(received).toBe(expected) // Object.is equality

    Expected: "translate3d(0,1068px,0)"
    Received: "translate3d(0,-432px,0)"

       97 |     const style = t._style || t.style;
       98 |     expect(style.width).toBe('100px');
    >  99 |     expect(style.transform).toBe('translate3d(0,' + pos + 'px,0)');
          |                             ^
      100 |     expect(style.position).toBe('relative');
      101 |     expect(style.top).toBe('');
      102 | }

      at toBe (tests/unit/Sticky.test.js:99:29)
      at Object.shouldBeReleasedAt (tests/unit/Sticky.test.js:472:9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions