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

Add unit tests to cover lucia (authentication - login/registration/tokens/access controls/etc) #235

Open
lane711 opened this issue Feb 9, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lane711
Copy link
Owner

lane711 commented Feb 9, 2024

Thanks to @acoreyj , we now have a full implementation of Lucia js (https://lucia.js.org/)

We need to add unit/integration tests to cover this new functionality.

I did start on a simple auth test here:
src/cms/admin/auth.test.ts

This should cover:

  1. Initial admin user registration
  2. login/logout
  3. authentication tokens
  4. access controls
  5. etc

See here for more info:
https://sonicjs.com/authentication

There are also some tests that broke as a result of these changes that need to be fixed.

@lane711 lane711 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 9, 2024
@totto2727
Copy link
Contributor

totto2727 commented Feb 18, 2024

Currently, most tests fail and cause a lot of type problems.
Could this be the cause of the broken tests?
If this is the cause of my environment, I would be glad to know what settings I need to set up to get the tests to pass.

I am still trying to figure out this project.
So, I was planning to make tentative (comment out or any type) responses to the problem areas and submit a PR with the tests and type checks passing.

I also found in our research that there is a problem with the D1-related tests.
Is it possible to implement the tests in the current project structure?
If possible, we would like to address this issue gradually.

totto2727#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants