developit / developit/web-worker

Test Framework / Build Tool Support

Aperta
#4 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub
help wanted
Lingua principale
JavaScript
Stelle
1.2k
Fork
57
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The patterns encouraged by this package are awesome, but they are only as good as the tools that support them.

The use of`import.meta.url` in the analysis has limited support in build tools and test frameworks. For example in this project's own tests, `import.meta.url` can't be used due to the CommonJS conversion used in Ava. I thought it could be useful to create an issue to track support for popular test frameworks? Let me know if that sounds like a sensible approach.

### Tools to Update

- [ ] Ava test framework:
- [ ] Blocker: `import.meta.url` is not supported in CJS
- [ ] Mocha:
- [ ] Check if this works now that Mocha [supports native modules](https://github.com/mochajs/mocha/pull/4038)
- [ ] Jest:
- [ ] Depends on Modules support: facebook/jest#9430
- [ ] Update [jsdom-worker](https://github.com/developit/jsdom-worker/issues/8)
- [ ] RollupJS: Need to determine plugin combination for build support
- [ ] Ensure this works with [rollup-plugin-off-main-thread](https://github.com/surma/rollup-plugin-off-main-thread/)
- [x] Webpack: webpack/webpack#6719
- [ ] Fix in [worker-plugin](https://github.com/GoogleChromeLabs/worker-plugin/issues/67)
- [ ] Fix in worker-loader
- [ ] Parcel:
- [ ] Check to see if Parcel's default handling of Worker functions correctly with this

Feedback welcome if alternative approaches are preferable too - I don't want to make more work than necessary, but it does also seem a useful thing to do so far as it isn't too much effort to track these (and in theory the modules support naturally in these projects should align with these directions).

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Review the project's own Ava-based tests and the Tools to Update checklist, starting with the `import.meta.url` limitation under CommonJS. Investigate the listed Mocha, Jest, RollupJS, Webpack, and Parcel cases using their linked issues and references. Done means the supported combinations and required fixes or follow-up work are clearly recorded.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, rollup, webpack
Ambito
build-system, testing, tooling
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.