merge dev branch (more tests) (#47)

* more tests and bugfixes on spells

* linting
This commit is contained in:
2021-05-06 21:35:58 +02:00
committed by GitHub
parent 25ad8ad160
commit ba63be64dd
12 changed files with 219 additions and 45 deletions

View File

@ -4,9 +4,11 @@ require('babel-plugin-rewire');
const command = require('@Commands/Roll');
//const exec = command.__get__('exec');
describe('roll command', () => {
const message = { reply: str => str };
const reply = jest.fn(str => str);
const message = { author: { tag: 'test' }, reply: reply };
it('should not return anything without correct arguments', () => {
const args = ['1'];
const args = ['1w6'];
expect(command.exec(message, args)).resolves.toBeUndefined();
expect(reply).toHaveBeenCalled();
});
});