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

Feature/139 external user #161

Merged
merged 38 commits into from
Mar 15, 2023
Merged

Conversation

theblockstalk
Copy link
Contributor

@theblockstalk theblockstalk commented Mar 7, 2023

Main changes:

@theblockstalk
Copy link
Contributor Author

around commit 041d51f I have updated the Integration tests to also use JSDOM. This was done successfully in commit b87ac65.

However, it is only able to run with tsdx, not with pure jest. I have been trying to get it to run with pure jest, this is so that we can run it with VS Code tools such as debugging and the jest extensions which would be really powerful.

This seems to encounter several issues:

  1. Because we are using a custom test environment to inject JSDOM with, when we use pure jest, we get an error saying that the custom test environment is missing getVmContext() function
    https://stackoverflow.com/questions/70910410/testing-expo-with-enzyme-jest-environment-enzyme-does-not-export-getvmcontext/70943283#70943283
  2. After trying to upgrade JSDOM as suggested in the above article we run into other issues
  3. I have then tried to recreate the tsdx's version of jest.config.js, with automatic https://github.com/Tonomy-Foundation/Tonomy-ID-SDK/pull/161/files#diff-4007f7b8a1c2025a38e8e3b80aa05297f37ae3719c0f37255aa3c81febab50d3 and manual approaches https://github.com/Tonomy-Foundation/Tonomy-ID-SDK/pull/161/files#diff-0a9d68240f8e10eb15b5db41e8d5321a91ac6e628e6ab8eb1ae552e5cb433eba neither working fully
  4. It seemed with the above approaches, that the transformers are not working with typescript properly
  5. some background here https://bobbyhadz.com/blog/typescript-jest-cannot-use-import-statement-outside-module

Next step ideas, because I'm moving on from trying this:

@theblockstalk
Copy link
Contributor Author

the plan is to merge this with the integration test as is, and then continuing to work on issue #139 in subsequent PRs. This is so others get the benefit of having this integration test

src/externalUser.ts Show resolved Hide resolved
src/services/errors.ts Show resolved Hide resolved
@theblockstalk theblockstalk merged commit 9a51746 into development Mar 15, 2023
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