Files
bower/test/info.js
Chris Aniszczyk c220329337 Initial Release
Signed-off-by: Chris Aniszczyk <zx@twitter.com>
2012-09-06 17:11:42 -07:00

36 lines
859 B
JavaScript

var assert = require('assert');
var events = require('events');
var info = require('../lib/commands/info');
describe('info', function () {
it('Should have line method', function () {
assert(!!info.line);
});
it('Should return an emiter', function () {
assert(info() instanceof events.EventEmitter);
});
it('Should emit end event', function (next) {
info('jquery').on('end', function (data) {
assert(!!data);
next();
});
});
it('Should emit end event with data.pkg object', function (next) {
info('jquery').on('end', function (data) {
assert(typeof data.pkg == 'object');
next();
});
});
it('Should emit end event with data.versions array', function (next) {
info('jquery').on('end', function (data) {
assert(typeof data.versions == 'object');
next();
});
});
});