Skip to content

Conversation

@alancutter
Copy link
Contributor

@alancutter alancutter commented Jun 6, 2016

This change makes the testharness adaptor dump the test failures on the window object for use in grunt debug.
It also outputs the failures formatted to be suitable for pasting into expectedFailures in web-platform-tests-expectations.js.

This patch builds upon #467.

return testURLs.map(function(testURL) {
var tests = Object.keys(failures[testURL]);
tests.sort();
return (
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use JSON.stringify here instead?

Copy link
Contributor Author

@alancutter alancutter Jun 13, 2016

Choose a reason for hiding this comment

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

I believe I had to write my own stringify() because the double quotes from JSON.stringify() fails lint. I should add a comment explaining this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you use JSON.stringify and then a string replace for " to '? That seems more robust/easier to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would fail for "strings with 's in them".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the comment to stringify().

@suzyh
Copy link
Contributor

suzyh commented Jun 13, 2016

lgtm modulo nit on stringification.

@suzyh suzyh merged commit 2aff5b7 into web-animations:master Jun 15, 2016
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