Skip to content

Aligns tests with readme and adds simple solution to validate it works#226

Open
alexander-ignatow wants to merge 1 commit intomate-academy:masterfrom
alexander-ignatow:fix/align-tests-with-readme
Open

Aligns tests with readme and adds simple solution to validate it works#226
alexander-ignatow wants to merge 1 commit intomate-academy:masterfrom
alexander-ignatow:fix/align-tests-with-readme

Conversation

@alexander-ignatow
Copy link
Copy Markdown

@alexander-ignatow alexander-ignatow commented Apr 9, 2026

this PR aligns the test with the readme and validates it with a simple solution

Summary of test changes:

The test data structure in createServer.test.js was updated so each compression type now has an explicit extension field:
gzip → gz
deflate → dfl
br → br
The Content-Disposition assertion was corrected to validate the README-defined file extension, not the compression type key itself.
This makes the header check strict and specification-driven (matching expected output filename format from the task description).
Why this was changed:

The README requires compressed files to use extensions .gz, .dfl, and .br.
Previously, tests inferred extension from compression type keys, which could pass even when implementation returned non-required suffixes.
The new assertions enforce exactly what the task asks for, reducing false positives.
Validation note:

The change was validated by creating a basic working implementation in createServer.js and running the suite.
With that implementation, tests pass and now correctly reflect README requirements, so tests and task specification are aligned.

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