-
-
Notifications
You must be signed in to change notification settings - Fork 2
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: add tests #52
Merged
Merged
test: add tests #52
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modified Jest configuration to use automatic runtime transformation for React and JSdom as test environment. Additionally, adjusted moduleNameMapper to correctly map the project structure.
Simplified the implementation of Keyboard navigation hooks by reducing redundancy in callback functions. Also, renamed from .tsx to .ts since it contains no JSX syntax. Additionally, modified import statement to import useAtom directly from 'jotai' instead of 'jotai/index'.
Introduced test files for the 'useSsrColorScheme', 'useColumns', 'useKeyboardControlledImagesNavigation', and 'useScrollPosition' hooks. These tests cover functionalities such as initial mode setting, mode changing, keyboard navigation, and scroll position detection.
The Jest configuration and setup files have been split into separate ones for client and Electron app testing. This will allow distinct test configuration and match patterns for the two different environments. Furthermore, corresponding changes are made in the package.json file to add different test scripts for running these new configuration files.
Renamed all test directories in src/client/ions/hooks path from "__test__" to "__tests__" to follow naming conventions. This change ensures a consistent file structure, which might have been causing issues in identifying and running test files.
Three new workflows have been added for GitHub Actions to run client, e2e, and electron tests. They are configured to trigger on push events to alpha, beta, rc, and main branches or on pull requests to those same branches. All workflows run on the latest version of Ubuntu and use Node.js version 18.x.
🎉 This PR is included in version 1.0.0-alpha.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
adds test for hooks
also sets up workflows for PRs
Issues closed
closes #22