Skip to content

Add re-frame-example - #20

Merged
olecve merged 1 commit into
mainfrom
examples/re-frame
Jul 16, 2026
Merged

Add re-frame-example#20
olecve merged 1 commit into
mainfrom
examples/re-frame

Conversation

@olecve

@olecve olecve commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Adds examples/re-frame-example — a node-test + jsdom project (no browser) testing a re-frame app with the library. Like node-test-example, it references the in-repo library source via :source-paths, so it tracks HEAD.

What it demonstrates

  • app.events-test — unit-testing re-frame event/subscription handlers as plain functions (the recommended re-frame pattern), no DOM.
  • app.views-test — testing a re-frame view:
    • render + read the DOM with screen,
    • react to a synchronous dispatch-sync (wrapped in act),
    • drive state through a real click and wait for the async re-frame dispatch to reach the DOM via find-by-text.

Deps: reagent 2.0.1 + re-frame 1.4.7 + react 19. Added to the CI example matrix.

Verified locally: npm run ci (fmt → lint → test) passes — 4 tests / 7 assertions.

New examples/re-frame-example: a node-test + jsdom project (no browser)
testing a re-frame app with the library, referencing the in-repo library
source so it tracks HEAD. It covers:
- app.events-test: unit-testing re-frame event/subscription handlers as
  plain functions (no DOM)
- app.views-test: rendering a re-frame view, reacting to dispatch-sync
  (in act), and driving state through a real click that waits for the
  async re-frame dispatch via find-by-text

Add re-frame-example to the CI example matrix.
@olecve
olecve merged commit 8512d3b into main Jul 16, 2026
4 checks passed
@olecve
olecve deleted the examples/re-frame branch July 16, 2026 13:44
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.

1 participant