added tests for commands
This commit is contained in:
parent
925dea7ad4
commit
6a3b2d0c83
@ -46,9 +46,15 @@ describe('Messages', function() {
|
|||||||
names.forEach(function(name) {
|
names.forEach(function(name) {
|
||||||
var command = commands[name];
|
var command = commands[name];
|
||||||
var data = Data[command.toUpperCase()];
|
var data = Data[command.toUpperCase()];
|
||||||
|
|
||||||
it('should have data for ' + name, function() {
|
it('should have data for ' + name, function() {
|
||||||
should.exist(data);
|
should.exist(data);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('command for name ' + name, function() {
|
||||||
|
Messages.Message.COMMANDS[command].should.equal(Messages[name]);
|
||||||
|
});
|
||||||
|
|
||||||
describe(name, function() {
|
describe(name, function() {
|
||||||
var message = new Messages[name]();
|
var message = new Messages[name]();
|
||||||
it('should be able to create instance', function() {
|
it('should be able to create instance', function() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user