Describe the issue
The codebase lacks unit tests. Effort should be taken to get the codebase to a point where it is easy to add tests to the following packages:
client
common-lib
discord-bot
server
server-common
util-cli
The following packages are exempt:
apis: this package should have its functionality tested in auto-api-tests. It is more or less data/linking together of programs and doesn't need tests included within the package
auto-api-tests: this package is a test package and should be used to test auto-client-api
auto-client-api: this package has auto-api-tests created for the sole purpose of testing this package
server-jest-config: this package should provide a database connection for server, server-common, discord-bot, and util-cli tests
Of the 6 packages listed first, there should also be a substantive amount of tests to verify that each system works. This issue will have different requirements for each package, as follows:
client: Before tests can be done well, I am planning on refactoring the client to use something similar to the elm architecture. This will mean the majority of state will be managed through props/redux/actions. Once this is done, unit tests can be done in full with a higher level of maintainability.
common-lib: Jest is already configured. Tests just need to be added.
discord-bot: Mocking of the Discord API may be necessary for this package, then tests can be written. Jest configuration will also have to be done.
server: server-jest-config will need to be finished to provide a stable testing environment. Once this is accomplished, it will be possible to write tests as jest is already configured.
server-common: server-jest-config will need to be finished to provide a stable testing environment. Once this is accomplished, it will be possible to write tests as jest is already configured.
util-cli: server-jest-config will need to be finished to provide a stable testing environment. Once this is accomplished, it will be possible to write tests as jest is already configured.
The three big steps are as follows:
Finish creating server-jest-config
Rewrite the state management on the client to be more test friendly
Describe the issue The codebase lacks unit tests. Effort should be taken to get the codebase to a point where it is easy to add tests to the following packages:
The following packages are exempt:
Of the 6 packages listed first, there should also be a substantive amount of tests to verify that each system works. This issue will have different requirements for each package, as follows:
The three big steps are as follows:
Fortunately, 1 and 2 can be done concurrently. Number 2 is already being done through the client-state-rework branch.