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.

No possibility to test behavior with different modules?

See original GitHub issue

Sometimes flow works different in the following cases:

  1. code in one file
  2. code in different files

But it seems that we can’t write tests right now that can check the second case.

I tried to fix react-redux libdefs. I need to declare a connected React component in one file and check its usage in another to reproduce a bug. I tried to create TestComponent.js file near test_connect.js, but checker says that I need to use name for file that starts with test_. But when I renamed a file to test_component.js, I got an error

* react-redux_v5.x.x/flow_v0.54.x- (flow-v0.55.0): Unexpected Flow errors(2):
   Error: 2-test_connect.js:4
     4: import CC3 from './test_CC3';
                        ^^^^^^^^^^^^ ./test_CC3. Required module not found

Can we handle the situation somehow? Can I help?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
AndrewSouthpawcommented, Mar 9, 2018

Sure thing! We’ll see how it goes, there’s still a chance we’ll need to revisit it some day, but hopefully this is a decent strategy to move us forward. Thanks for opening the issue.

1reaction
LoganBarnettcommented, Feb 12, 2018

Is there a known benefit to why we mangle the filenames now? It seems like that’s separate from actually finding the test files, so without more information it seems like removing the mangling is the best thing to do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Component Testing Or Module Testing (Learn With ...
Component Testing is performed after unit testing. Components are tested as soon as they are created, so there are chances that the results ......
Read more >
Integration Testing: What is, Types with Example - Guru99
Integration Testing is defined as a type of testing where software modules are integrated logically and tested as a group.
Read more >
restart python (or reload modules) in py.test tests
I have serveral test_xxx.py modules in my test directory. Each module will init the package in the way in needs (using fixtures). Since...
Read more >
The different types of testing in software | Atlassian
Integration tests verify that different modules or services used by your application work well together. For example, it can be testing the interaction...
Read more >
Improving Angular tests by enabling Angular testing module ...
The destroyAfterEach Angular testing module teardown option addresses several ... The host element is not removed from the DOM until another ...
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