From 9185537e8f5d584e51f6f994e68bc499f321f84c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Oct 2026 02:25:27 -0400 Subject: [PATCH] WIP --- html/options.html | 2 +- js/{background.js => background_main.js} | 0 js/options.test.js | 5 ++++ js/{options.js => options_main.js} | 0 manifest.json | 2 +- package.json | 30 +++++++++++++++++------- 6 files changed, 29 insertions(+), 10 deletions(-) rename js/{background.js => background_main.js} (100%) create mode 100644 js/options.test.js rename js/{options.js => options_main.js} (100%) diff --git a/html/options.html b/html/options.html index 4c21677..9513ea5 100644 --- a/html/options.html +++ b/html/options.html @@ -4,7 +4,7 @@ Options - + diff --git a/js/background.js b/js/background_main.js similarity index 100% rename from js/background.js rename to js/background_main.js diff --git a/js/options.test.js b/js/options.test.js new file mode 100644 index 0000000..646f6e0 --- /dev/null +++ b/js/options.test.js @@ -0,0 +1,5 @@ +// Written by Mike Frysinger . Released into the public domain. + +it('test', () => { + console.log('ok'); +}); diff --git a/js/options.js b/js/options_main.js similarity index 100% rename from js/options.js rename to js/options_main.js diff --git a/manifest.json b/manifest.json index 3966eeb..cf443f8 100644 --- a/manifest.json +++ b/manifest.json @@ -18,6 +18,6 @@ "action": {}, "background": { "type": "module", - "service_worker": "js/background.js" + "service_worker": "js/background_main.js" } } diff --git a/package.json b/package.json index 46fa0b2..2e400ef 100644 --- a/package.json +++ b/package.json @@ -25,21 +25,35 @@ "lint:js": "eslint --cache js/*.js", "lint:md": "markdownlint *.md", "release": "npm-run-all --parallel ci dist", - "start": "http-server -a localhost -c-1 --cors ." + "start": "http-server -a localhost -c-1 --cors .", + "test": "npm run test:web", + "test:web": "web-test-runner --static-logging js/**/*.test.js" }, "devDependencies": { - "cssnano": "~7", - "eslint": "~9", - "eslint-plugin-jsdoc": "~50", + "@web/dev-server": "~1", + "@web/test-runner": "~1", + "chai": "~6", + "chai-dom": "~1", + "cssnano": "~8", + "eslint": "~10", + "eslint-config-prettier": "~10", + "eslint-plugin-jsdoc": "~64", + "eslint-plugin-lit": "~2", + "eslint-plugin-wc": "~3", "html-minifier": "~4", "http-server": "~14", "json-minify": "^1.0.0", + "lit": "~3", "markdownlint-cli": "~0", + "mocha": "~11", + "npm": "~11", "npm-run-all": "~4", "postcss": "~8", - "postcss-cli": "~8", + "postcss-cli": "~11", "prettier": "~3", - "terser": "~5" - }, - "dependencies": {} + "sinon": "~22", + "sinon-chai": "~4", + "terser": "~5", + "typescript": "~7" + } } -- 2.47.3