Best of Jest2022

  1. 1
    Article
    Avatar of hashnodeHashnode·4y

    Unit testing with Jest, React, and TypeScript

    Software testing is critical to lower the chances of our program failing by running tests with the end-user in mind. Testing-library/react is a testing utility tool that's built to test the actual DOM tree rendered by React on the browser. The goal of the library is to help you write tests that resemble how a user would use your application.

  2. 2
    Article
    Avatar of freecodecampfreeCodeCamp·4y

    Test-Driven Development Tutorial – How to Test Your JavaScript and ReactJS Applications

    Test-Driven Development (TDD) requires you to pre-specify the output your intended program must produce to pass the test of functioning the way you envisioned. This tutorial will show you all you need to cd path/to/addition-calculator-jest-project Step 4: Create a package, Initialize a package.json file for your project. If your package manager is Yarn, run: yarn add jest --save-dev.

  3. 3
    Article
    Avatar of towardsdevTowards Dev·4y

    How we migrated from Bootstrap to Tailwind CSS.

    Tailwind CSS is a utility-first CSS framework packed with classes like flex, pt-4, text-center, and rotate-90 that can be composed to build any design, directly in your markup. In our examples, we will use packages and commands related to the GatsbyJS static-site generation framework. This function adds the content in before the page is rendered. Don’t waste your time trying networkidle.

  4. 4
    Article
    Avatar of communityCommunity Picks·4y

    Getting Started with Vitest

    Vitest is Jest-compatible and comes with out-of-the-box ESM, Typescript, and JSX support. It uses the Vite dev server to transform your files during testing and listens to the same configuration of your app. It is extensible using the same plugin API as Vite and 'notification--slide' The component renders the correct style. The component emits an event when the close button.

  5. 5
    Article
    Avatar of hashnodeHashnode·4y

    Docusaurus 2.0 🥳️: Meta's static site generator to build beautiful documentation websites

    Docusaurus 2.0 is a documentation static-site-generator, based on Node.js and React. It allows you to focus on content: just write Markdown files. It is already powering many great docs sites you know: React-Native, Redux, Tauri, Electron, Courier, Figma.

  6. 6
    Article
    Avatar of hashnodeHashnode·4y

    TDD (Test Driven Development) Basics Tutorial with TypeScript/React

    The 4 steps are what I think are what are needed in learning TDD. In the previous test, I actually omitted some important setups. This example app uses "pseudo" API to call data. So it runs perfectly on testing environment.

  7. 7
    Article
    Avatar of auth0Auth0·4y

    Testing React Applications with Jest

    MockingJest allows you to mock objects in your test files. You can turn on automatic mocking with automock which will mock every component/object that the component is part of your project. For the first test, we'll write a simple test that ensures that Jest was set up correctly and that it can run a test successfully.

  8. 8
    Article
    Avatar of freecodecampfreeCodeCamp·3y

    React Testing Library Tutorial – How to Write Unit Tests for React Apps

    The React Testing Library has a set of packages that help you test UI components in a user-centric way. This means it tests based on how the user interacts with the various elements displayed on the page. To set up a React Project with Vite, we'll be using Vite to set up our app that we'll test.

  9. 9
    Article
    Avatar of logrocketLogRocket·4y

    Testing a website with Selenium and Docker

    Selenium is a popular browser automating tool that is primarily used for automating web applications for testing purposes. In this tutorial, you will learn why and how to use Selenium and Docker to test a website. Use the following Docker command to create a container with the image you have just pulled.

  10. 10
    Article
    Avatar of gitlabGitLab·4y

    How to automate testing for a React application with GitLab

    GitLab is a popular JavaScript library for building user interfaces. In this tutorial, I'll show you how to create a new React application with GitLab React. Run unit tests as part of the CI process in GitLab, and output the test results and code coverage into the pipeline. Define a test stage for your pipeline by adding the following code to your.gitlab-ci.yml file.