What will Domain be replaced with?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.3k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
I'm adding support for parallel tests to node-tap. https://github.com/tapjs/node-tap/issues/306
One sticky point is that, like most test frameworks, node-tap needs to be able to cleverly handle thrown errors and tie them to the test environment where the error was thrown from (especially since many existing assertion libs turn things like expect(foo).to.match(/regexp/) into a thrown error).
When tests were not run in parallel, there was no problem. Just walk down the tree of test.currentChild or whatever, and a single process.on('uncaughtException') is sufficient.
I'm using Domains to manage thrown errors in child tests, and it works great, but the bright red deprecation notice in the docs is scary.
What will it be replaced with? Will it be feature-equivalent? If so, is there any reason why the existing API has to be broken, and not re-implemented in terms of the new thing? Is there an expected time frame for the Domain api to be broken?
Thanks.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Lesen Sie zuerst die Node.js-Dokumentation zu Domains und das verlinkte node-tap-Issue zu parallel-tests; untersuchen Sie anschließend, wie test.currentChild und process.on('uncaughtException') verwendet werden, um ausgelöste Fehler den Child-Tests zuzuordnen. Als erledigt gilt die Identifizierung eines genehmigten Ersatzes für Domains, einschließlich der Frage, ob er feature-equivalent ist, und des erwarteten Zeitplans für API-Breaking-Änderungen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, node.js
- Bereich
- backend
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100