Skip to content

HTML Reporter: HTML reporter enhancements for negative asserts#822

Closed
platinumazure wants to merge 3 commits into
qunitjs:masterfrom
platinumazure:cleanup-negative-assertion-reports
Closed

HTML Reporter: HTML reporter enhancements for negative asserts#822
platinumazure wants to merge 3 commits into
qunitjs:masterfrom
platinumazure:cleanup-negative-assertion-reports

Conversation

@platinumazure

Copy link
Copy Markdown
Contributor

HTML reporter will prepend "NOT" to expected value for notEqual, notStrictEqual, notDeepEqual, and notPropEqual assertions.

In addition, notOk assertions are also marked as negative for consistency, though the HTML reporter special-cases that assertion.

HTML reporter will prepend "NOT" to expected value for notEqual,

notStrictEqual, notDeepEqual, and notPropEqual assertions.

In addition, notOk assertions are also marked as negative for consistency.
@platinumazure

Copy link
Copy Markdown
Contributor Author

I signed the CLA a little bit ago. How do I get the error to go away? And the Travis CI build appears to have failed for reasons I very likely didn't introduce in this pull request...

And I'm looking for guidance on how best to test the HTML reporter part itself. To be honest it seems like that code could be refactored (i.e., there would be an HTMLReporter object that knows how to spit out the appropriate HTML given a logging context, and that could be unit tested independent of the actual HTML test page.) but that is a separate issue.

@jzaefferer

Copy link
Copy Markdown
Member

Thank you for the contribution!

Regarding the CLA: It looks like you signed twice, the first time the email didn't match your git email. I'm not really sure why the check still fails, though. We currently don't have a way to recheck manually, so the only option is to add another (empty) commit to this PR.

Regarding the Travis failure, you're right that its not related to your changes. I haven't seen that particular failure before...

As for the actual changes: Adding another argument to the already long push method is bad, but I also don't see an alternative here. Changing the signature to use an object argument would break any custom assertions.

@leobalter what do you think?

@platinumazure

Copy link
Copy Markdown
Contributor Author

Could we break that contract in 2.0?
On Jun 17, 2015 9:23 AM, "Jörn Zaefferer" notifications@github.com wrote:

Thank you for the contribution!

Regarding the CLA: It looks like you signed twice, the first time the
email didn't match your git email. I'm not really sure why the check still
fails, though. We currently don't have a way to recheck manually, so the
only option is to add another (empty) commit to this PR.

Regarding the Travis failure, you're right that its not related to your
changes. I haven't seen that particular failure before...

As for the actual changes: Adding another argument to the already long
push method is bad, but I also don't see an alternative here. Changing
the signature to use an object argument would break any custom assertions.

@leobalter https://github.com/leobalter what do you think?


Reply to this email directly or view it on GitHub
#822 (comment).

@jzaefferer

Copy link
Copy Markdown
Member

Kind of. We'd have to deprecate the current method, add a new method in a 1.x release, then remove the deprecated method in 2.0 (same process es Emberjs is following).

If we came up with a better name, that effort would be easier to justify.

@platinumazure

Copy link
Copy Markdown
Contributor Author

Could I get some guidance on how to add an empty commit to my PR (to re-trigger the CLA and Travis checks)? Thanks!

@jzaefferer

Copy link
Copy Markdown
Member

git commit --allow-empty should do.

@platinumazure

Copy link
Copy Markdown
Contributor Author

@jzaefferer Thanks, that's done and now I'm just waiting for Travis to run.

@platinumazure

Copy link
Copy Markdown
Contributor Author

@jzaefferer Looks like the CLA is good but the Travis build failed for the same reason as before.

Seems like a browserstack issue maybe?

@leobalter

Copy link
Copy Markdown
Member

@platinumazure the CI fail was due to a browserstack-runner instability. It's not related to your code.

@jzaefferer:

Adding another argument to the already long push method is bad, but I also don't see an alternative here.

Agreed. We cannot pass an object with the arguments to push as its first argument is always coerced to a boolean value. That's what we need to deprecate, forcing all push calls to have result (the first argument) as a boolean. Further, we'll be able to call .push with a single object argument, and that will be more cool in a later future using ES6: .push({ result, actual, expected, message, negative }).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you want me to remove that? I couldn't run the QUnit HTML Reporter suite without that change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You don't need to remove that. That was something I didn't notice before because I'm running tests only from the cli (grunt and browserstack).

On Jun 17, 2015, at 8:36 PM, Kevin Partington notifications@github.com wrote:

In test/reporter-html/index.html:

@@ -3,7 +3,7 @@

<title>QUnit HTML Reporter Test Suite</title> - - Do you want me to remove that? I couldn't run the QUnit HTML Reporter suite without that change.


Reply to this email directly or view it on GitHub.

@leobalter

Copy link
Copy Markdown
Member

LGTM.

@jzaefferer

Copy link
Copy Markdown
Member

Landed this with a rebase. I've filed #827 for a new push method, or at least a new signature.

@platinumazure

Copy link
Copy Markdown
Contributor Author

PR status is "Closed with unmerged commits". I assume maybe some cherry-picking happened (e.g., my empty commit to re-trigger CLA and Travis was intentionally ignored) but I want to be sure nothing important was missed.

@jzaefferer have I got it? If so I can delete my source branch. Thanks!

@jzaefferer

Copy link
Copy Markdown
Member

Yes, I've rebased your commits. You can find a reference to the commit that landed above.

@platinumazure platinumazure deleted the cleanup-negative-assertion-reports branch August 21, 2015 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants