Skip to content

Commit

Permalink
Update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
Updates of coverage file
  • Loading branch information
DerekJxy committed Nov 11, 2021
1 parent 025d9a8 commit 9a491ba
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
39 changes: 38 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,41 @@ Options:
# .Vscode

+ `extensions.json` Specify the static extensions. For helping the cooperator to install servals recommended extensions.
+ `settings.json` Specify settings for the editor. Ensure that whenever the cooperator saves a file, the program would format the code using the __prettier__ extension.
+ `settings.json` Specify settings for the editor. Ensure that whenever the cooperator saves a file, the program would format the code using the __prettier__ extension.

# Testing

+ `npm run test` is the command to run all testing files of the program(currently only have 1 test file).
+ `npm run test .\htmlGenerator.test.js` is the command to run the specific testing functions in the __htmlGenerator.test.js__.

# Watch

+ `npm run test:watch` is the command to run the __test runner watch__. It will show a list of options for testing:
```
No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.
```
And you can type in __'a'__ or __'f'__ or __'p'__ or __'t'__ or __'q'__ to selection an option. Also, you can press __<Enter>__ to trigger a test run.

# Coverage

+ `npm run coverage` is the command to run the __Code Coverage Analysis__, it will run the tests generate a coverage report to the user.
It will have a table similar to this:
```
------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
htmlGenerator.js | 100 | 100 | 100 | 100 |
------------------|---------|----------|---------|---------|-------------------
```

4 changes: 2 additions & 2 deletions coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1636595025511" clover="3.2.0">
<project timestamp="1636595025511" name="All files">
<coverage generated="1636596016219" clover="3.2.0">
<project timestamp="1636596016219" name="All files">
<metrics statements="20" coveredstatements="20" conditionals="26" coveredconditionals="26" methods="1" coveredmethods="1" elements="47" coveredelements="47" complexity="0" loc="20" ncloc="20" packages="1" files="1" classes="1"/>
<file name="htmlGenerator.js" path="E:\11\My-First-SSG\htmlGenerator.js">
<metrics statements="20" coveredstatements="20" conditionals="26" coveredconditionals="26" methods="1" coveredmethods="1"/>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/htmlGenerator.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h1><a href="index.html">All files</a> htmlGenerator.js</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Nov 10 2021 20:43:45 GMT-0500 (Eastern Standard Time)
at Wed Nov 10 2021 21:00:16 GMT-0500 (Eastern Standard Time)
</div>
</div>
<script src="prettify.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h1>All files</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Nov 10 2021 20:43:45 GMT-0500 (Eastern Standard Time)
at Wed Nov 10 2021 21:00:16 GMT-0500 (Eastern Standard Time)
</div>
</div>
<script src="prettify.js"></script>
Expand Down

0 comments on commit 9a491ba

Please sign in to comment.