A React TypeScript project demonstrating two different approaches for mocking/simulating Kolibri events with Jest.
This project showcases how to test Kolibri UI button interactions using:
- Callback approach: Direct callback function testing
- Event approach: Custom event listener testing with
kolClick
events
npm install
npm test # Run tests
npm run dev # Start development server
src/Callback.test.tsx
- Tests button interactions via callback propssrc/Event.test.tsx
- Tests button interactions via custom events
Both components demonstrate testing patterns for Kolibri UI's KolButton
component with different event handling approaches.