Newly Cloned Repo fails the Test command
I recently cloned the HTMX repo and ran the npm run test command
To my surprise without making any changes it failed for 3 tests, I am new to htmx and might be missing something but in a layman's point of view all tests should pass in the most ideal sense or the test should be modified
I am attaching the screenshot of the failed tests,
I have a similar issue when running test , although I just have 2 failed test cases. Below is the screenshot.
It seems that issue comes from security.js file from test\core and www\static\test\core with the error being exceeding Timeout of 4000ms.
In this part of code
I tried increasing timeout to 12000
this.timeout(12000)
and surprisingly the failed case didn't show up anymore.
Hey, indeed those tests make requests to external URLs and it's unfortunately common to have timeout issues with those...
As it's going to depend on your internet connection for that request, that's probably why increasing the timeout worked for you here.
We need these tests to ensure selfRequestsOnly works as expected, so if you have any idea how to solve that timeout problem (without simply increasing the timeout value in this case), PRs are welcome!
closing as it is mostly working except for the external URL ND aspect (which will fix after the second run)