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

Ardi/bugfix output #220

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

dev-ardi
Copy link

  • I fixed the bug where failed assertions wouldn't show up.
  • I also fixed that assert.ok wouldn't pass the real value, it always passed false, which doesn't account for other falsy values.

fixes bad PR #219

let str = ' ' + FAILURE + (suite ? kleur.red(SUITE(` ${suite} `)) : '') + ' ' + QUOTE + kleur.red().bold(name) + QUOTE;
str += '\n ' + err.message + (operator ? kleur.italic().dim(` (${operator})`) : '') + '\n';

if (err.code === 'ERR_ASSERTION' && !operator.includes('not')) details = compare(err.actual, err.expects);
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
if (err.code === 'ERR_ASSERTION' && !operator.includes('not')) details = compare(err.actual, err.expects);
if (err.code === 'ERR_ASSERTION' && !operator.includes('not')) details = compare(err.actual, err.expected);

Copy link
Author

Choose a reason for hiding this comment

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

There's no expected property on the class Assertion.

Copy link
Author

Choose a reason for hiding this comment

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

image

@dev-ardi
Copy link
Author

Why can't this be merged?

@dev-ardi dev-ardi requested a review from lukeed October 20, 2022 09:02
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

2 participants