Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Harness Refactor #514

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mcknasty
Copy link
Contributor

@mcknasty mcknasty commented Jan 16, 2024

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 f115bff
Author: The Nasty tmckeown@gmail.com
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. Make sure you have installed the latest version of Node.js
  2. Fork this project on GitHub and clone your fork locally
  3. Create local branches to work within. These should also be created directly from the main branch. Local Fork here.
  4. Make your changes.
  5. 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. Now update the snapshot.
    1. A complete log of snapshot test results.
    2. 99 passing in 50 seconds
  7. If all is passing, commit your changes. The log of the commit can be found here.
  8. 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. 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. Push
  11. 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 ✔️ 99 passing 0 failures 51 seconds
Snapshot Test ✔️ 99 passing 0 failures 50 seconds
Final Test ✔️ 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 ✔️ 99 passing 0 failures 1 minutes
16.20.2 ✔️ 99 passing 0 failures 1 minutes
18.19.0 ✔️ 99 passing 0 failures 1 minutes
20.11.0 ✔️ 99 passing 0 failures 1 minutes

@mcknasty mcknasty force-pushed the test-harness-config branch 2 times, most recently from 78dce76 to a1addc1 Compare January 16, 2024 04:42
@mcknasty mcknasty changed the title chore: adding mocha configuration file Test Harness Refactor Jan 16, 2024
@mcknasty mcknasty marked this pull request as ready for review January 16, 2024 18:30
mcknasty added a commit to mcknasty/c8 that referenced this pull request Jan 20, 2024
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
mcknasty added a commit to mcknasty/c8 that referenced this pull request Jan 20, 2024
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant