Files
return-youtube-dislike/Extensions/combined
Leon BubovaandDmitrii Selivanov d62130b898 Feature/add unit testing framework and start writing unit tests (acceptance tests) (#708)
* add jest and rewire for testing

* wrap loose code for initMutationObserver() in function and call it instead of just executing it

Otherwise this code is executed everytime state.js is imported somewhere in a file.
This leads to not being able to test properly, since state.js is imported in a lot
of the src files and fails when running the tests since we are missing global environment
settings such as document, window etc in the jest environment.

* export roundDown and getNumberformatter to make them testable as well

* add basic acceptance tests for utils.js, create snapshots and add jest config

* add failing test for buggy behaviour in a separate test case and skip it until fixed

* Fixes after merge conflicts

---------

Co-authored-by: Dmitrii Selivanov <selivano.d@gmail.com>
2024-06-16 19:52:58 +02:00
..
2024-06-16 18:39:08 +02:00
2022-09-30 08:19:07 -06:00

Extension Source

Guide to Compiling

Compiling to Development (Testing)

  1. Go to the root directory of the project
  2. Run npm i to install all project dependencies (if not done so already)
  3. run npm run dev to compile the extension to the ~/Extensions/combined/dist/ folder.

Compiling to Production (Final Release)

  1. Go to the root directory of the project
  2. Run npm i to install all project dependancies (if not done so already)
  3. run npm run build to compile the extension to the ~/Extensions/combined/dist/ folder.