fix(test): repair the unterminated string in the cover upload suite - #217
Merged
Conversation
#216 merged while its CI was red, so main carries a test file that cannot be parsed: the multipart helper has literal newlines where CRLF escapes belong, which leaves Buffer.from("<newline>") as an unterminated string. vitest collects zero tests from the file and reports the suite as failing, so the E2E job on main is currently red. This is the fix that was already on the PR branch but had not reached the PR when it was merged. Verified two ways before pushing, since none of the local checks cover test files - build type-checks tsconfig.build.json which excludes tests/, test:unit does not run e2e, and eslint ignores tests/**: tsc -p tsconfig.json --noEmit no errors for this file esbuild <file> exits 0, both new test names in the output Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
🎉 This PR is included in version 1.7.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
What does this PR do?
mainis currently red. #216 merged while its CI was failing, so the branch carries a test file that cannot be parsed.The multipart helper added in that PR ended up with literal newlines where CRLF escapes belong:
That is an unterminated string. vitest collects
(0 test)from the file and reports the whole suite as failing, which is why the E2E job onmainis failing right now.This is the same fix that was already sitting on the
fix/article-cover-single-filebranch — it just never reached the PR before it was merged. The PR head stayed pinned at the old commit even though the branch ref had moved, so the merge took the broken version.Verified before pushing
None of the local checks cover test files, which is how this got through twice:
pnpm buildtype-checkstsconfig.build.json, which excludestests/pnpm test:unitdoes not run the e2e suitetests/**entirelySo this time:
tsc -p tsconfig.json --noEmit(base config includes tests)esbuild tests/e2e/article/upload-cover.test.tsThe second one is the same transform vitest performs, so it is the closest local proxy for "will this file collect".
Follow-up worth doing
A
typecheckscript wired into Quality Checks would have caught this before either merge. It needs its own PR first: the base config currently surfaces 7 files with pre-existing type errors that all pass at runtime, and they would turn CI red on day one.Type of Change
Checklist
feature/,fix/,chore/,docs/)🤖 Generated with Claude Code