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.

Switch to tape or mocha/karma?

See original GitHub issue

What do you think about switching from jest to tape?

I’ve got a preliminary setup here:

https://github.com/yisar/fre/compare/master...mindplay-dk:use-tape

This is unfinished - tape is much simpler than jest, but it doesn’t come with “batteries included”, so it takes more work to set this up.

For now, I have Babel with JSX and async support working - this seems already much safer, because I can clean up JS-DOM after each test, which means that timeouts get flushed, which means tape can catch assertions that run after the promise resolves. (the commented-out lines demonstrate this.)

I still need to set up code coverage and XML reporting for CI integration - before I can port the actual tests, so a lot of work left.

Do you think I should continue with this?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:30 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
mindplay-dkcommented, Dec 16, 2019

I see, so we can only test DOM in node, and then test scheduler through chrome panel in the future.

Well, it’ll run the full suite of tests - just that those tests will be effectively testing the integration with a bunch of mocks and stubs, whereas what we’re really interested in is integration with a browser.

But we’ll figure out later how to run the tests without the mocks and stubs. 🙂

1reaction
yisarcommented, Dec 12, 2019

If only performance is not supported, then polyfills can be found, and I don’t think js-dom is a good choice. We can refer to the practice of preact, multiple libraries are used at the same time.
Anyway, I don’t think jest is a good choice for testing js framework now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

This keyboard was supposed to be ENDGAME… - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >
jsz-error - npm Package Health Analysis - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix ...
Read more >
The Hitchhiker's Guide to Modern JavaScript Tooling
js are confused with the tooling used to produce modern JavaScript code. Webpack, Babel, ESLint, Mocha, Karma, Grunt… what should I use and ......
Read more >
Test-Driven JavaScript Development - Packt
It said you take the input tape, manually type in the output tape you expect, ... Each time a change is to be...
Read more >
Calendar-to-Mite (part 3) - Moritz Wachter
There is Mocha, Karma, Jasmine, Pupeteer, Jest, AVA, Tape, QUnit, Chai, ... I feel it gives a better overview to move all test...
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