Skip to content

Commit

Permalink
ci: switch from mocha to jest
Browse files Browse the repository at this point in the history
Couldn't make mocha tests run to I switched to jest 🤷
  • Loading branch information
josa42 committed Mar 27, 2022
1 parent 8ef7543 commit 07aa840
Show file tree
Hide file tree
Showing 5 changed files with 2,097 additions and 320 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
test
/README.tmp.md
/.tmp
.DS_Store
1 change: 1 addition & 0 deletions __mocks__/coc.nvim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
verbose: true,
testRegex: 'src/.*\\.test\\.ts$'
};
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"neovim"
],
"scripts": {
"test": "true || mocha --require ts-node/register '**/*.test.ts'",
"test": "jest",
"test:watch": "mocha --watch --watch-files '**/*.ts' --require ts-node/register '**/*.test.ts'",
"clean": "rimraf lib",
"build": "tsc -p tsconfig.json",
Expand Down Expand Up @@ -765,21 +765,21 @@
]
},
"devDependencies": {
"@types/mocha": "^9.0.0",
"@types/jest": "^27.4.1",
"@types/node": "^16.11.6",
"@types/node-fetch": "^2.5.12",
"@types/tmp": "^0.2.2",
"@types/which": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"coc-dev-tools": "^0.1.0",
"coc.nvim": "0.0.80",
"coc.nvim": "^0.0.80",
"eslint": "^8.1.0",
"eslint-config-josa-typescript": "^0.1.2",
"mocha": "^9.1.3",
"jest": "^27.5.1",
"rimraf": "^3.0.2",
"tmp": "^0.2.1",
"ts-node": "^10.4.0",
"ts-jest": "^27.1.4",
"typescript": "~4.4.4"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 07aa840

Please sign in to comment.