/component-unit-testing-workshop

Workshop to showcase how to test components

Primary LanguageJavaScript

Workshop Component Unit Testing

Testing components requires a different mindset and tools than testing regular javascript files. This repository includes some examples that highlight different ways of querying elements, testing rendering and dealing with events.

Used tools

Framework

Commands

  • npm install: Install required dependencies
  • npm run storybook: Run storybook to view components
  • npm test: Run all available tests
  • npm run test:watch: Automatically re-run tests when .spec and .svelte files change