Files
return-youtube-dislike/package.json
T
Leon Bubova 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

52 lines
1.6 KiB
JSON

{
"name": "return-youtube-dislike",
"version": "3.0.0-16",
"description": "Chrome extension to return youtube dislikes",
"main": "ryd.content-script.js",
"scripts": {
"start": "echo To build for development, please use \"npm run dev\". To build for production, please use \"npm run build\".",
"dev": "webpack --mode=production --watch",
"build": "webpack --mode=production",
"test": "jest",
"build:safari": "webpack --mode=production && xcrun safari-web-extension-converter Extensions/combined/dist/safari --project-location Extensions/combined/dist --bundle-identifier com.returnyoutubedislike.safari-ext --force",
"prepare": "husky install"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Anarios/return-youtube-dislike.git"
},
"keywords": [
"youtube",
"dislike",
"return",
"extension"
],
"author": "Anarios",
"bugs": {
"url": "https://github.com/Anarios/return-youtube-dislike/issues"
},
"homepage": "https://github.com/Anarios/return-youtube-dislike#readme",
"devDependencies": {
"@babel/core": "^7.23.5",
"@babel/preset-env": "^7.23.5",
"@babel/runtime": "^7.23.5",
"babel-loader": "^9.1.3",
"babel-plugin-rewire": "^1.2.0",
"copy-webpack-plugin": "^11.0.0",
"filemanager-webpack-plugin": "^8.0.0",
"husky": "^8.0.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"lint-staged": "^15.2.0",
"prettier": "^3.2.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"prettier": {
"printWidth": 120
}
}