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 functionality and test the happy path #3

Merged
merged 4 commits into from
Apr 24, 2024
Merged

Conversation

lmuntaner
Copy link
Collaborator

Motivation

Create a first real test working before moving to more complex tests and before refactoring the code to make it look nice.

I realized there were also issues with the spec files that didn't have prettier or lint working.

Changes

  • Add extra tsconfig.spec that includes test files.
  • Allow lint config to check test files.
  • Run tsc before running tests.
  • Add the jest types.
  • Add the code for requestVerifiablePresentation. DO NOT REVIEW THIS YET. This is working functionality but it will be refactored a lot.
  • Add a tsconfig.json within the test folder.

Tests

  • Add a test for the success functionality of requestVerifiablePresentation.

@lmuntaner lmuntaner changed the title Lm add code and test Add functionality and test the happy path Apr 24, 2024
@lmuntaner lmuntaner marked this pull request as ready for review April 24, 2024 08:52
@lmuntaner
Copy link
Collaborator Author

@peterpeterparker can you take a look?

I still had to change the configs a bit to have them working in my first test.

Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

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

LGTM, thx

js-library/tsconfig.spec.json Show resolved Hide resolved
@lmuntaner lmuntaner marked this pull request as draft April 24, 2024 09:51
@lmuntaner
Copy link
Collaborator Author

@peterpeterparker thanks for the review. I realized that the test is not testing the flow properly. I need to change the test.

@peterpeterparker
Copy link
Member

@lmuntaner no worries, I did not reviewed the test itself anyway, only the configuration 😉

@lmuntaner
Copy link
Collaborator Author

@lmuntaner no worries, I did not reviewed the test itself anyway, only the configuration 😉

Thanks, I forgot to return the promise. That's why it was passing even though. it shouldn't. The only problem was in the mocked data sent in the post message. Nothing major.

@lmuntaner lmuntaner marked this pull request as ready for review April 24, 2024 10:00
@lmuntaner lmuntaner merged commit 3dc38be into main Apr 24, 2024
6 checks passed
@lmuntaner lmuntaner deleted the lm-add-code-and-test branch April 24, 2024 10:01
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.

2 participants