chaijs / chai

BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
https://chaijs.github.io
MIT License
8.11k stars 694 forks source link

ChaiJS Website not showing API reference docs #1618

Closed schaudhary111 closed 3 months ago

schaudhary111 commented 3 months ago

Not able to see API documentation on ChaiJS website - https://www.chaijs.com/api/assert/
Steps To Reproduce:-

  1. Open any browser (eg Chrome)
  2. Navigate to mentioned ChaiJS Website URL - https://www.chaijs.com/api/assert/
  3. Verify API reference documentation

Actual :- Nothing is shown in website.

Error :- Browser Console shows below error -

Uncaught SyntaxError: Unexpected token 'export' (at chai.js:3768:1)

Screenshot :-

image
43081j commented 3 months ago

oh no! @koddsson 👀

koddsson commented 3 months ago

My bad! Let me see if I can get this up and running again.

koddsson commented 3 months ago

I quickly revert this in https://github.com/chaijs/chaijs.github.io/pull/208

43081j commented 3 months ago

i think this needs to be type="module" it seems: https://github.com/chaijs/chaijs.github.io/blob/8d428d4ad4b9c38292bb50f6b0c6243f1fc92011/_includes/head.html#L16

maybe we just haven't deployed docs since 5.x?

koddsson commented 3 months ago

i think this needs to be type="module" it seems: https://github.com/chaijs/chaijs.github.io/blob/8d428d4ad4b9c38292bb50f6b0c6243f1fc92011/_includes/head.html#L16

maybe we just haven't deployed docs since 5.x?

Yeah I think so too. I didn't do that change because I couldn't verify it locally, getting the local setup online doesn't work for me for some reason. The reason why the revert didn't I worry is because the build downloads the latest chai version so reverting does nothing.

I figure we can fail forward by either adding type=module or pinning the version in the CI build. I have dinner in front of me so I can't do it right now but am able to try out those things in a hour or two when I'm done eating.

koddsson commented 3 months ago

And when I say and hour or two, I of course mean 20 minutes lol

https://github.com/chaijs/chaijs.github.io/pull/209 seems to have fixed the issue but we should unpin that soon so the docs are reflecting reality.