From 0de451dd67b12921e7cd3f00ea5b7d6a9633d944 Mon Sep 17 00:00:00 2001 From: Martin Sunnset Date: Fri, 18 Sep 2026 10:25:09 +0200 Subject: [PATCH] Added documentation for testing --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index c1fca98..e049399 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,20 @@ The code and suggestions generated with ChatGPT were adapted to fit our applicat 8. Use the Spotify link to open the song directly in Spotify. ## Testing +We created automated tests using **Vitest** and **React Testing Library** to verify some of the main functionality +in the application. + +The tests cover: +- Adding and removing favorite tracks, including saving them in 'localStorage' +- Search input and clearing the search field +- Filter interactions +- Playing and pausing track previews +- Spotify links and URI conversion +- Spotify API requests, returned data, and error handling +- Track card interaction and active state +- Snapshot testing for the search bar + +External API requests are mocked in the tests so they can run without depending on Spotify being available. ## How we used AI We mainly used ChatGPT when working on the user interface of the application.