esm: handle more error types thrown from the loader thread#48247
esm: handle more error types thrown from the loader thread#48247nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
|
Review requested:
|
There was a problem hiding this comment.
Awesome, thanks!
The new test-cases seem a bit verbose; could they be DRY'd up with a loop (for (const valid of […]) and possibly for (const invalid of […]))?
| if (status === 'success' || body === null || | ||
| (typeof body !== 'object' && | ||
| typeof body !== 'function' && | ||
| typeof body !== 'symbol')) { |
There was a problem hiding this comment.
Nit
| if (status === 'success' || body === null || | |
| (typeof body !== 'object' && | |
| typeof body !== 'function' && | |
| typeof body !== 'symbol')) { | |
| if (status === 'success' || body === null || | |
| (typeof body !== 'object' && | |
| typeof body !== 'function' && | |
| typeof body !== 'symbol') | |
| ) { |
There are on the same structure than almost every other test cases in that file, that seems fine to me. IMO test code should be WET code, not DRY. |
|
Landed in d28f1f1 |
PR-URL: nodejs#48247 Refs: nodejs#48240 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jacob Smith <jacob@frende.me>
|
This is blocked by another PR that needs to be backported to v18.x because it references missing code. |
|
For reference, backporting this is blocked until #44710 is backported. |
PR-URL: nodejs#48247 Refs: nodejs#48240 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs#48247 Refs: nodejs#48240 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs#48247 Refs: nodejs#48240 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs/node#48247 Backport-PR-URL: nodejs/node#50669 Refs: nodejs/node#48240 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jacob Smith <jacob@frende.me>
PR-URL: nodejs/node#48247 Backport-PR-URL: nodejs/node#50669 Refs: nodejs/node#48240 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jacob Smith <jacob@frende.me>
Refs: #48240