fixed gettng input from the message

This commit is contained in:
Mohammed Ashab Uddin
2020-07-24 15:59:23 +04:00
parent 507e62e049
commit 11063d120d
3 changed files with 20 additions and 37 deletions

View File

@@ -119,19 +119,6 @@ describe('Command', () => {
expect(a.equals(message)).to.false;
});
it('Test : _getInputPosition()', () => {
let a = new Command({
command: "wg create <id>",
callback: () => {
}
});
expect(a.inputPos[0]).to.equal(2);
})
it('Test : getInput() with 1 input', () => {
@@ -144,7 +131,7 @@ describe('Command', () => {
}
});
expect(a.getInput(message)[0]).to.equal('p12');
expect(a.getInput(message)['id']).to.equal('p12');
});
it('Test : getInput() with 2 input', () => {
@@ -158,10 +145,10 @@ describe('Command', () => {
}
});
expect(a.getInput(message)[0]).to.equal('p12');
expect(a.getInput(message)[1]).to.equal('pikachu');
expect(a.getInput(message)['id']).to.equal('p12');
expect(a.getInput(message)['name']).to.equal('pikachu');
});
});