Develop is green again, for the third time - #836
Merged
Merged
Conversation
Four failures on develop, none of them from a feature, all of them the same shape: a thing that is generated or counted, and a change that did not regenerate it. tests/unit/routes/items.routes.test.js mocked the validation middleware and did not list validateSoldOut, so the route got `undefined` where a handler belongs. router.post throws "argument handler must be a function" at REQUIRE time, which fails the whole suite before a single test runs - 2 suites, 0 tests. The route itself is fine and is serving in production. tests/unit/middleware/items.validation.test.js fakes the express-validator chain link by link, and the sold-out validator uses isBoolean, which the fake did not have. Same failure mode: not at the assertion, at require. The fake now carries every link the real chain offers, so the next validator does not do this again. languages/server/_english.json was out of date; the tool that writes it says so by name in the failure message. The README's REST badge said 658 and there are 659 routes. Whitespace, a generated file, a number and two test fakes. No behaviour. All four are the cost of the same missing habit: when a change adds a route, a message or a validator, something generated has to be regenerated, and nothing says so until CI does.
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
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.
Four failures on develop, none of them from a feature, all of them the same shape: something generated or counted, and a change that did not regenerate it. #835 cannot go green until these do.
tests/unit/routes/items.routes.test.jsmocks the validation middleware and does not listvalidateSoldOut, so the route receivesundefinedwhere a handler belongs:That throws at require time, so the whole suite fails before a single test runs - 2 suites, 0 tests. The route itself is fine and is serving in production; I checked the deployed shard has it and is answering.
tests/unit/middleware/items.validation.test.jsfakes the express-validator chain link by link, and the sold-out validator uses.isBoolean(), which the fake did not have. Same failure mode: not at an assertion, at require. The fake now carries every link the real chain offers, so the next validator does not repeat this.languages/server/_english.jsonwas out of date. The tool that writes it is named in the failure message.The README's REST badge said 658; there are 659 routes.
No behaviour. Whitespace, a generated file, a number, two test fakes.
Verified: desktop 2806 pass, api 11,097 pass.
Worth saying out loud, because this is the third one of these: all four are the cost of the same missing habit. When a change adds a route, a message or a validator, something generated has to be regenerated, and nothing tells you until CI does. A pre-push hook that regenerates and diffs would end this category.