hsynlms / fastify-guard

A simple user role and scope check plugin to protect endpoints for Fastify
MIT License
49 stars 9 forks source link

Add TS declaration file and testing #2

Closed francisdaigle closed 3 years ago

francisdaigle commented 3 years ago

Hi @hsynlms :)

the test.js file in the root directory already contains more comprehensive tests in vanilla js. I think that it's not necessary to rewrite them in TypeScript.

Possibly not. The TS tests do not replicate the JS tests in their entirety -- just the basics. Very helpful when determining/illustrating what should (and should not) be included in the declaration file. The tests can be removed if you would prefer.