fix: _interopRequireWildcard should only cache objects (#10574)

* fix: [#10561] _interopRequireWildcard should cache object only

* fix: narrow down cache restriction to object/function type

* test: add interop require null module case
This commit is contained in:
samuel kwok
2019-10-19 18:01:38 +08:00
committed by Nicolò Ribaudo
parent 78cd63d9cf
commit fe258dec04
11 changed files with 32 additions and 4 deletions

View File

@@ -0,0 +1,3 @@
return import("./mod.js").then(({ default: def }) => {
expect(def).toBe("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==");
});