Repository navigation
test: prune tests that couldn't tell a break from a refactor - #461
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
ℹ️ One test coverage gap inline. No P0 or P1 findings.
Approach: Sound — checking rendered pixels and waiting past the next timer turn both test observable behavior without changing production code.
Reviewed changes — Reviewed both rewritten tests and ran both files after pnpm build: 22 passed; the ffmpeg test was skipped.
- Tour bracket: Replaces the drawing spy with a check that the top bracket’s blue spine is above the bottom bracket’s in rendered PNGs.
- Editor picker: Lets zero-delay timers run before verifying that the input stays attached until the picker returns a file.
gpt-6.2-sol(high) | 𝕏
comark-annotate
comark-badge
comark-bundle
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-git-graph
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
These tests went red on refactors that kept behavior: the name of an inlined script's function, which property a crashing lint rule read first, the number of .svelte files in a folder, and an import path in two Doctor pages. Each now checks what a page or caller sees, and the docs-wording lines are gone.
There was a problem hiding this comment.
ℹ️ One new test coverage gap inline. No P0 or P1 findings.
Reviewed changes — Reviewed the eight test files changed since 4f2cb3f. The workspace build succeeded and all 189 focused tests passed.
- Checked inline scripts without pinning internal function names in annotate, outline, properties, and the Mermaid renderer.
- Replaced Svelte file counts with checks for the components imported by the links and mark packages.
- Kept linter behavior checks while dropping assertions on V8 wording and Mermaid Doctor page prose.
gpt-6.2-sol(high) | 𝕏
Latest result Pull request merged. Final answersSession Pull request merged. |

Ten tests in this repo couldn't tell a real break from a harmless change. Most went red when nothing broke, and one stayed green when something did. Every test file is now read in full.
The bracket test in
packages/annotate/test/tour.test.tsspied onmarks.drawand checked its fifth argument. Renaming that internal function, with no change to any frame, turned it red. It now renders each shot's last frame and finds the rows the bracket's spine crosses. Aside="top"bracket must sit above a bottom one.The picker test in
packages/ui/test/editor-upload.test.tschecked that the file input was still attached one microtask afterchooseFiles()opened it. Removing the input on asetTimeout(…, 0)right afterinput.click()broke the WebKit rule the source comment states, and the test stayed green. It now waits 20 ms before the check.Four tests matched the name of the function an HTML renderer inlines as a script (
start,relativize,describeTime). Renaming it turned them red, though the page runs the same code. They now check the script's shape, that it calls itself, and that it holdsdescribeTime's source, so the outline test also goes red when the rail's script is written without its call, which the old copy missed.The lint crash test pinned V8's text for each rule's first null read, such as
(reading 'src'). Readingaltbeforesrcincomark/missing-altturned it red. It now checks each crash names its rule and carries the thrown error's message. It came with the fix in #43, and it still goes red when a crash escapeslint()again.The Svelte tests for comark-links and comark-mark counted the files in
src/svelte/, internal helpers included. Moving the heading's#link into its own component turned one red. They now check that every component any of them imports is there.packages/lint/test/mermaid.test.tsalso checked that two Doctor pages containcomark-ui/html. Rewording the example to register the Vue preset, which takes the samemermaidoption, turned it red, so those lines are gone.annotate/test/tour.test.ts› "preserves bracket orientation: %s" (2 cases)drawtodrawMarkinmarks.tsand its two callers: old copy red, new copy green. Droppedmark.edgefrom the call intour/draw.ts: new copy red.ui/test/editor-upload.test.ts› "uploads what the picker returns at the cursor", theisConnectedcheck beforechangesetTimeout(() => input.remove(), 0)afterinput.click()inupload.ts: old copy green, new copy red.outline/test/toc.test.ts› "adds an "On this page" outline…", therailScriptcheckstarttomountRailinscript.ts, exported asstart: old red, new green. Inlined the function without its call: old green, new red.ui/test/ui.test.ts› "zooms a Mermaid diagram…", themermaidScriptcheckstarttomountMermaidBar: old red, new green. Inlined without the call: both red.annotate/test/annotate.test.ts› "carries the slider script once per render" and "gives every screenshot a Copy button…", the script countstarttomountAnnotations: old red, new green. Dropped the once-per-render guard: both red.properties/test/properties.test.ts› "follows each box with the script…", therelativizechecksrelativizeanddescribeTimeunder other names and exported them by their public names, then rebuilt comark-time: old red, new green. InlinedrelativizewithoutdescribeTime's source: both red.lint/test/lint.test.ts› "turns a rule that crashes into one diagnostic…"comark/missing-altreadsaltbeforesrc: old red, new green, the missing-alt tests green. A crashing rule throws out oflint()again: both red.links/test/frameworks.test.ts› "ships Svelte components that compile"#link into anAnchor.sveltethatHeading.svelteimports: old red, new green. DeletedHeading.svelte: both red.mark/test/frameworks.test.ts› "ships Svelte components that compile"Classed.svelteintoMark.svelteandSup.svelte: old red, new green. DeletedClassed.svelte: both red.lint/test/mermaid.test.ts› "reports … through the limited preset and Doctor" (2 cases), the Doctor page checksimport comarkUi from "comark-ui/html"to"comark-ui/vue": old red, new green.Tests: 3210 in the full suite, the same before and after the last commit, since it rewrites tests and deletes none. The 2669 counted earlier came from a run where five suites didn't load until
docswas prepared.pnpm typecheckpasses.Kept on purpose:
zoom/test/zoom.test.ts"types its events on the document and the window" has no runtime assertion. It's anexpectTypeOftest, andtsrs --noEmitchecks it.test/workspace.test.ts,test/inline-scripts.test.ts,test/npm-trust.test.tsanddoctor/parts.test.tsread source text, but they enforce the registration and release rulesAGENTS.mdlists.ui/test/editor-vue.test.tsmocks Tiptap to pin a save race (a stale save must not overwrite an external load). That race only shows up with a controlled serializer.code/test/code.test.tschecks there's no.ck-bar::beforewindow dots, andchat/test/chat.test.tsthat a running step has no animation. Both look like removal checks, but they came with the fix in fix: title tool steps from the part, and drop the step pulse and terminal dots #332.links-stylesorblock-boundarymust not leak into output, since both are live internal tags.Not checked:
remark-to-comark/test/cli.test.ts"refuses to migrate with no git repository unless forced" times out at 5 s onmainand on this branch while the machine is loaded.test/fuzz.test.tsseed 3 timed out once under the same load and passes alone. The ffmpeg MP4 test skips without ffmpeg.