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

Bring in createStatsCollector from Mocha 6 as simple compatibility fix for Mocha 6 users #3424

Merged
merged 4 commits into from
Jun 4, 2019

Conversation

usergenic
Copy link
Contributor

@usergenic usergenic commented May 28, 2019

Fixes #3394

(By "bring in" I mean "copy+paste" and add types to the createStatsCollector code from the mocha package.)

@usergenic
Copy link
Contributor Author

FWIW, I just verified in https://travis-ci.org/Polymer/tools/builds/539457197 that without this fix, we get these errors in the wct-mocha integration tests when using mocha 6:

wct-mocha: > [email protected] test:integration /home/travis/build/Polymer/tools/packages/wct-mocha
wct-mocha: > cd test && npm run test:wct
wct-mocha: > [email protected] test:wct /home/travis/build/Polymer/tools/packages/wct-mocha/test
wct-mocha: > bash run-wct.sh
wct-mocha: Installing and starting Selenium server for local browsers
wct-mocha: Selenium server running on port 37216
wct-mocha: [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.
wct-mocha: [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.
wct-mocha: chrome 74                Beginning tests via http://localhost:8081/components/wct-mocha-test/generated-index.html?cli_browser_id=0
wct-mocha: chrome failed to maximize
wct-mocha: [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.
wct-mocha: firefox 66               Beginning tests via http://localhost:8081/components/wct-mocha-test/generated-index.html?cli_browser_id=1
wct-mocha: [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.
wct-mocha: chrome 74                Tests failed: Timed out
wct-mocha: firefox 66               Tests failed: Timed out
wct-mocha: Test run ended in failure: Timed out
wct-mocha: chrome 74 (error)                     
wct-mocha: firefox 66 (error)                    
wct-mocha: Error: Timed out

@usergenic
Copy link
Contributor Author

Verified in https://travis-ci.org/Polymer/tools/builds/539471275 that this fix does not break projects which still use Mocha 5, so this can be a patch version.

@usergenic usergenic requested a review from aomarks May 31, 2019 00:22
@usergenic usergenic merged commit f434f0e into master Jun 4, 2019
@usergenic usergenic deleted the fix-wct-mocha-6-compatibility branch June 4, 2019 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[wct-mocha] Doesn't work with the latest major version of mocha (^6.0.0)
3 participants