Reader small image

You're reading from  Redux Made Easy with Rematch

Product typeBook
Published inAug 2021
Reading LevelIntermediate
PublisherPackt
ISBN-139781801076210
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Sergio Moreno
Sergio Moreno
author image
Sergio Moreno

Sergio Moreno is a front-end developer with more than 4 years of experience really focused in the analysis, design, development and building large-scale applications. Formerly worked at Allfunds, the world's largest fund distribution network, he led the front-end team to build a full new suite of products for the new Digital section of Allfunds. He entered the open-source world in 2019 where's contributed to big companies like Google, Facebook, Airbnb, or Pinterest and much more. In 2020 focused his contributions to Rematch, where he released the v2 version with a full rewrite of the codebase and a full compatibility with Typescript and so many improvements like reducing the bundlesize in some cases by 110%, and Lingui, an amazing internationalization library, who helped to release the v3 version. In 2021, joined Flowable as Product Engineer, a compact and highly efficient workflow and business process management platform for developers, system admins and business users.
Read more about Sergio Moreno

Right arrow

Creating tests for Rematch models

Tip

Before getting started with this section, I recommend taking a first look at the Jest documentation, https://jestjs.io, and discovering which assertions are available to understand this chapter even more. Along the chapter we'll explain in detail what they do and how Jest simplifies the testing process.

To get started, take a look at this code, which will be the pattern that we'll reuse for our tests:

describe("Describe the suite", () => {
  beforeEach(() => {})
  beforeAll(() => {})
  afterEach(() => {})
  afterAll(() => {})
  it("should do ...", () => {
    expect(1).toEqual(1)
  })
})

In all the tests that we are going to create, we'll define the describe() method, which allows us to gather our tests into separate groupings within the same file. In this way, we can describe the component name and just...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Redux Made Easy with Rematch
Published in: Aug 2021Publisher: PacktISBN-13: 9781801076210

Author (1)

author image
Sergio Moreno

Sergio Moreno is a front-end developer with more than 4 years of experience really focused in the analysis, design, development and building large-scale applications. Formerly worked at Allfunds, the world's largest fund distribution network, he led the front-end team to build a full new suite of products for the new Digital section of Allfunds. He entered the open-source world in 2019 where's contributed to big companies like Google, Facebook, Airbnb, or Pinterest and much more. In 2020 focused his contributions to Rematch, where he released the v2 version with a full rewrite of the codebase and a full compatibility with Typescript and so many improvements like reducing the bundlesize in some cases by 110%, and Lingui, an amazing internationalization library, who helped to release the v3 version. In 2021, joined Flowable as Product Engineer, a compact and highly efficient workflow and business process management platform for developers, system admins and business users.
Read more about Sergio Moreno