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

test(scope): turn examples into test cases #31

Merged
merged 4 commits into from
May 7, 2024
Merged

test(scope): turn examples into test cases #31

merged 4 commits into from
May 7, 2024

Conversation

yf-yang
Copy link
Collaborator

@yf-yang yf-yang commented May 7, 2024

No description provided.

Copy link

codesandbox-ci bot commented May 7, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@yf-yang
Copy link
Collaborator Author

yf-yang commented May 7, 2024

@dai-shi I found some test cases (even when I run them locally) are broken and suspect I can't directly import those examples because jotai-scope package resolution is incorrect? Do you have any suggestion?

@yf-yang
Copy link
Collaborator Author

yf-yang commented May 7, 2024

Specifically, I'd like to know why examples can resolve to correct ScopeProvider in the repository, but the test cases can't.

@yf-yang
Copy link
Collaborator Author

yf-yang commented May 7, 2024

Resolve by copy codes from examples.

I'm wondering if there is any way to share codes between examples and tests.

@yf-yang yf-yang requested a review from dai-shi May 7, 2024 08:53
@yf-yang yf-yang marked this pull request as ready for review May 7, 2024 08:53
@dai-shi
Copy link
Member

dai-shi commented May 7, 2024

btw, I'm migrating to new setup: zustandjs/zustand-valtio#2
I'll work on some repos in jotaijs, but for jotai-scope it's up to you, you can follow my setup, or do with your own setup.

I'm wondering if there is any way to share codes between examples and tests.

It's also up to you, but my goal was to make examples standalone apps.
For example, this works: https://githubbox.com/jotaijs/jotai-scope/tree/main/examples/02_scope

@yf-yang yf-yang merged commit 19592aa into main May 7, 2024
3 checks passed
@dmaskasky dmaskasky deleted the add-tests branch August 19, 2024 22:24
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