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

[readme] notLooseEqual(s) is not an alias for notDeepLooseEqual #609

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

ChALkeR
Copy link
Contributor

@ChALkeR ChALkeR commented Jul 8, 2024

tape/lib/test.js

Lines 727 to 741 in 7880dd4

function notLooseEqual(a, b, msg, extra) {
if (arguments.length < 2) {
throw new TypeError('two arguments must be provided to compare');
}
this._assert(a != b, {
message: defined(msg, 'should not be loosely equal'),
operator: 'notLooseEqual',
actual: a,
expected: b,
extra: extra
});
}
Test.prototype.notLooseEqual
= Test.prototype.notLooseEquals
= notLooseEqual;

tape/lib/test.js

Lines 800 to 813 in 7880dd4

function notDeepLooseEqual(a, b, msg, extra) {
if (arguments.length < 2) {
throw new TypeError('two arguments must be provided to compare');
}
this._assert(!deepEqual(a, b), {
message: defined(msg, 'should not be loosely deeply equivalent'),
operator: 'notDeepLooseEqual',
actual: a,
expected: b,
extra: extra
});
}
Test.prototype.notDeepLooseEqual
= notDeepLooseEqual;

tape/readme.markdown

Lines 296 to 301 in 7880dd4

## t.notLooseEqual(actual, expected, msg)
Assert that `actual != expected` with an optional description of the assertion `msg`.
Aliases: `t.notLooseEquals()`

But:

tape/readme.markdown

Lines 320 to 324 in 7880dd4

## t.notDeepLooseEqual(actual, expected, msg)
Assert that `actual` and `expected` do not have the same structure and nested values using [node's deepEqual() algorithm](https://github.com/inspect-js/node-deep-equal) with loose comparisons (`==`) on leaf nodes and an optional description of the assertion `msg`.
Aliases: `t.notLooseEqual()`, `t.notLooseEquals()`

This comment was marked as resolved.

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks! Must have missed these when I was doing the v5 loose/strict swap.

@ljharb ljharb changed the title doc: notLooseEqual(s) is not an alias for notDeepLooseEqual [readme] notLooseEqual(s) is not an alias for notDeepLooseEqual Jul 8, 2024
@ljharb ljharb merged commit c827ac9 into tape-testing:master Jul 8, 2024
327 checks passed
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.

2 participants