wallix/webauthn

Tests

eheikes opened this issue · 4 comments

Is there a desire to add tests for this project? (I'm specifically thinking about the server package.) If so, what is your preferred testing framework?

Sure! Jest and/or Cypress are the new standards, we'd love a PR with tests :)

pke commented

Jest pollutes the global namespace and needs a test runner. I always preferred node-tap or recently zora for the reasons mentioned.

pke commented

Any ideas how this could be tested, especially the client side of things? Is there a way to mock the webauthn API?

The FIDO alliance has testing tools which include a suite for testing FIDO2 (WebAuthn + CTAP), which I learned about in the FAQ for a list of WebAuthn tools/resources. I don't have much experience with them yet, but I'm attempting to learn...

However, those will be along the lines of integration tests, whereas some unit tests (using one of the tools mentioned) could also have definite value.