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 matchers for validating dates #8

Closed
mscharhag opened this issue Sep 16, 2014 · 1 comment
Closed

Add matchers for validating dates #8

mscharhag opened this issue Sep 16, 2014 · 1 comment
Milestone

Comments

@mscharhag
Copy link
Owner

Something like:

expect(date).toBeBefore(otherDate);
expect(date).toBeAfter(otherDate);
expect(date).toBeBetween(first, second);
...
@mscharhag mscharhag added this to the 1.1.0 milestone Sep 16, 2014
@mscharhag
Copy link
Owner Author

Added the following methods in 01850df

expect(date).toBeBefore(other);
expect(date).toBeAfter(other);
expect(date).toBeCloseTo(other, 1000); // second parameter is delta in ms
expect(date).toBeBeetween(other);
expect(date).toBeNull();
expect(date).toBeNotNull();
expect(date).toBeEqual();

ideadapt added a commit to ideadapt/oleaster that referenced this issue Dec 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant