Skip to content

feat: port over /auth #472

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

Merged
merged 6 commits into from
Jul 21, 2024

Conversation

yunchipang
Copy link
Contributor

@yunchipang yunchipang commented Jul 11, 2024

Description

Issue(s) addressed

What kind of change(s) does this PR introduce?

  • Enhancement
  • Bug fix
  • Refactor

Please check if the PR fulfils these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Issue

What is the current behavior?

What is the new behavior?

Breaking change

Does this PR introduce a breaking change?

Other useful information

@yunchipang yunchipang marked this pull request as ready for review July 12, 2024 17:04
@dadiorchen
Copy link
Collaborator

@yunchipang did you finish all test and past them?

@yunchipang
Copy link
Contributor Author

yunchipang commented Jul 18, 2024

@yunchipang did you finish all test and past them?

I don't currently see a tests folder on the typescript branch and I'm not sure what the preferred approach is (I was messaging @Kpoke ). Should I create a __tests__ directory at the root and add a test file for the auth module there?

If you don't mind, could I slack you for more detailed questions? tysm!

@yunchipang
Copy link
Contributor Author

@dadiorchen @Kpoke tests for root and auth.service were finished and passed. i ported over the logic from __tests__/auth.spec.js and the test data from __tests__/seed.js.
Screenshot 2024-07-18 at 5 52 05 PM
should I write the tests for getting and posting wallets too? or should that be addressed in another issue/PR? tysm🙏🏻

it('should login with valid credentials', async () => {
const staticApiKey = 'FORTESTFORTESTFORTESTFORTESTFORTEST';

const response = await request(app.getHttpServer())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more of an integration test than it is a unit test.

Let's have a tests folder in the root folder which will house the integration tests like this https://github.com/Greenstand/treetracker-wallet-api/tree/master/__tests__

and the unit tests can be in the auth folder, like this https://github.com/Greenstand/treetracker-wallet-api/blob/master/server/services/AuthService.spec.js

@@ -0,0 +1,22 @@
export enum AUTH_EVENTS {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can be in the event module

@Kpoke Kpoke merged commit c86aef2 into Greenstand:typescript-branch Jul 21, 2024
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.

3 participants