htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Newly Cloned Repo fails the Test command

Open sameer-dudeja opened this issue 1 year ago • 2 comments

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, image

sameer-dudeja avatar Jun 20 '24 00:06 sameer-dudeja

I have a similar issue when running test , although I just have 2 failed test cases. Below is the screenshot. image 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 image

I tried increasing timeout to 12000 this.timeout(12000)

and surprisingly the failed case didn't show up anymore.

image

kaiji123 avatar Jul 15 '24 20:07 kaiji123

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!

Telroshan avatar Jul 16 '24 06:07 Telroshan

closing as it is mostly working except for the external URL ND aspect (which will fix after the second run)

1cg avatar Dec 11 '24 23:12 1cg