Skip to content

Commit

Permalink
Migrate from mocha + nyc to jest (#248)
Browse files Browse the repository at this point in the history
* Removed Mocha and nyc dependencies alongside with related config files. Introduced jest and adapted tests. Updated typescript to latest (with some other development dependencies).

* Reduce line coverage threshold by 1% due to coverage tool differences

* Add "text" coverage reporter
  • Loading branch information
blitz-1306 authored Jan 18, 2024
1 parent 36ee1b0 commit b7c0527
Show file tree
Hide file tree
Showing 89 changed files with 3,569 additions and 2,002 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ jobs:
find $SOL_AST_COMPILER_CACHE -name '*v0.5.17*' -delete
- name: Test and generate coverage report
run: |
npm test
npm run coverage
run: npm test

- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v3
Expand Down
6 changes: 0 additions & 6 deletions .mocharc.json

This file was deleted.

20 changes: 0 additions & 20 deletions .nycrc.json

This file was deleted.

30 changes: 30 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"roots": [""],
"testMatch": ["**/test/**/*.spec.ts"],
"moduleDirectories": ["node_modules"],
"transform": {
"^.+\\.ts$": "ts-jest"
},

"testTimeout": 200000,
"verbose": true,

"coveragePathIgnorePatterns": [
"/node_modules/",
"/test/",
"/coverage/",
"/docs/",
"/.compiler_cache/",
"file_level_definitions_parser*.ts",
"comments_parser*.ts"
],
"coverageReporters": ["text", "text-summary", "lcov"],
"coverageThreshold": {
"global": {
"statements": 90,
"branches": 85,
"functions": 90,
"lines": 94
}
}
}
Loading

0 comments on commit b7c0527

Please sign in to comment.