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

Fix issues while mocking graphs in tests #134

Merged
merged 4 commits into from
Mar 19, 2024
Merged

Fix issues while mocking graphs in tests #134

merged 4 commits into from
Mar 19, 2024

Conversation

guyca
Copy link
Collaborator

@guyca guyca commented Mar 18, 2024

This PR fixes two issues that happened only while mocking graphs:

  1. Requiring a singleton graph before it was mocked resulted in Obsidian always using the original graph instead of the mock
  2. Obsidian's graph registry, which is intended to be a singleton, was instantiated multiple times. Apparently this was caused by issues with Jest/Node compatibility

Guy Carmeli added 4 commits March 18, 2024 16:58
This PR fixes two issues that happened only while mocking graphs:

1. Requiring a singleton graph before it was mocked resulted in Obsidian always using the original graph instead of the mock
2. Obsidian's graph registry, which is intended to be a singleton, was instantiated multiple times. Apparently this was caused by issues with Jest/Node compatibility
@guyca guyca merged commit e9be75f into master Mar 19, 2024
2 checks passed
@guyca guyca deleted the globalGraphRegistry branch March 19, 2024 19:49
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.

1 participant