mantoni / mochify.js

☕️ TDD with Browserify, Mocha, Headless Chrome and WebDriver
MIT License
346 stars 57 forks source link

Upgrade to Mocaccino 5, use Mocha 8 and Puppeteer 9 #223

Closed m90 closed 3 years ago

m90 commented 3 years ago

Closes #213

Most of the changes in this PR are related to change in TAP output in Mocha 8 discussed here: https://github.com/mantoni/mocaccino.js/pull/35#discussion_r633250254


The other issue we run into here is that the rollupified Mocha 8 browser bundle now prints a whole lot of deprecation warnings like:

'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead

When I inspect a bundle in my browser the warning points here: https://github.com/mochajs/mocha/blob/34643e4c0821aeb8d6977c1942bc106c9363789a/browser-entry.js#L219 (or rather there plus some Rollup code around it).

For now I'm not entirely sure we could fix this in any other way than just swallowing these warnings?

m90 commented 3 years ago

We could also include Browserify 17 in here while we're updating things. Changeset seems unproblematic https://github.com/browserify/browserify/releases/tag/v17.0.0


EDIT: seems some tests are failing when using Browserify 17, so we might need to look into that upgrade on its own if we want it.

mantoni commented 3 years ago

Awesome! Thank you 💯 for getting this accross the finish line. 🙏 🥇

I've already tested this in a large project and it works like a dream.

📦 Released in v8.0.0.