Skip to content

test: extend and improve unit tests - #663

Open
Laertes87 wants to merge 5 commits into
mainfrom
ExtendAndImproveUnitTests
Open

Laertes87 wants to merge 5 commits into
mainfrom
ExtendAndImproveUnitTests

Conversation

@Laertes87

@Laertes87 Laertes87 commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

@C4illin This is a massive PR. And full disclosure here: I let an Opus 5.5 agent run with the task to check the present unit tests with the goal to improve and extend them for cases that have not been covered yet. Then I also let that agent write tests for pages.

Actual production code was not altered, but the agent found 7 bugs and documented them in the code (you can find them by searching for test.failing within the code.

To be completely honest, I haven't checked all the changes the agent made. The code I did check looks fine and looking at the code and function coverage report generated by bun test I assume that the code is at least not bad and actually improved the overall test coverage.

I didn't let the agent fix the bugs it found since I thought it would be worth to verify the bugs first and create separate issues for them. If those are valid bugs, they probably should be fixed at some point so that the respective tests are not expected to fail for all eternity.

If you are completely against this approach, I can totally understand that. A proper review of that amount of changes is nearly impossible after all.


Summary by cubic

Extends the unit test suite with new converter, service, and page tests. Production code is unchanged; the work documents 7 bugs as test.failing markers that should be verified and fixed in separate issues.

Test infrastructure

  • A new tests/preload.ts redirects every test to a temporary database and upload/output directories so tests never touch production data, pins the runtime timezone to UTC, and clears environment variables that would change page behavior.
  • New tests/pages/ helpers spin up the real routes against a mock app, covering login, upload, conversion, download, history, and job-deletion flows.
  • Converter tests share mock execFile helpers instead of spawning real binaries.

Written for commit e7affd7. Summary will update on new commits.

Review in cubic Turn on auto-fix

@github-actions github-actions Bot added the Test label Oct 2, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 42 files

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread tests/db/db.test.ts Outdated
Comment thread tests/pages/results.test.ts
Comment thread tests/converters/pandoc.test.ts Outdated
Comment thread tests/converters/libreoffice.test.ts Outdated
Comment thread tests/converters/assimp.test.ts Outdated
Comment thread tests/pages/firstRun.test.ts
Comment thread tests/pages/listConverters.test.ts
Comment thread tests/pages/results.test.ts
Comment thread tests/converters/main.test.ts Outdated
Comment thread tests/pages/root.test.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 10 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread tests/preload.ts
@Laertes87
Laertes87 force-pushed the ExtendAndImproveUnitTests branch from d0119c2 to e7affd7 Compare October 6, 2026 16:14
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