Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

test-link: add stringification to equality check #3078

Merged
merged 3 commits into from
Jun 17, 2019

Conversation

evans
Copy link
Contributor

@evans evans commented May 29, 2019

Currently MockLink hides undefined values in its error message. This
means that debugging a mismatched result was difficult and required
stepping through the code.

There are a couple of possible solutions:

  • update the error message to include the undefined values
  • modify the isEquals comparison of variables to check equality of the
    stringified value

This chooses the latter, since the 99% path for receiving values from a
remote source requires serializing variables before using them.

@evans evans requested review from benjamn and hwillson and removed request for benjamn May 29, 2019 17:59
@evans evans force-pushed the evans/fix-mock-provider-undefined branch from d5cfbcb to 05a9b6a Compare May 29, 2019 18:04
Currently MockLink hides undefined values in its error message. This
means that debugging a mismatched result was difficult and required
stepping through the code.

There are a couple of possible solutions:

* update the error message to include the undefined values
* modify the `isEquals` comparison of variables to check equality of the
  stringified value

This chooses the latter, since the 99% path for receiving values from a
remote source requires serializing variables before using them.
@evans evans force-pushed the evans/fix-mock-provider-undefined branch from 05a9b6a to 42c1425 Compare May 29, 2019 18:15
Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great @evans - thanks very much!

@hwillson hwillson merged commit 2b307fe into master Jun 17, 2019
@hwillson hwillson deleted the evans/fix-mock-provider-undefined branch June 17, 2019 16:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants