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

Tests failing due to changed tape behaviour #90

Open
marsell opened this issue May 22, 2021 · 0 comments
Open

Tests failing due to changed tape behaviour #90

marsell opened this issue May 22, 2021 · 0 comments

Comments

@marsell
Copy link
Contributor

marsell commented May 22, 2021

package.json uses tape 5.0.0 and above, but tape switched deep-equal library versions between 4.x and 5.x, and the new deep-equal has some strange behaviour: deepEqual() failing with objects that are semantically identical, but have a different ordering of attributes. For example:

    operator: deepEqual
    expected: |-
      { jse_info: {}, jse_shortmsg: '', message: 'Role(s) asdasdasdasd not found', statusCode: 409, restCode: 'InvalidArgument', name: 'InvalidArgumentError', body: { code: 'InvalidArgument', message: 'Role(s) asdasdasdasd not found' } }
    actual: |-
      { jse_shortmsg: '', jse_info: {}, message: 'Role(s) asdasdasdasd not found', statusCode: 409, body: { code: 'InvalidArgument', message: 'Role(s) asdasdasdasd not found' }, restCode: 'InvalidArgument', name: 'InvalidArgumentError' }
    at: <anonymous> (/opt/smartdc/cloudapi/test/auth.test.js:467:11)
    stack: |-
      InvalidArgumentError: Role(s) asdasdasdasd not found
          at parseResponse (/opt/smartdc/cloudapi/node_modules/restify/lib/clients/json_client.js:71:23)
          at IncomingMessage.done (/opt/smartdc/cloudapi/node_modules/restify/lib/clients/string_client.js:167:13)
          at IncomingMessage.g (events.js:292:16)
          at emitNone (events.js:91:20)
          at IncomingMessage.emit (events.js:185:7)
          at endReadableNT (_stream_readable.js:978:12)
          at _combinedTickCallback (internal/process/next_tick.js:80:11)
          at process._tickCallback (internal/process/next_tick.js:104:9)

I could fix the tests themselves, but since this new deepEqual() behaviour is nonsense, switch to using the older tape 4.13.2 instead.

marsell pushed a commit to spearheadsys/sdc-cloudapi that referenced this issue May 22, 2021
marsell pushed a commit to spearheadsys/sdc-cloudapi that referenced this issue May 22, 2021
bahamat pushed a commit that referenced this issue May 24, 2021
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

1 participant