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

feat: add public destroy command for resetting mynah ui state #204

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

jpinkney-aws
Copy link
Contributor

Problem

When running e2e tests in vscode against mynah ui you have two options:

  1. Create one mynah ui instance for all the subsequent tests, but this doesn't allow you to test specific functionality (e.g. the welcome page in VSCode shows up 3 times)
  2. Create one mynah ui instance per test, but since mynah ui uses singletons and the module has been initialized already, its not actually providing a fresh state causing multiple extra events to be sent that shouldn't be

Solution

Add a destroy method for resetting all the singletons back to their initial state. This allows you to create a fresh mynah ui instance in every test

Tests

  • I have tested this change on VSCode
  • I have tested this change on JetBrains

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jpinkney-aws jpinkney-aws requested a review from a team as a code owner December 13, 2024 13:33
Jurredr
Jurredr previously approved these changes Dec 16, 2024
Copy link
Contributor

@Jurredr Jurredr left a comment

Choose a reason for hiding this comment

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

Some small nits in documentation, otherwise approved. Nice addition.

docs/USAGE.md Outdated Show resolved Hide resolved
docs/USAGE.md Outdated Show resolved Hide resolved
@Jurredr Jurredr merged commit 6e964c4 into aws:main Dec 16, 2024
1 of 2 checks passed
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