lundi 10 juin 2019

How to write a test for this object in React / JavaScript

I have a this file in my React app and I would like to write a test for this file. I use @testing-library/react and jest

const api = {
  baseURL: 'https://localhost:3000',
  users: {
    userPath: '/api/.../',
    registerPath: '/api/.../register/',
  },
  bills: {
    billsPath: '/api/.../bills/',
  },
  transactions: {
    registerPath: '/api/.../transactions/',
  },
};

module.exports = api;

Aucun commentaire:

Enregistrer un commentaire