Skip to content

Commit

Permalink
Merge pull request #379 from snitin315/feat/migrate-to-jest
Browse files Browse the repository at this point in the history
feat: migrate to jest
  • Loading branch information
TheLarkInn committed May 17, 2023
2 parents 4dc1a2f + beed6bb commit c9ed069
Show file tree
Hide file tree
Showing 45 changed files with 3,066 additions and 2,140 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = {
{
files: ["test/**/*.js"],
env: {
mocha: true
jest: true
}
}
]
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn cover:ci
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Run tests with coverage
run: npm run test:coverage -- --ci
- if: ${{ matrix.os != 'windows-latest' }}
uses: codecov/codecov-action@v3
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
moduleFileExtensions: ["js", "mjs", "cjs", "ts"]
};
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"license": "MIT",
"devDependencies": {
"@types/mocha": "^8.0.3",
"@types/jest": "^27.5.1",
"@types/node": "^14.11.1",
"cspell": "4.2.8",
"eslint": "^7.9.0",
Expand All @@ -27,12 +27,10 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^6.0.0",
"jest": "^27.5.1",
"lint-staged": "^10.4.0",
"memfs": "^3.2.0",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"prettier": "^2.1.2",
"should": "^13.2.3",
"tooling": "webpack/tooling#v1.14.0",
"typescript": "^4.2.0-beta"
},
Expand All @@ -53,11 +51,11 @@
"pretty": "prettier --loglevel warn --write \"lib/**/*.{js,json}\" \"test/*.js\"",
"pretest": "yarn lint",
"spelling": "cspell \"**/*.*\"",
"test": "mocha --full-trace --check-leaks",
"test:only": "mocha --full-trace --check-leaks",
"test:only": "jest",
"test:watch": "yarn test:only -- --watch",
"test:coverage": "yarn test:only -- --collectCoverageFrom=\"lib/**/*.js\" --coverage",
"test": "yarn test:coverage",
"precover": "yarn lint",
"cover": "nyc --reporter=html node node_modules/mocha/bin/_mocha --full-trace --check-leaks",
"cover:ci": "nyc --reporter=lcovonly node node_modules/mocha/bin/_mocha --full-trace --check-leaks",
"prepare": "husky install"
},
"lint-staged": {
Expand Down

0 comments on commit c9ed069

Please sign in to comment.