Skip to content

get to 100% code coverage - #3945

Open
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:four-loc-coverage
Open

get to 100% code coverage#3945
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:four-loc-coverage

Conversation

@MichaelWest22

@MichaelWest22 MichaelWest22 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Went though the code loc coverage report and added tests for each missing line of coverage. None of the remaining untested code was of any real concern and no actual bugs or issues needed resolving. But getting to 100% lets you see the future untested code lines much easier.

The only issue I had is testing window.location usage for refresh etc. These tests break the test suite making them untestable. So to get to 100% i had to add the window.location mocking point via htmx.__location. We only need this for our internal test mocking and we don't have to ship this exposed so I added sed commands to minimize and strip the additions from the shiped htmx.js in dist when built.

Corresponding issue:

Testing

Just added loads of new tests for all the edge cases

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@MichaelWest22 MichaelWest22 added the htmx 4 Issues specific to htmx version 4 label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

htmx 4 Issues specific to htmx version 4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant