question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Test Cleanup

See original GitHub issue

The test/ directory is rather difficult to follow at the moment. When adding new tests it is not always clear where the test should be added. I had some difficulties when working on #437.

I’m willing to progressively fix up the test/ directory in a series of PRs, but since it would be a fair bit of effort, I do not want to start the process if there is not much of a chance that the PRs would be merged.

This would go nicely with the coverage report that will be added with #468.

Tests

  • algorithm ECDSA
  • algorithm HMAC
  • algorithm invalid
  • algorithm none
  • algorithm RSA
  • claim audience/aud
  • claim expiresIn/exp (ignoreExpiration, clockTolerance, clockTimestamp)
  • claim iat/maxAge (clockTolerance, clockTimestamp)
  • claim invalid
  • claim issuer/iss
  • claim jwtid/jti
  • claim notBefore/nbf (ignoreNotBefore, clockTolerance, clockTimestamp)
  • claim private
  • claim subject/sub
  • header keyId/kid
  • option clockTimestamp
  • option clockTolerance
  • option encoding
  • option header
  • option ignoreExpiration
  • option ignoreNotBefore
  • option mutatePayload
  • option noTimestamp

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ziluvatarcommented, Jun 20, 2018

It sounds really good!

1reaction
ziluvatarcommented, Jul 20, 2018

Certain options operate on several claims (ex. clockTimestamp). In those cases I have been placing a test for that option with the claim test (ex. ‘should verify “nbf” using “clockTimestamp”’) in nbf.test.js.

I like this pattern ^ If an option will modify how a claim is handled I think that is under the responsibility of that feature / claim support. One thing you can do is to prepare a group of utility functions for testing regarding that option that can be reused in every claim.

Even if I like more that option, it is not like I hate the other one it is a matter of decide what we think it is the best.

Read more comments on GitHub >

github_iconTop Results From Across the Web

proposal: testing: t.Cleanup should run on panic · Issue #41355
There was a discussion about gomock hang on panic because it's ctrl.Finish() was called inside t.Cleanup instead of defer (golang/mock#428).
Read more >
Proposal for Test Database Cleanup - RIPE
As described in the 'Proposal for Periodic Clean-up for the TEST RIPE Database', the test database has been reset to a default set...
Read more >
Request For Proposal To Cleanup and Upgrade Bibliographic ...
The library or district seeks a vendor to provide Database Cleanup and Upgrade of ... processing costs, file transfer costs, testing, shipping &...
Read more >
T266752 Outreachy Project Proposal: Selenium Framework Cleanup
Remove inconsistency and redundancy in selenium test files across different repositories. Ensure that the documentation of the testing is updated and in-sync ...
Read more >
Draft Proposal for a Transformed Cleanup Program - CT.gov
Transformation of Connecticut's Cleanup Programs i. Table of Contents. I. Executive Summary . ... additional testing of environmental media.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found