Skip to content

Conversation

@paulshryock
Copy link
Owner

@paulshryock paulshryock commented Jul 25, 2021

Summary

Added Ava unit tests, and cleaned up some code along the way. As a result, the main classes are written better so that updating state and creating side-effects are in separate methods. Added linting as well.

Added Ava tests for the following classes:

  • Bump
  • Git
  • Changelog
  • WordPress
  • utils/file
  • utils/type

Changelog

Added

Changed

  • Update file util methods.

Testing

  • Run npm test and see that all tests pass

Test coverage

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 79.62 63.64 75 79.62
src 77.48 59.46 70.59 77.48
Bump.js 78.03 63.64 40 78.03 49-59,74-75,103-105,114-124,130-131
Changelog.js 84.71 60.71 80 84.71 ...,88-98,114-115,121-122,148-150,166-168
Git.js 85.96 76.92 100 85.96 23-25,35-36,53-55
WordPress.js 66.03 45.45 75 66.03 ...06-109,112-120,131-134,137-143,152-154
src/utils 96.88 85.71 100 96.88
file.js 96.23 83.33 100 96.23 49-50
type.js 100 100 100 100

Ticket

Checklist

  • I have tested the code in this pull request.
  • I have updated the Changelog.
  • I have documented any new features or changes in the Readme.

@paulshryock paulshryock added the enhancement New feature or request label Jul 25, 2021
@paulshryock paulshryock self-assigned this Jul 25, 2021
@paulshryock paulshryock force-pushed the 22/add-tests branch 11 times, most recently from a8ed4ea to fb8934a Compare July 28, 2021 20:17
@paulshryock paulshryock changed the title [#22]: Add unit tests [#22/#26]: Add unit tests and linting Jul 28, 2021
@paulshryock paulshryock force-pushed the 22/add-tests branch 9 times, most recently from cc9629a to 87b1675 Compare July 28, 2021 21:47
@paulshryock paulshryock changed the title [#22/#26]: Add unit tests and linting [#22/#26]: Add unit tests, linting, and quiet CLI flag Jul 28, 2021
@paulshryock paulshryock changed the title [#22/#26]: Add unit tests, linting, and quiet CLI flag [#22/#26/#4]: Add unit tests, linting, and quiet CLI flag Jul 28, 2021
@paulshryock paulshryock merged commit 4779546 into main Jul 28, 2021
@paulshryock paulshryock deleted the 22/add-tests branch July 29, 2021 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add linting Add unit tests

2 participants