Skip to content
This repository was archived by the owner on Feb 22, 2026. It is now read-only.
This repository was archived by the owner on Feb 22, 2026. It is now read-only.

React component testing, discovered issues #517

@nmashchenko

Description

@nmashchenko

Hey guys! I have prepared another set of tests for the repo! That was a bit challenging experience because for some reason the only library that allowed me to actually write those tests and run them was: https://github.com/denoland/fresh.

Specifically, only version 0.11.0. Newer versions seems to be working really bad and won't allow you to run any tests, e.g.:

Uncaught error from ./islands/__tests__/nav.test.tsx FAILED

 ERRORS 

./islands/__tests__/nav.test.tsx (uncaught error)
error: null
This error was not caught from a test and caused the test runner to fail on the referenced module.
It most likely originated from a dangling promise, event/timeout handler or top-level code.

 FAILURES 

./islands/__tests__/nav.test.tsx (uncaught error)

FAILED | 0 passed | 1 failed (0ms)

Here are some related opened issues/code examples I found that helped me:

denoland/fresh#427
https://github.com/cdoremus/deno-blog/blob/main/tests/islands/Counter.test.tsx
testing-library/react-testing-library#669

Anyways, I covered first components and found following issues:

  1. CustomError, ServerError, InternalError were requiring children even though you had a check children || "alt text" in there which didn't make sense and test exposed that (also fixed the issue)
  2. You almost don't use alt property on images, most of my tests exposed that but I decided to not change it for now, if you want me to I am happy to open separate prs to fix that!
  3. most of your html input/labels dont have htmlFor and id for input/label pair, I can also open additional prs to fix that to enhance the repo

I am opening PR for this work shortly! Let me know if you are interested in issues I highlighted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions