Fix unit tests - Backend#264
Closed
nickbeaird wants to merge 32 commits intohackforla:developmentfrom
Closed
Conversation
Moving the instantiation of the server away from the application itself allows us to import the express app as a moodule and test it. This keeps us from actually spinning up a server instance on every import.
The slack app is starting every time the application is initialized, which is causing the tests to be unable to close. This work will be refactored out here soon.
These test cases showcase being able to write unit test and integration tests using the database, models, and api.
This was referenced Aug 25, 2020
Closed
Contributor
Author
|
This PR may be superseded by this PR here, #269 |
This file contains hidden or 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
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.
Goal: Get the tests working
The tests have been disabled for some time and there seems to be a growing number of regressions when pulling up the application. The goal of this projects was to get the tests working, which largely centered on setting up test frameworks for the development environment.
Work Done:
How to test that this work?
Add your .env file at the root directory to the backend directory
Delete all of your package.json file and nod_modules directories
Run npm install in the root, backend, and client directories.