Skip to content

Commit

Permalink
test: add unit tests for (#54)
Browse files Browse the repository at this point in the history
- Add unit tests for models and all of background-scripts package
- Made code more testable by relying more on promises
- Fixed bugs found while performing testing.
  • Loading branch information
ChrisERo authored Apr 24, 2024
1 parent 9c540fb commit 9487559
Show file tree
Hide file tree
Showing 17 changed files with 3,203 additions and 497 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules/*
notepads/*
extension/*
.vscode/*
coverage/*
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
coveragePathIgnorePatterns: ['/node_modules/', '/mocks/']
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "vocab-forager",
"version": "2.1.3",
"version": "2.1.4",
"description": "VocabForager is a browser extension built for people building their vocabulary for one, or several, languages.",
"main": "index.js",
"scripts": {
"clean": "rm -rf extension extension.zip",
"test": "jest",
"test": "jest --coverage --silent --detectOpenHandles",
"build-dev": "webpack --env mode=development --config webpack/webpack.config.js",
"build-prod": "webpack --env mode=production --config webpack/webpack.config.js",
"build-prod-zip": "npm run clean && npm run build-prod && zip -r extension.zip extension"
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "VocabForager",
"description": "VocabForager is a browser extension built for people build their vocabulary for one, or several, languages.",
"version": "2.1.3",
"version": "2.1.4",
"manifest_version": 3,
"icons": {
"16": "icons/icon128.png",
Expand Down
Loading

0 comments on commit 9487559

Please sign in to comment.