Raixa, a simple and customizable way to write React Test Library unit tests

Raixa is pronounced "Raisha" and is in reference to a 13th century country mansion in Spain.

Quickstart

1. Import Raixa at the top of your test file

import Raixa from 'raixa';

2. Render your component

Raixa.render(
  <UserCard
    name="Divardo"
    age={10}
  />
);

3. Use Raixa functions for all assertions, interactions etc.

Example:

Raixa.click('#UserCard-change-profile-button');
Raixa.typeInto('#UserCard-new-name-field', 'Calicci');
...

Raixa Functions:

Interactions – interact with stuff on the page

Intelligent Waiting – wait better

Assertions – make sure your app behaves properly

Handy Functions – useful utilities

  • uniquify - add a unique, random tag to a string