c8
c8 copied to clipboard
Test Harness Refactor
Pull Request 514
Overview
This pull request adds a configuration file for the test harness package Mocha. Furthermore, it addresses some silent errors in how the assertion library chai requires the should function. Additionally, this project has added a dev dependency of this project, C8. All files containing the unit test have been appended with the spec.js extension. This change allows Mocha to avoid scanning unnecessary files. Finally, this Pull Request reduces the dependency on the cross-env package by changing the scripts section of the package.json file.
Commit Message
commit f115bff1355a70f6a1e4b998d25903cfc13ee521 Author: The Nasty [email protected] Date: Sat Jan 20 15:15:46 2024 -0500
Test Harness Refactor (#514)
chore: adding mocha configuration file
chore: adding missing require statement in test file
chore: renaming test files to include the .spec ext
chore: adding c8 to dev dependencies
chore: refactoring scripts section in package.json
Following the Contributions Recommendations here.
- [x] Make sure you have installed the latest version of Node.js
- [x] Fork this project on GitHub and clone your fork locally
- [x] Create local branches to work within. These should also be created directly from the main branch. Local Fork here.
- [x] Make your changes.
- [x] Run tests to make sure all is okay (everything should pass except the snapshot).
- A complete log of initial test results.
- As instructed, ignore snapshot failures. 0 failures
- 99 passing in 51 seconds
- [x] Now update the snapshot.
- A complete log of snapshot test results.
- 99 passing in 50 seconds
- [x] If all is passing, commit your changes. The log of the commit can be found here.
- [x] As a best practice, once you have committed your changes, it is a good idea to use git rebase (not git merge) to synchronize your work with the main repository.
- [x] Run tests again to make sure all is okay.
- A complete log of the final test results.
- 99 passing in 54 seconds
- [x] Push
- [x] Open the pull request, see details in the template.
- [ ] Make any necessary changes after review.
Unit Tests Results
| Test Type | PASS | Tests Passed | Tests Failed | Time |
|---|---|---|---|---|
| Initial Test | :heavy_check_mark: | 99 passing | 0 failures | 51 seconds |
| Snapshot Test | :heavy_check_mark: | 99 passing | 0 failures | 50 seconds |
| Final Test | :heavy_check_mark: | 99 passing | 0 failures | 54 seconds |
- Tests complete with Node version v18.19.0
Node Version Testing Matrix
| Node Version | PASS | Tests Passed | Tests Failed | Time |
|---|---|---|---|---|
| 14.21.3 | :heavy_check_mark: | 99 passing | 0 failures | 1 minutes |
| 16.20.2 | :heavy_check_mark: | 99 passing | 0 failures | 1 minutes |
| 18.19.0 | :heavy_check_mark: | 99 passing | 0 failures | 1 minutes |
| 20.11.0 | :heavy_check_mark: | 99 passing | 0 failures | 1 minutes |