Skip to content

Add a Unit Testing Skeleton #5

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

Merged
merged 6 commits into from
Jun 3, 2024
Merged

Add a Unit Testing Skeleton #5

merged 6 commits into from
Jun 3, 2024

Conversation

AJGranowski
Copy link
Contributor

@AJGranowski AJGranowski commented Jun 1, 2024

What are these changes?

Adds Jest and some basic unit tests to this project.

Why are these changes being made?

"To me, legacy code is simply code without tests." -Michael Feathers

Introducing a testing framework is an easy quality improvement add for any software project. This change does just that by adding the test script with Jest, as well as some simple tests for the primary components of this project.

Checklist

  • pnpm run ci succeeds.
  • pnpm run test succeeds.

Additional notes:

  • estree-walker and is-reference do not have a CJS distribution, causing Jest to error. Following the ECMAScript Modules guide and setting --experimental-vm-modules and extensionsToTreatAsEsm resolved this.
  • @gera2ld/plaid-test and cross-env have prior use in vm-shortcut and violentmonkey.

@AJGranowski AJGranowski mentioned this pull request Jun 2, 2024
50 tasks
@gera2ld
Copy link
Member

gera2ld commented Jun 3, 2024

Looks great to me. Thank you!

@gera2ld gera2ld merged commit 46232af into violentmonkey:main Jun 3, 2024
@AJGranowski AJGranowski deleted the tests branch June 3, 2024 04:58
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