Skip to content

test(plan): unmount the view so leftover {#if} patches cannot throw - #103

Open
frahlg wants to merge 1 commit into
mainfrom
cursor/plan-test-unmount-6aee
Open

frahlg wants to merge 1 commit into
mainfrom
cursor/plan-test-unmount-6aee

Conversation

@frahlg

@frahlg frahlg commented Oct 23, 2026

Copy link
Copy Markdown
Member

Main verify went red on #101 with every test still green:

ReferenceError: Comment is not defined
  in Plan.svelte:314  ({#if plan.prefs})
  originated in src/views/Plan.svelte.test.ts

#101 did not touch Plan. The suite tore down by emptying document.body, which leaves $effects and askWhenLive promises running. A late {#if} patch then constructs a comment node against a jsdom that has already dropped Comment.

This switches the Plan tests to cleanup() from testing-library, which destroy()s the component — the same teardown the other mounted views already use.

No product change. No changeset.

Open in Web Open in Cursor 

Main verify failed with Comment is not defined in Plan.svelte after every
test had passed. The suite tore down by emptying document.body, which
leaves $effects and askWhenLive promises running; a late {#if} patch then
constructs a comment node against a jsdom that has already dropped Comment.

cleanup() from testing-library destroy()s the component, the same way the
other mounted views already do.

Co-authored-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T14:34:24.464341Z 058d803 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp 058d803 Commit Preview URL

Branch Preview URL
Oct 23 2026, 02:34 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants