lewster32 / corporallancot

A Discord bot primarily for recording, searching and retrieving notes and quotes
MIT License
1 stars 2 forks source link

Implement Unit Tests & IoC #2

Open Bidthedog opened 4 years ago

Bidthedog commented 4 years ago

Started work on this - using https://github.com/jeffijoe/awilix as it seems to be the most popular and feature rich IoC container for Node.js.

I'll be implementing unit tests for new pieces of code, and unit tests for older pieces of code where pragmatic for now, but will continue to improve the coverage over time.

This will result in a considerable amount of refactoring - especially around the existing constructor dependency injection.

I'll create a PR draft linked to my changes so we can monitor any conflicts.

Bidthedog commented 4 years ago

This is in progress in https://github.com/DNIStream/corporallancot under the feature/jasmine branch, though I have not yet pushed the initial changes as things are currently broken. Will be doing this in the next few days.

Bidthedog commented 4 years ago

Going to reopen this as there is still a bit of work to do - the action handlers and the Bot don't yet have any tests.