OneBite.Dev - Coding blog in a bite size

🧑‍🚀 Blog for learning testing

testing blog posts, coding tips and trick in a bitesize to help you learn testing.

Mocking next router on Jest test

How to mock the next router on Jest test function to be able to past query when rendering a component in React or nextjs App

testing jest

My cypress setting to run with GUI or not

Sometimes you want to see your test running with GUI, but sometimes not, you just want run CLI and see the test results. Here is my package json setup

cypress testing

Disable video recording when running Cypress

How to Disable video recording when running Cypress run test on you project

cypress testing

Should you write an automated test for your code?

Many developers feel like writing tests is a waste of time because they do not see the immediate benefits. Here is benefits when we write an automated test for our code.

testing

How to solve Error jest-haste-map Watchman crawl failed.

Here is the solution on how to solve Error: jest-haste-map: Watchman crawl failed. Retrying once with node crawler when running Jest Test

testing jest

Run block of code each time before certain test in Cypress

Do you need to run same code / function each time running a test? We can automate it with beforeach

cypress testing

Waiting for element exists in Cypress instead of time

Here is how to wait for a certain element until exists in Cypress instead of time

cypress testing