test: add smoke tests for defer importing synthetic modules - #65537
test: add smoke tests for defer importing synthetic modules#65537MayaLekova wants to merge 1 commit into
Conversation
03ccd50 to
414cd49
Compare
|
@joyeecheung and @nicolo-ribaudo could you take a look please? Just a few smoke tests for synthetic modules. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65537 +/- ##
==========================================
- Coverage 90.21% 90.11% -0.10%
==========================================
Files 751 751
Lines 253550 253639 +89
Branches 47813 47787 -26
==========================================
- Hits 228733 228565 -168
- Misses 16076 16319 +243
- Partials 8741 8755 +14 🚀 New features to boost your workflow:
|
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
The tested behavior looks correct to me.
For the node:fs, is there any way to test when evaluation happens? Maybe if one monkey-patches some built-ins before evaluating node:fs then it does something different? (I hope the answer is "no it's not possible")
If the builtin was to write something to the global namespace, that would make it easier. But I guess they don't do so, in order no to pollute the global namespace. Also there might be another builtin module that writes something on |
414cd49 to
0302cad
Compare
The tests added ensure that Node.js doesn't crash or produce incorrect results when importing synthetic modules (i.e. JSON, text or builtin modules) with the `defer` modifier. Signed-off-by: Maya Lekova <maya@igalia.com>
0302cad to
7f7855e
Compare
test: add smoke tests for defer importing synthetic modules
The tests added ensure that Node.js doesn't crash or produce incorrect results when importing synthetic modules (i.e. JSON, text or builtin modules) with the
defermodifier.Signed-off-by: Maya Lekova maya@igalia.com