Skip to content

Commit

Permalink
improve test coverage part 2/2 (#22)
Browse files Browse the repository at this point in the history
* fix styling + homemade jsonToXML

* add threshold for code coverage

* add tests for getChartBar method

* add tests for getChartLabels method

* add tests for getChartLegend method

* add tests for getChart and getScale method
  • Loading branch information
Freezystem committed Dec 7, 2023
1 parent c061ec2 commit 3bf64e9
Show file tree
Hide file tree
Showing 8 changed files with 4,505 additions and 198 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
First you'll have to install `mjml-bar-chart` in your project.

```sh
npm i -S @freezystem/mjml-bar-chart
npm install --save-dev mjml @freezystem/mjml-bar-chart
```

Then add the package to your `.mjmlconfig` file:

```json
{
"packages": ["mjml-bar-chart/build/index.js"]
"packages": ["@freezystem/mjml-bar-chart/build/index.js"]
}
```

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"types": "./build/types/index.d.ts",
"require": "./build/index.js",
"import": "./build/esm/index.js",
"default": "./build/index.js"
"default": "./src/index.ts"
}
},
"files": [
Expand Down Expand Up @@ -55,7 +55,7 @@
"@types/mjml": "^4.7.4",
"@types/mjml-core": "^4.7.4",
"@types/mjml-validator": "^4.13.4",
"@types/node": "^20.10.3",
"@types/node": "^20.10.4",
"jest": "^29.7.0",
"npm-check": "^6.0.1",
"prettier": "^3.1.0",
Expand All @@ -75,6 +75,14 @@
"text-summary",
"json-summary"
],
"coverageThreshold": {
"global": {
"branches": 90,
"functions": 95,
"lines": 95,
"statements": 95
}
},
"preset": "ts-jest",
"testEnvironment": "node",
"reporters": [
Expand Down

0 comments on commit 3bf64e9

Please sign in to comment.