Skip to content

Fix IP listening in tests and enhance DOM bundle assertions - #181

Open
M-arcus wants to merge 3 commits into
sitespeedio:mainfrom
M-arcus:fix-tests
Open

M-arcus wants to merge 3 commits into
sitespeedio:mainfrom
M-arcus:fix-tests

Conversation

@M-arcus

@M-arcus M-arcus commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces improvements to the test suite and test infrastructure, focusing on more accurate assertions in DOM tests and better compatibility for the local web server. The main changes are grouped below:

Test assertion improvements:

  • In test/api/domTest.js, updated assertions to explicitly check that info.amp is false for ordinary pages, verify that the advice.performance.adviceList exists, and confirm the returned URL matches the expected value. This makes the test expectations clearer and more robust.
  • In test/dom/adviceTest.js, added 'severity' to the list of expected keys, ensuring that tests now check for the presence of this property in advice objects.

Test infrastructure fix:

  • In test/help/webserver.js, changed the server binding from '0.0.0.0' to '127.0.0.1' to improve browser compatibility, as Firefox does not accept http://0.0.0.0:port URLs while Chrome does. This ensures tests run reliably across browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant