Basic task impl + test fixes#198
Open
alexander-ignatow wants to merge 1 commit intomate-academy:masterfrom
Open
Basic task impl + test fixes#198alexander-ignatow wants to merge 1 commit intomate-academy:masterfrom
alexander-ignatow wants to merge 1 commit intomate-academy:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a new test to verify the HTML form is shown on GET / in [formDataServer.test.js:43]
Why: README requires the app to show an HTML form with date, title, and amount fields. The previous suite did not test this requirement at all.
Updated endpoint naming in test titles from POST /submit-expense to POST /add-expense in [formDataServer.test.js:54] and [formDataServer.test.js:71]
Why: The test names were inconsistent with the actual request path used in the tests. This removes ambiguity and improves task clarity.
Strengthened the invalid input test to assert HTTP 400 status in [formDataServer.test.js:84], and updated assertion count in [formDataServer.test.js:79].
Why: The previous test only checked that some response text existed. Explicit status validation makes failure behavior deterministic and aligned with expected rejection semantics.
Reworked the response-format test from JSON API behavior to HTML behavior with formatted JSON in [formDataServer.test.js:91].
Why: README explicitly says the server should return an HTML page with well-formatted JSON. The old test required application/json and raw object equality, which contradicted README.
Changed POST payload in the HTML-response test to application/x-www-form-urlencoded using querystring in [formDataServer.test.js:9].
Why: This better reflects real browser form submission and validates the form-data path described by the task.