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

Always use strictEqual to ensure null and undefined values are asserted correctly #59

Closed
wants to merge 1 commit into from

Conversation

marcbachmann
Copy link
Collaborator

@marcbachmann marcbachmann commented Jan 21, 2022

Just saw that some assertions were wrong.
assert.equal is deprecated and behaves slightly different with null/undefined.

const obj = {a: 'foo'}
// This returned undefined, but accepted null in the comparison
- assert.equal(jsonpointer.get(obj, '/b'), null)
+ assert.strictEqual(jsonpointer.get(obj, '/b'), undefined)

Migrating everything to assert.strictEqual is more explicit.

@marcbachmann
Copy link
Collaborator Author

Included in #50

@marcbachmann marcbachmann deleted the assert-using-strictEqual branch July 13, 2022 12:49
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

Successfully merging this pull request may close these issues.

None yet

1 participant