c8 icon indicating copy to clipboard operation
c8 copied to clipboard

Test Harness Refactor

Open mcknasty opened this issue 1 year ago • 0 comments

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.

  1. [x] Make sure you have installed the latest version of Node.js
  2. [x] Fork this project on GitHub and clone your fork locally
  3. [x] Create local branches to work within. These should also be created directly from the main branch. Local Fork here.
  4. [x] Make your changes.
  5. [x] Run tests to make sure all is okay (everything should pass except the snapshot).
    1. A complete log of initial test results.
    2. As instructed, ignore snapshot failures. 0 failures
    3. 99 passing in 51 seconds
  6. [x] Now update the snapshot.
    1. A complete log of snapshot test results.
    2. 99 passing in 50 seconds
  7. [x] If all is passing, commit your changes. The log of the commit can be found here.
  8. [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.
  9. [x] Run tests again to make sure all is okay.
    1. A complete log of the final test results.
    2. 99 passing in 54 seconds
  10. [x] Push
  11. [x] Open the pull request, see details in the template.
  12. [ ] 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

mcknasty avatar Jan 16 '24 03:01 mcknasty