-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can’t find expect() documentation in the API doc page #5206
Comments
@ericnakagawa this is a docusaurus thing, right? |
@binki Could you open up an issue at docusaurus for this? /cc @JoelMarcey |
@SimenB docusaurus appears to be a website generator which is not specific to jest. For the issue to be in docusaurus, that must mean that jest’s website stuff is set up so that Jest has configured docusaurus in https://github.com/facebook/jest/blob/96a44df8c07742997d7068c7b5925d1394fae0f9/website/siteConfig.js to show the document with id of |
After investigating out docusaurus works, I noticed that it supports defining a sidebar and that docs links are automatically added into the sidebar. However, when I visit the site, I see this: I noticed that if I click that little “go to fullscreen” button, it shows the sidebar: If the sidebar were not hidden when I visited the page, then the “Expect” link in the sidebar would be visible to my in-page hyperlink search. However, it isn’t by default and I find it very confusing. Now that I think I better understand the issue and have made it clear why I couldn’t find the docs for expect, is this a docusaurus issue or a jest one? Maybe jest is specifying a style which hides the sidebar by default instead of putting it at the end of the page and it could just specify a better style. Or maybe this is stock docusaurus style. Please let me know. |
I’m suspecting that the issue is jest-specific configuration because when I visit docusauru’s own site, I always see the sidebar: https://docusaurus.io/docs/en/site-config.html : So I bet the issue is in jest’s configuration of docusaurus rather than docusaurus itself. |
As I described, I'm using If jest just allowed docusaurus to display the sidebar as expanded like in docusaurus's own docs or put it after the content for mobile view, then searching the page for expect as a hyperlink would work. Additionally, if the sidebar expansion button in mobile mode were made more obvious instead of using the universal “switch to full screen” symbol, maybe I would have tried expanding it. But I didn't even know that there was supposed to be a sidebar until reading docusaurus's docs… I'm using desktop with my browser slotted to the right half of my screen. A lot of websites do not support this configuration and force me to scroll like 100px to see buttons on the upper right of the page because they have a fixed minimum width which is slightly too big. E.g., Facebook does this and forces me to scroll to see my notifications: https://i.imgur.com/iN2AWzF.png . Other websites, like your docs site, seem to use this width to detect opening the page in an iPad (I'm using desktop) and switch to an entirely new layout instead of being responsive. |
We are on a somewhat old version of docusaurs (a beta version), might be resolved whenever we are able to deploy with the latest version, see #5229 for latest |
@binki a new version of the website is now deployed, could you please test again? I cannot reproduce your issue now (but I was not by a computer earlier today, so I was unable to test before the successful deploy) |
@SimenB Thanks! The new version of the website includes the sidebar for me just like docusaurus’s own website, enabling me to find the “Expect” page: I’d consider that fixing the issue for me. |
The |
Got fixed somewhere between beta 3 and 1.0.3 of docusaurus then. Great! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
doc bug
What is the current behavior?
Searching for a link to “expect(” (e.g., type the apostrophe character and then
expect(
in a Mozilla-based browser) fails on https://facebook.github.io/jest/docs/en/api.htmlWhat is the expected behavior?
Searching for a link to “expect(” finds a hyperlink to in-page documentation or blurb linking to the documentation for
expect()
. I expect to have the same experience when searching for hyperlinks containing withexpect(
as I do when searching for, e.g., the hyperlinks containingafterAll(
.Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
n/a
The text was updated successfully, but these errors were encountered: