DEV Community

Cover image for Become a JavaScript Testing Pro: 14 Resources for Developers

Become a JavaScript Testing Pro: 14 Resources for Developers

Matti Bar-Zeev on January 20, 2023

You know I have a strong passion for testing. Testing helps me to maintain good code design, stay focused on the purpose of the code, and prevent r...
Collapse
 
liviufromendtest profile image
Liviu Lupei

What approach woukld you take to automatically check if your website works as expected on a real Safari browser?

And not just some WebKit engine emulator.

It's the 2nd most popular browser in the world right now (after Chrome, of course).

And unlike Edge, it's not using Chromium.

Collapse
 
mbarzeev profile image
Matti Bar-Zeev

Not really related to testing JS, but I think that Cyprss.io can be a good candidate for that.

Collapse
 
liviufromendtest profile image
Liviu Lupei

Nope, not a good option.

The only option that works with that proprietary Cypress tool is to run tests on a WebKit engine emulator, which is not the same as running a test on a real Safari browser.

Isn't the JavaScript you're testing part of a website? It doesn't run in complete isolation, right? It runs in a browser, right?

And sorry if that's not the case.

Thread Thread
 
mbarzeev profile image
Matti Bar-Zeev

The JS tested here is focused on unit testing, so basically no real browser is involved.
What you're aiming for is automation tests, which can be done with tools such as Selenium, Cypress, WebdriverIO.

Thread Thread
 
liviufromendtest profile image
Liviu Lupei

Yes, I understand the differences between unit testing and functional testing.

Collapse
 
tythos profile image
Brian Kirkpatrick

Running mostly in on-prem GitLab, we've found a modest balance of jasmine and c8 go a long way towards facilitating the kind of automation we need in the CI to minimize headaches, even across large code bases. The integration within and across the pipeline is fantastic, with built-in support for test report parsing and other features. It also helps to bundle unit & regression tests within the module exports, if you can get away with it.

Collapse
 
geminii profile image
Jimmy

Thanks a lot @mbarzeev for your really great job 👏
Most of these articles looks very interesting and glad to discover each of them (and enjoy your passion for testing 😱).

Collapse
 
mbarzeev profile image
Matti Bar-Zeev

That's so great to hear (read actually), thank you for the kind words! 🙂🍻

Collapse
 
donmb1 profile image
Martin Braun

What about Storybook?

Collapse
 
mbarzeev profile image
Matti Bar-Zeev

What about it? :)
I don't consider Storybook as a direct tool for testing, but I do have quite a few article about Storybook integration - check them up and let me know if there's anything missing that you are interested un particular:)

Collapse
 
donmb1 profile image
Martin Braun

Ok I was just wondering you didn't mention it in your list. To me its a testing tool as you can easily test isolated components. Not like a CI though.

Collapse
 
cfecherolle profile image
Cécile Fécherolle

Great collection of resources, and amazing job listing them in a relevant way! Thank you

Collapse
 
mbarzeev profile image
Matti Bar-Zeev

Thanks!