-
-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Thanks for the awesome library! I've found a strange issue when running Jest tests whilst implementing Portal (on an Expo 53 application).
Details:
/<my-user-path>/node_modules/@rn-primitives/portal/dist/index.js:69
return <>{Array.from(portalMap.values())}</>;
^
SyntaxError: Unexpected token '<'
When I inspect the file in my node_modules, I see JSX syntax:
function PortalHost({ name = DEFAULT_PORTAL_HOST }) {
const portalMap = usePortal((state) => state.map).get(name) ?? /* @__PURE__ */ new Map();
if (portalMap.size === 0) return null;
return <>{Array.from(portalMap.values())}</>; // <---- JSX syntax compiled here
}I'm a bit confused why this isn't being thrown during run time and only during whilst running Jest tests. Are you able to shed some light on this?
Metadata
Metadata
Assignees
Labels
No labels