docusaurus/assets/js/48cbf216.4ba1d1dc.js
2024-08-13 08:12:10 +00:00

1 line
No EOL
4 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[48991],{51372:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>g,frontMatter:()=>h,metadata:()=>l,toc:()=>m});var n=s(24246),r=s(71670),o=s(27378),a=s(31542);function i(){const e={div:"div",...(0,r.a)()};if(!o.version.startsWith("18"))throw new Error(`'test-bad-package/README.mdx' is rendered with bad React version: ${o.version}`);if(!o.version.startsWith("18"))throw new Error(`'test-bad-package/README.mdx' is rendered with bad React-DOM version: ${a.version}`);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(e.div,{children:["React version: ",o.version]}),(0,n.jsxs)(e.div,{children:["React DOM version: ",a.version]})]})}function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",hr:"hr",p:"p",pre:"pre",...(0,r.a)(),...e.components},{Details:s}=t;return s||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"test-bad-package",children:"test-bad-package"})}),"\n",(0,n.jsx)(t.p,{children:"This package declares a wrong React version on purpose (16.14.0)"}),"\n",(0,n.jsx)(t.p,{children:"The goal is to test that the MD/MDX content of this package can still be imported/rendered by our website."}),"\n",(0,n.jsxs)(t.p,{children:["See related issue ",(0,n.jsx)(t.a,{href:"https://github.com/facebook/docusaurus/issues/9027",children:"https://github.com/facebook/docusaurus/issues/9027"})]}),"\n",(0,n.jsx)(t.hr,{}),"\n","\n","\n",(0,n.jsx)(i,{}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsx)(t.h2,{id:"mdx-components-work",children:"MDX Components work:"}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Summary"}),(0,n.jsx)(t.p,{children:"Details"})]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-js",children:"const age = 42;\n"})})]})}function d(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}const h={},p="Import Bad Package",l={id:"tests/import-bad-package",title:"Import Bad Package",description:"We are importing MDX content from a file that is in a package that has a bad React version.",source:"@site/_dogfooding/_docs tests/tests/import-bad-package.mdx",sourceDirName:"tests",slug:"/tests/import-bad-package",permalink:"/tests/docs/tests/import-bad-package",draft:!1,unlisted:!1,tags:[],version:"current",lastUpdatedBy:"dependabot[bot]",lastUpdatedAt:1723536498e3,frontMatter:{},sidebar:"sidebar",previous:{title:"Image tests",permalink:"/tests/docs/tests/img-tests"},next:{title:"Broken Anchors tests",permalink:"/tests/docs/tests/links/broken-anchors-tests"}},u={},m=[{value:"MDX Components work:",id:"mdx-components-work",level:2}];function x(e){const t={a:"a",h1:"h1",header:"header",hr:"hr",p:"p",...(0,r.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"import-bad-package",children:"Import Bad Package"})}),"\n",(0,n.jsx)(t.p,{children:"We are importing MDX content from a file that is in a package that has a bad React version."}),"\n",(0,n.jsx)(t.p,{children:"This is expected to work despite the bad version."}),"\n",(0,n.jsxs)(t.p,{children:["See ",(0,n.jsx)(t.a,{href:"https://github.com/facebook/docusaurus/issues/9027",children:"https://github.com/facebook/docusaurus/issues/9027"})]}),"\n",(0,n.jsx)(t.hr,{}),"\n","\n",(0,n.jsx)(d,{})]})}function g(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(x,{...e})}):x(e)}g.displayName="MDXContent(_dogfooding/_docs tests/tests/import-bad-package.mdx)"},71670:(e,t,s)=>{s.d(t,{Z:()=>i,a:()=>a});var n=s(27378);const r={},o=n.createContext(r);function a(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]);