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

Add toBeDateString matcher #252

Merged
merged 5 commits into from
Oct 6, 2021
Merged

Add toBeDateString matcher #252

merged 5 commits into from
Oct 6, 2021

Conversation

idan-at
Copy link
Contributor

@idan-at idan-at commented Nov 27, 2019

Added a new matcher to check whether a string is in a date format.

A use-case example: when serializing a JS object with date values, those become strings, and when comparing against the returned json, it can be useful to use this matcher.

Housekeeping

  • Unit tests
  • Documentation is up to date
  • No additional lint warnings
  • Typescript definitions are added/updated where relevant

@bompus
Copy link

bompus commented Feb 23, 2020

This is likely a dupe of #164 and would be super useful.

@codecov
Copy link

codecov bot commented Oct 6, 2021

Codecov Report

Merging #252 (a35a4a7) into main (5d16552) will increase coverage by 100.00%.
The diff coverage is 100.00%.

❗ Current head a35a4a7 differs from pull request most recent head 34489be. Consider uploading reports for the commit 34489be to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           main      #252        +/-   ##
===========================================
+ Coverage      0   100.00%   +100.00%     
===========================================
  Files         0       111       +111     
  Lines         0       563       +563     
  Branches      0        98        +98     
===========================================
+ Hits          0       563       +563     
Impacted Files Coverage Δ
src/matchers/toBeDateString/index.js 100.00% <100.00%> (ø)
src/matchers/toBeDateString/predicate.js 100.00% <100.00%> (ø)
src/matchers/toContainAnyKeys/index.js 100.00% <0.00%> (ø)
src/matchers/toBeTrue/predicate.js 100.00% <0.00%> (ø)
src/matchers/toBeString/predicate.js 100.00% <0.00%> (ø)
src/matchers/toContainValue/index.js 100.00% <0.00%> (ø)
src/matchers/toBePositive/index.js 100.00% <0.00%> (ø)
src/matchers/toBeBefore/predicate.js 100.00% <0.00%> (ø)
src/matchers/toContainKeys/index.js 100.00% <0.00%> (ø)
src/matchers/toSatisfyAll/predicate.js 100.00% <0.00%> (ø)
... and 101 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d16552...34489be. Read the comment docs.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

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.

3 participants