Skip to content

fix(test): repair the unterminated string in the cover upload suite - #217

Merged
aquie00t merged 1 commit into
mainfrom
fix/cover-test-parse
Aug 25, 2026
Merged

fix(test): repair the unterminated string in the cover upload suite#217
aquie00t merged 1 commit into
mainfrom
fix/cover-test-parse

Conversation

@aquie00t

Copy link
Copy Markdown
Collaborator

What does this PR do?

main is 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:

Buffer.from("
"),

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 on main is failing right now.

This is the same fix that was already sitting on the fix/article-cover-single-file branch — 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 build type-checks tsconfig.build.json, which excludes tests/
  • pnpm test:unit does not run the e2e suite
  • eslint ignores tests/** entirely

So this time:

check result
tsc -p tsconfig.json --noEmit (base config includes tests) no errors for this file
esbuild tests/e2e/article/upload-cover.test.ts exits 0, both new test names present in the output

The 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 typecheck script 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

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Chore

Checklist

  • My branch follows the naming convention (feature/, fix/, chore/, docs/)
  • My commits follow Conventional Commits
  • I have tested my changes locally
  • I have not introduced any breaking changes
  • I have updated relevant documentation if needed

🤖 Generated with Claude Code

#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>
@aquie00t
aquie00t merged commit e4655ab into main Aug 25, 2026
10 checks passed
github-actions Bot pushed a commit that referenced this pull request Aug 25, 2026
## [1.7.1](v1.7.0...v1.7.1) (2026-08-25)

### Bug Fixes

* **article:** reject cover uploads carrying more than one file ([#216](#216)) ([2eaeb15](2eaeb15))
* **test:** repair the unterminated string in the cover upload suite ([#217](#217)) ([e4655ab](e4655ab)), closes [#216](#216)
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.7.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aquie00t
aquie00t deleted the fix/cover-test-parse branch August 25, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant