Skip to content

mkienenb/react-testing-tanstackrouter-mocha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-testing-tanstackrouter-mocha

An example of testing a Tanstack Router React app using react-testing-library under Mocha

We needed debug why Tanstack router was not rendering pages correctly in our kotlin/js react application's mocha testing environment.

The problem turned out to be that NODE_ENV=test must be specified for Tanstack Router to function as expected in a test environment.

See react-testing-tanstackrouter-vite for the same example under Vite.

Usage

Use npm run test:mocha to run the tests with Tanstack Router not rendering pages correctly.

Use npm run test:mocha-fixed to run the tests with correct Tanstack Router behavior.

About

An example of testing a Tanstack Router React app using react-testing-library under Mocha

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors