Skip to content

Gatsby unit test#4

Merged
DaveSauce merged 6 commits into
masterfrom
GatsbyUnitTest
Feb 11, 2021
Merged

Gatsby unit test#4
DaveSauce merged 6 commits into
masterfrom
GatsbyUnitTest

Conversation

@oconnelc
Copy link
Copy Markdown

Description

This fix introduces unit testing for Gatsby using Jest. This commit contains a snapshot test for the History component. A snapshot test will create a version of the UI and will store it off into a file that is included in the commit., If anything changes the UI from the snapshot, the test will fail. At this point we have to either

Motivation and Context

Here are some reasons why we should be including unit testing: https://fortegrp.com/the-importance-of-unit-testing/

How has this been tested?

  1. Run: npm test

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@DaveSauce DaveSauce merged commit b898a7e into master Feb 11, 2021
@DaveSauce DaveSauce deleted the GatsbyUnitTest branch February 11, 2021 01:04
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.

2 participants