Skip to content

polish HTTP 304 docs/test/handling#4129

Merged
khassel merged 3 commits intoMagicMirrorOrg:developfrom
KristjanESPERANTO:http304
Apr 30, 2026
Merged

polish HTTP 304 docs/test/handling#4129
khassel merged 3 commits intoMagicMirrorOrg:developfrom
KristjanESPERANTO:http304

Conversation

@KristjanESPERANTO
Copy link
Copy Markdown
Collaborator

After #4120 was merged, here's a bit of polish on top.

  • docs: Optimize JSDoc and comments.
  • test: The existing 304 test is moved to the dedicated status code block and extended with an errorSpy to also verify that no error event is emitted.
  • refactor: The success branch is moved before the error branch in fetch(). This is more intuitive.

The bottom line is that this PR improves maintainability. For users, this PR doesn't change anything.

Moves the 304 test from "Basic fetch operations" to the dedicated
"HTTP status code handling > 304 Not Modified" block. Also adds an
errorSpy to verify that no error event is emitted alongside the response.
Happy path first: readers see the emit-response path before error handling.
@khassel khassel merged commit 0905d66 into MagicMirrorOrg:develop Apr 30, 2026
12 checks passed
@KristjanESPERANTO KristjanESPERANTO deleted the http304 branch April 30, 2026 22:31
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.

2 participants