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.

Unable to see events rendered in tests

See original GitHub issue

Reduced Test Case

  1. Clone the repo https://github.com/tgandrews/fullcalendar-test
  2. yarn
  3. yarn start see the events rendered
  4. yarn test see the tests pass but the snapshot include no events in src/__snapshots__/App.test.js.snap

Bug Description

Describe how to recreate the bug. Follow the steps above to be able to recreate. This works with v4 providing that is used instead.

What do you expect to happen? I expect events to be rendered in test environments

What happens instead? No events are rendered in tests even after waiting for a long time 20seconds in the linked example

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
arshawcommented, Jun 12, 2021

this has been implemented and queued for release.

2reactions
arshawcommented, Jun 4, 2021

I believe I’ve found where rendering is short-circuiting when no available coordinates:

The next step is to modify the code so events are rendered unconditionally, even without coordinates, which may required a tiny bit of refactoring.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React testing library using beforeAll to render cannot find item ...
I think this is an answer you need: https://github.com/testing-library/ ... Ideally you want to use the returned function from render() .
Read more >
Fix Your Failing Tests: A Debugging Checklist for React ...
Unable to find an element with the text: ${text}. This could be because the text is broken up by multiple elements. In this...
Read more >
Testing-library: avoid these mistakes in async tests
Now, let's see if our test fails when we pass the incorrect id. it('should render user info', async () => { render(<UserView id="bob" ......
Read more >
Common mistakes with React Testing Library - Kent C. Dodds
Some mistakes I frequently see people making with React Testing Library. ... can see what's rendered and maybe why your query failed to...
Read more >
Simulate Browser Events in React with React Testing Library
When unit testing React components, it's often useful to be able to ... Here, we will look at a solid third-party library that...
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