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.

Refactor main.js into namespaced models; add tests for effects/reducers

See original GitHub issue

As per discussion in #190, we should be able to add unit tests for effects and reducers. Before we can do this, I think it would make sense to break apart the monolithic model in main.js. I think we can do this simply by creating 2 namespaced models, issues and address (to avoid confusion with the special location namespace choo provides for interacting with the window.location object), and then just keep a barebones set of initialization logic in the top level model.

Once that is done, we can start filling in unit tests for our reducers and effects.

Issue Analytics

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

github_iconTop GitHub Comments

nickoneillcommented, Apr 1, 2017

Can we hold off on this until we get some more clarity on #260? I don’t want to waste anyone’s time here without knowing the timeline on getting away from choo v4.

nickoneillcommented, Aug 27, 2017

This is resolved now that we’re moving to react, no more monolithic main.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adjust Namespaces | ReSharper Documentation
This command is a bulk fix that helps you synchronize namespaces with folder structure in any scope, which can be as large as...
Read more >
Move type to namespace - Visual Studio (Windows)
Learn how to use the Quick Actions and Refactorings menu to move a type to a different namespace or folder.
Read more >
How to refactor your app to add unit tests
First, we need a testing target. So, go to the File menu and choose New > Target. Scroll down until you see “iOS...
Read more >
WebStorm refactor JavaScript variable namespace
I have polluted one of my classes with too many functions. Now, I want to clean it up by introducing several namespaces.
Read more >
Refactor to allow more general name, kind, namespace ...
After updating the GVKN/Ns, you should still be able to refer to the resource by either its original GVKN/Ns or the current one....
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 Post

No results found

github_iconTop Related Hashnode Post

No results found