-
Notifications
You must be signed in to change notification settings - Fork 5
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
Tests in docker #191
Merged
Merged
Tests in docker #191
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
- We only create forms in FormCreator and PostCreator, so we don't need to declare separate useForm functions in Sidebar and Posts anymore. - Since we already have posts in Posts.jsx, we don't need to use getValues to retrieve the id when deleting a post. - If we don't wrap the FormCreator and PostCreator components in 'isFormOpen &&', values of react-hook-forms in the Dialog components won't be cleared. We reset the forms by mounting/unmounting the dialog components. - We refactored the PostCreator component by injecting the selected form. We moved the create post button to the posts/... routes, so we already have the required form after navigating to one of the posts/... paths. We also removed the setForm and formTypes props from PostCreator. - We removed the dropdown for type in PostCreator since it wasn't useful or efficient. - Since we don't use the type dropdown anymore, we don't need to validate the type field in postCreatorSchema.
- This is related to react-hook-form/react-hook-form#8705
- transform is required in jest.config.js - We have to use .js extension in import statements for our scripts. This gives eslint warning. We added the "import/extensions" rule in .eslintrc.json to avoid it. - --experimental-vm-modules flag is necessary to run jest with ecmascript modules.
yusufakdas
approved these changes
Apr 5, 2023
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.
server/Dockerfile
test stage on my m2 mac. The issue seems to be related to MongoMemoryServer.create hanging in Docker typegoose/mongodb-memory-server#710 (comment)CI
environment variable to disable watch mode when running tests inweb/Dockerfile
. See: running tests on your own environmentReferences:
Demonstration:
docker build -t knowzone-server-test --target test .
This should run the tests, give an error and not build the image.docker build -t knowzone-web-test --target test .
command this time.docker-compose up -d
uses prod stages in each Dockerfile. I didn't change anything.closes #190