question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-test-renderer is included in production bundle

See original GitHub issue

According to my webpack stats, it’s adding about 55k to a production build. Is there a way to allow this to be eliminated by tree-shaking if testStatechart is not in use?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
MicheleBertolicommented, Aug 26, 2018

Thank you very much @good-idea @edorivai to discuss about this.

I was thinking about separating the packages, like:

import { Action, State, withStateMachine } from 'react-automata'

and:

import { testStateMachine } from 'react-automata-test-utilities'

What do you think?

Also, if someone has experience creating a monorepo with Learn and Yarn Workspaces is more than welcome to submit a PR : )

Than you very much!

3reactions
san650commented, Aug 29, 2018

I’ll start working on it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Renderer - React
This package provides a React renderer that can be used to render React components to pure JavaScript objects, without depending on the DOM...
Read more >
react-test-renderer | Yarn - Package Manager
Design simple views for each state in your application, and React will efficiently update and render just the right components when your data...
Read more >
Do react test files render along with other files in web browser ...
No, it won't get any test code. Test code is eliminated when you run 'npm run build'. The transpiler(babel) will transpile your jsx,...
Read more >
Running Tests | Create React App
React Testing Library​ ... If you'd like to test components in isolation from the child components they render, we recommend using react-testing- ...
Read more >
How To Test a React App with Jest and React Testing Library
Both Jest and React Testing Library come pre-packaged with Create React App and adhere to the guiding principle that testing apps should ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found