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: Add unit tests for toolbox regex patterns #14

Merged
merged 8 commits into from
Jan 20, 2023
Merged

Conversation

darcywong00
Copy link
Contributor

@darcywong00 darcywong00 commented Jan 20, 2023

Resumes work from #13 which I unexpectedly closed when I deleted the base branch.

For investigating issue #11, it will be good to have some unit tests to verify the toolbox.ts regex patterns

  • renamed and exported regex patterns: VS_PATTERN and VS_BRIDGE_PATTERN
  • Changed VS_BRIDGE_PATTERN to have optional punctuation
  • refactored getVerseBridge() to determine the bridge start and end with the regex
  • Updated version of Ava unit test runner

To run unit tests

npm run test

VS_PATTERN updated to match \vs 13-14 (b)
VS_BRIDGE_PATTERN updated to match 13a-14b

For my testing, I locally set debugFlag to true so I could compare the intermediate .json files just to make sure the regex didn't change existing parsing.

@darcywong00 darcywong00 changed the title Test/vs regex test: Add unit tests for toolbox regex patterns Jan 20, 2023
@darcywong00 darcywong00 marked this pull request as ready for review January 20, 2023 03:08
@darcywong00 darcywong00 requested a review from laineyhm January 20, 2023 03:08
@darcywong00 darcywong00 merged commit 8df7108 into master Jan 20, 2023
@darcywong00 darcywong00 deleted the test/vs-regex branch May 23, 2023 23:24
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