Testim Copilot is here | Learn More

Month: January 2020

Code smells are signs that something is wrong with your code and demands your attention. By investigating the smell, you can find and (hopefully) fix its underlying cause, improving your code in the process. In this post, we want to help you write better JavaScript, not via tools, but by following some best practices. In…

ES2015 (ES6) added several new data structures. While Map and Set are more straightforward, ES2015 also added “weak collections” like WeakMap and WeakSet. In this post we’ll go over why maps were added, what’s “weak” about a WeakMap and when one might want to use it. What we did before maps JavaScript has had object…

Async code in JavaScript can be difficult at the best of times. When you add unit testing into that mix, trying to get your async code and your unit tests to play well together can feel very difficult at times. In today’s post, we’ll show you the different techniques you can use to effectively handle…

My little self stood in front of my computer some years ago, churning out code that today would make me scream like a baby deprived of food. The motivated me had made some changes to a 1,000-line app the previous night, and now the code just wouldn’t run. If there was anything I remember, it…

Code coverage guides us toward thoroughly tested and, ultimately, high quality code. And it’s with code coverage tooling that we’re able to understand the status of our current coverage. If you’re currently using Mocha to test your application, you’re in luck. Today we’re going to cover everything you need to know about getting set up…

Single-page applications developed with JavaScript libraries such as React are becoming the standard for front-end apps. The barrier to entry is low, and they provide the user with a more responsive experience. However, testing user interfaces hasn’t always been easy. Testing libraries such as Selenium have been popular, but these tests are notoriously slow and…

What is Flow in JavaScript? First, let’s understand Flow. Flow is a static type checker that allows a developer to check for type errors while developing code. This means a developer receives faster feedback about the code, which they can use to improve its quality. Flow works by using annotations and type definitions for adding…

Web applications are constantly changing to help businesses differentiate or remain competitive. Each change to the frontend has the potential to break functional tests. Is AI the answer? In this webinar, we discussed the challenges of frontend testing, backed by results of a Testim survey. We showed how test automation frameworks have evolved, and how…

Automated testing. “Yeah, yeah, yeah,” you say. “I know it reduces bugs and increases code reliability and allows us to have fearless deployments.” You might think, “I have automated unit tests of our front-end and back-end code. I have integration tests of interactions between our front end and our API and between our API and…

This post aims to answer a simple question, which is, indeed, its title: “Which tools are used for unit testing in Angular?” I bet most people when they hear this question immediately answer “Jasmine and Karma,” and that makes sense. After all, these are the default tools installed along with Angular CLI, so they represent…