Skip to content

Use Sinon for faking date in tests#491

Merged
ziluvatar merged 2 commits intoauth0:masterfrom
MitMaro:use-lolex
Jun 16, 2018
Merged

Use Sinon for faking date in tests#491
ziluvatar merged 2 commits intoauth0:masterfrom
MitMaro:use-lolex

Conversation

@MitMaro
Copy link
Copy Markdown
Contributor

@MitMaro MitMaro commented Jun 14, 2018

Sinon.JS provides handling of fake dates. This change replaces the fakeDate utility with the equivalent Sinon.JS ability.

@MitMaro
Copy link
Copy Markdown
Contributor Author

MitMaro commented Jun 14, 2018

I just noticed, and not sure how I missed it the first time, that this project already has sinon as a dependency and already uses the lolex support it provides.

Sinon.JS provides a project called lolex to handle faking dates. This
change replaces the fakeDate utility with the equivalent Sinon.JS code.
@MitMaro
Copy link
Copy Markdown
Contributor Author

MitMaro commented Jun 14, 2018

Updated the PR to use Sinon directly.

@MitMaro MitMaro changed the title Use lolex for faking date in tests Use Sinon for faking date in tests Jun 14, 2018
@ziluvatar ziluvatar merged commit 677ead6 into auth0:master Jun 16, 2018
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