Skip to content

test(expo-template): make tests and checks runnable - #578

Merged
thiagobrez merged 3 commits into
callstack:mainfrom
oleksandrzavarzin-callstack:fix/make-tests-and-checks-runnable
Sep 9, 2026
Merged

test(expo-template): make tests and checks runnable#578
thiagobrez merged 3 commits into
callstack:mainfrom
oleksandrzavarzin-callstack:fix/make-tests-and-checks-runnable

Conversation

@oleksandrzavarzin-callstack

Copy link
Copy Markdown
Contributor

PR Description

The Expo template's only test failed on a fresh scaffold, the script running it couldn't report
that failure, and nothing linted or typechecked the template at all.

  • The test was broken. ThemedText-test.tsx used react-test-renderer, which returns null
    from .toJSON() under React 19, asserted against a snapshot generated by an older React. Rewritten
    with @testing-library/react-native v14 and the stale snapshot is deleted.

  • "test": "jest --watchAll" never exited. With CI=true and stdin closed it ran the suite,
    printed the interactive watch hint, and parked forever waiting for a keypress; no exit code, so a
    failing test reported nothing. Split into test / test:watch.

  • No lint, no typecheck. The template defined neither script and shipped no eslint config.
    Added lint (expo lint) and typecheck (tsc --noEmit), plus the eslint.config.js.

  • 4 lint errors in the template's own copy (react/no-unescaped-entities on apostrophes) are
    escaped, so npm run lint is green on a fresh scaffold.

yarn lint / yarn typecheck at the repo root now skip this package. That's deliberate: the root
pins @types/react through resolutions while the template declares its own, so checking it
in-place reports results no user ever sees. CONTRIBUTING.md explains this and documents the
pack-and-scaffold flow instead.

Important

Merge after #577 - align dependencies with Expo SDK 54>. This branch is off main, so the two
type errors that PR fixes are still present here; until it lands, the typecheck script this PR
adds fails on a scaffolded app.

How to test?

yarn workspace @bottom-tabs/expo-template pack --out /tmp/expo-template.tgz
npx create-expo-app@latest /tmp/tpl --template /tmp/expo-template.tgz
cd /tmp/tpl && npm install

Screenshots

Not applicable - no runtime or UI change.

Comment thread CONTRIBUTING.md Outdated
Co-authored-by: Thiago Brezinski <thiagobrez@gmail.com>
@thiagobrez
thiagobrez added this pull request to the merge queue Sep 9, 2026
Merged via the queue into callstack:main with commit cc8ce1f Sep 9, 2026
5 checks passed
@oleksandrzavarzin-callstack
oleksandrzavarzin-callstack deleted the fix/make-tests-and-checks-runnable branch September 10, 2026 11:08
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