Skip to content

Commit 3bf64e9

Browse files
authored
improve test coverage part 2/2 (#22)
* 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
1 parent c061ec2 commit 3bf64e9

File tree

8 files changed

+4505
-198
lines changed

8 files changed

+4505
-198
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
First you'll have to install `mjml-bar-chart` in your project.
88

99
```sh
10-
npm i -S @freezystem/mjml-bar-chart
10+
npm install --save-dev mjml @freezystem/mjml-bar-chart
1111
```
1212

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

1515
```json
1616
{
17-
"packages": ["mjml-bar-chart/build/index.js"]
17+
"packages": ["@freezystem/mjml-bar-chart/build/index.js"]
1818
}
1919
```
2020

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"types": "./build/types/index.d.ts",
2424
"require": "./build/index.js",
2525
"import": "./build/esm/index.js",
26-
"default": "./build/index.js"
26+
"default": "./src/index.ts"
2727
}
2828
},
2929
"files": [
@@ -55,7 +55,7 @@
5555
"@types/mjml": "^4.7.4",
5656
"@types/mjml-core": "^4.7.4",
5757
"@types/mjml-validator": "^4.13.4",
58-
"@types/node": "^20.10.3",
58+
"@types/node": "^20.10.4",
5959
"jest": "^29.7.0",
6060
"npm-check": "^6.0.1",
6161
"prettier": "^3.1.0",
@@ -75,6 +75,14 @@
7575
"text-summary",
7676
"json-summary"
7777
],
78+
"coverageThreshold": {
79+
"global": {
80+
"branches": 90,
81+
"functions": 95,
82+
"lines": 95,
83+
"statements": 95
84+
}
85+
},
7886
"preset": "ts-jest",
7987
"testEnvironment": "node",
8088
"reporters": [

0 commit comments

Comments
 (0)