Amazebot/bbot

Fix inconsistent module references

Opened this issue · 0 comments

The brain module calls its own methods as they are exported via bot., instead
of just calling the method name directly from within the module. This allows
tests to stub and spy (which they otherwise can't on exported methods).

This is inconsistent with coding style of other modules. Need to either change
all modules to call own methods via bot., then remove some of the workarounds
used in spec, or find another way to make assertions in the brain spec and
remove the bot. from its own method calls. The latter is probably preferred.

see https://github.com/Amazebot/bbot/blob/master/src/lib/brain.ts