forked from yeoman/generator
-
Notifications
You must be signed in to change notification settings - Fork 0
test generators
Mickael Daniel edited this page Jan 16, 2013
·
1 revision
should have a Base object to extend from.
assert.ok(generators.Base);
should have a NamedBase object to extend from.
assert.ok(generators.NamedBase);
should be an EventEmitter.
assert.ok(this.generator instanceof events.EventEmitter);
assert.ok(typeof this.generator.on === 'function');
assert.ok(typeof this.generator.emit === 'function');
this.generator.on('yay-o-man', done);
this.generator.emit('yay-o-man');
should be a Base generator.
assert.ok(this.generator instanceof generators.Base);
and it should have a name property.
assert.equal(this.generator.name, 'namedArg');