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

Refactor tests related to notBefore and nbf (#492) #496

Closed
wants to merge 1 commit into from

Conversation

MitMaro
Copy link
Contributor

@MitMaro MitMaro commented Jun 22, 2018

First PR for #492.

This change extracts all tests in the current files related to notBefore and nbf into a single test file. It also adds several missing related tests.

I believe I removed all references to nbf and notBefore from the current tests.

There are two TODOs in the tests, because I found a few unhandled cases that I expected would cause an error but did not. They are:

  • Passing an empty string to notBefore. I'm not sure if this should default to 0 or should throw an error. Currently it throws a val is not a non-empty string or a valid number. val="" from ms.
  • Passing -Infinity, Infinity and NaN to nbf. These all JSON.stringify to null, so I would assume should be considered invalid.

Any suggestions of missing tests are more than welcome, and I will gladly add!

This change extracts all tests in the current files related to notBefore
and nbf into a single test file. It also adds several missing related
tests.
@MitMaro MitMaro force-pushed the sign-validation-test-refactor branch from 233449a to 9179675 Compare June 22, 2018 14:08
@MitMaro
Copy link
Contributor Author

MitMaro commented Jun 24, 2018

Noticed I forgot to rename the branch, I will recreate the PR.

@MitMaro MitMaro closed this Jun 24, 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.

1 participant