Repository navigation
Conversation
jubianchi
force-pushed
the
test/run-component-tests-in-ci
branch
from
October 18, 2026 19:33
6b8ddbe to
96109b9
Compare
Three of the component tests written for node:test built their commits and users before fields they now need: the thread test lacked preview_segments, so FoldedCommitBody had nothing to map; the images test's user lacked timezone; the inbox test's commit lacked hot_score, mentions and pasteis_count. None of this showed, because these tests run nowhere yet. The fixtures now carry the fields, so the next commit can make them run and type-check. 🤖 Generated with Claude Code
…nner Ten component tests import test from node:test and contain JSX. The test:unit script runs node --test over tests/Unit/*.test.ts, which neither matches .tsx files nor parses JSX, so they have run nowhere since the day they were written, and only bun test, which is not the project's runner, could execute them. The seven other .tsx tests already run under the Vite runner, listed by name in the config that SeriesStash.test.ts launches from node --test. These ten now import test from vite-plus/test, and lose the void before their test() calls, which Vitest's test() returning nothing made meaningless and the linter flagged one by one. Both the Vite config and the tests tsconfig take every .tsx test by glob, so nothing has to be registered by hand again. The Vite run goes from 7 files and 36 cases to 17 files and 119, all green after the previous commit's fixtures, and tsc now covers all seventeen. The formatter was run over the touched files to sort their imports. 🤖 Generated with Claude Code
resources/scripts/brand-wallpapers.ts belonged to no tsconfig: the root one includes resources/js only and the tests one includes tests. The type-aware lint then picks a program for it by heuristics, and that pick changes with the size of the other projects: once the tests project takes every component test, the script is checked without Node's types and the lint fails on node:fs, process and import.meta.dirname, while nothing in the script changed. A tsconfig of its own, extending the root one with Node's types, settles which program checks it; tsc --project resources/scripts/tsconfig.json passes. 🤖 Generated with Claude Code
jubianchi
force-pushed
the
test/run-component-tests-in-ci
branch
from
October 18, 2026 19:36
96109b9 to
3066158
Compare
jubianchi
marked this pull request as ready for review
October 18, 2026 19:38
This was referenced Oct 18, 2026
Contributor
|
#300 does the same thing (runs the TSX component tests in CI). Worth keeping just one of the two. |
Contributor
Author
|
@hbenabdallah good catch! closing this one. Thanks |
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.
Ten of the seventeen
tests/Unit/*.test.tsxfiles importtestfromnode:testand contain JSX. Thetest:unitscript only runsnode --test tests/Unit/*.test.ts, which matches neither.tsxnor JSX, so they have never run in CI. The other seven already run under the Vite runner throughtests/draft-images.config.ts.Left unrun, they drifted: 3 cases fail on a stale fixture, and 4 type errors hide in two files.
Changes
testfromvite-plus/test(and drop the now-meaninglessvoidbeforetest()); the Vite config and the tests tsconfig pick up every.tsxtest by glob.resources/scripts/tsconfig.json:brand-wallpapers.tsbelonged to no TypeScript project, and the type-aware lint picked one for it depending on the size of the others. With the tests project grown, it lost Node's types and the lint failed. Seven lines give the script its own project.Result
tscon the tests.tsxfilesvp lintNot included: renaming
draft-images.config.tsandSeriesStash.test.ts, which no longer describe what they run. Happy to follow up if you'd like.