0.1.1 • Published 2 years ago

crmv2-ui v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

CrmV2 UI

symlinking

  • npm link in this repo
  • npm link crmv2-ui in the consumer project (example ic-backend-ui/response)
  • ensure using same node versions in consumer and this project (example v12.22.7 in response and crmv2-ui)

prereqs

# need node version 14.17.6
# (lts release as of this time)
# These pick up the right node version from .nvmrc
nvm install # just needed once
nvm use # needed every time

local development

npm install
npm start

see package.json scripts for more useful commands

testing

We use the following tools to build unit tests:

  • Jest: JavaScript testing framework used to build unit tests
  • Testing Library: family of packages that helps you test UI components. We currently use the following frameworks from Testing Library:
    • DOM Testing Library: provides methods for querying the DOM for nodes in a way that's similar to how the user finds elements on the page
    • React Testing Library: builds on top of DOM Testing Library, adding APIs for working with React components.

Check out Jest's example of how to test the DOM in a React App using React Testing Library.