Arrange in unit test

  • Preparing to acting of tests
    • All errors in this phase are not actually errors / failures of tests
    • In terms of Jest, most likely, beforeEach or beforeAll methods
    • Sometimes we need to mock import/require (in JavaScript)
      • It can be done by means of framework like Jest
      • It can be done by means of independent library like Rewire
    • Here you should write stubs, mocks, etc (Test Doubles)


My name is Max, also known as @mxkvl.

I am a software developer, currently working mostly with TypeScript, React and Node ecosystems.

I write a blog about topics that interest me most: programming languages in general, TypeScript, testing, writing and other great stuff.

Join the Mailing List