Skip to content

Commit

Permalink
fix(tests): Use native node test runner, added code coverage support,…
Browse files Browse the repository at this point in the history
… removed grunt (#1604)

* removed grunt, sinon, mocha, chai, converted tests to use native node test runner, added c8 for coverage

* Use shell expansion for glob patterns

* removed node 14.x & 16.x from test matrix

* set coverage requirement to 85%

---------

Co-authored-by: Steven Hargrove <steven.hargrove@telrite.com>
  • Loading branch information
hulkish and Steven Hargrove committed Jan 1, 2024
1 parent 4233f6f commit be45c1b
Show file tree
Hide file tree
Showing 34 changed files with 2,415 additions and 3,836 deletions.
9 changes: 9 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"clean": true,
"check-coverage": true,
"all": true,
"temp-directory": "./coverage/.tmp",
"reporter": ["text-summary", "html"],
"include": ["lib/**/*.js", "lib/*.js"],
"lines": 85
}
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
test:
strategy:
matrix:
node: [14.x, 16.x, 18.x, 20.x]
node: [18.x, 20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -18,4 +18,5 @@ jobs:
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm test
- run: npm run lint
- run: npm run test:coverage
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
coverage/
npm-debug.log
.DS_Store
test/dkim/cache/message.*
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ examples
.eslintrc
.gitignore
.travis.yml
Gruntfile.js
.c8rc.json
.github/
coverage/
26 changes: 0 additions & 26 deletions Gruntfile.js

This file was deleted.

0 comments on commit be45c1b

Please sign in to comment.