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.

add a simple test runner?

See original GitHub issue

An important target group for this app (imo) are beginners and prototype builders. From my experience, both these groups would benefit greatly from having simple test infrastructure bundled with this starter.

From my own experience, I usually have a script.js that I’d include into the main module, but that’s pretty hacky until I finally setup (whatever flavor of test infra is popular). The value I get is from being able to write code that’ll run on every edit-save separately from my app, but that later morphs into a unit test suite or so on. For beginners, they’d build their app, but write tests for smaller parts of the app they’re building, while learning to write tests for their code.

To be clear, I’m not advocating any specific framework/suite/assert libs; I’d just like to be able to run even a if(true) throw new Error script on every change.

Thoughts?

Thanks for the great tool!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:12
  • Comments:51 (25 by maintainers)

github_iconTop GitHub Comments

23reactions
ffxsamcommented, Jul 22, 2016

Huge vote for Mocha + Enzyme + Sinon. This probably requires JSdom, at least according to Enzyme docs.

15reactions
gaearoncommented, Jul 22, 2016

I’d err on the side of having __tests__ folders anywhere in the tree. It’s very painful to write imports that go many folders up and then many folders down. Also colocating related code helps comprehension.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web Test Runner
Test runner for web applications. Headless browsers with Puppeteer, Playwright, Selenium or WebdriverIO. Reports logs, 404s, and errors from the browser.
Read more >
Run unit tests with Test Explorer - Visual Studio - Microsoft Learn
To run code coverage for test methods in a solution: Right-click in Test Explorer and select Analyze Code Coverage for Selected tests.
Read more >
Run tests | IntelliJ IDEA Documentation - JetBrains
Rerun a single test · Right-click a test on the Test Runner tab of the Run tool window and select Run 'test name'....
Read more >
Test in Android Studio
Android Studio is designed to make testing simple. It contains many features to simplify how you create, run, and analyze tests.
Read more >
unittest — Unit testing framework — Python 3.11.1 ...
(If you are already familiar with the basic concepts of testing, you might want to skip to the list of assert methods.) The...
Read more >

github_iconTop Related Medium Post

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