Skip to content

Commit 27ffe11

Browse files
authored
Merge pull request #42 from sevensc/jest
Jest
2 parents 21a5745 + 4ad6999 commit 27ffe11

File tree

7 files changed

+1930
-399
lines changed

7 files changed

+1930
-399
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- checkout-and-restore-cache
4545
- run: yarn install
4646
- run: yarn build
47-
- run: yarn test
47+
- run: yarn test --coverage
4848

4949
workflows:
5050
build-and-deploy:

.sonarcloud.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
1+
sonar.projectKey=typescript-string-operations
2+
sonar.test=tests
3+
sonar.test.inclusions=**/*.test.ts
4+
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
5+
sonar.exclusions=node_modules
6+
sonar.qualitygate.wait=true

jest.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
module.exports = {
3+
testEnvironment: 'node',
4+
roots: ['<rootDir>/tests'],
5+
testMatch: ['**/*.test.ts'],
6+
preset: 'ts-jest',
7+
};

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"index.d.ts"
1010
],
1111
"scripts": {
12-
"test": "mocha -r ts-node/register tests/**/tests.ts",
12+
"test": "jest",
1313
"build": "tsc; uglifyjs ./dist/index.js --compress -o ./dist/index.js",
1414
"lint": "eslint ."
1515
},
@@ -22,21 +22,20 @@
2222
"string builder",
2323
"angular"
2424
],
25-
"author": "Sven Ulrich <mail@sven-ulrich.net> (sven-ulrich.net)",
25+
"author": "sevensc",
2626
"license": "MIT",
2727
"bugs": {
2828
"url": "https://github.com/sevensc/typescript-string-operations/issues"
2929
},
3030
"homepage": "https://github.com/sevensc/typescript-string-operations#readme",
3131
"devDependencies": {
32-
"@types/chai": "^4.3.9",
33-
"@types/mocha": "^10.0.3",
32+
"@types/jest": "^29.5.6",
3433
"@types/node": "^20.8.9",
3534
"@typescript-eslint/eslint-plugin": "^6.9.0",
3635
"@typescript-eslint/parser": "^6.9.0",
37-
"chai": "^4.3.10",
3836
"eslint": "^8.52.0",
39-
"mocha": "^10.2.0",
37+
"jest": "^29.7.0",
38+
"ts-jest": "^29.1.1",
4039
"ts-node": "^10.9.1",
4140
"typescript": "^5.2.2",
4241
"uglify-js": "^3.17.4"

0 commit comments

Comments
 (0)