Skip to content

Commit e6f281b

Browse files
committed
update unit test
1 parent 71d57ee commit e6f281b

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

‎test/info.js‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ async.filter(Object.keys(targets), isSingleTarget, function (results) {
2626
info.key.should.be.a.String.and.equal(key);
2727
info.should.not.have.property('family');
2828

29-
info.ext.should.be.a.String;
3029
info.title.should.be.a.String;
30+
info.extname.should.be.a.String;
3131

3232
done();
3333
});
@@ -37,6 +37,24 @@ async.filter(Object.keys(targets), isSingleTarget, function (results) {
3737

3838
async.filter(Object.keys(targets), isTargetFamily, function (families) {
3939
async.each(families, function (family) {
40+
describe(family + ' _familyInfo()', function () {
41+
var target = targets[family];
42+
43+
it('should have _familyInfo method', function (done) {
44+
target.should.have.property('_familyInfo');
45+
target._familyInfo.should.be.a.Function;
46+
47+
var info = target._familyInfo();
48+
49+
info.key.should.be.a.String.and.equal(family);
50+
51+
info.title.should.be.a.String;
52+
info.extname.should.be.a.String;
53+
54+
done();
55+
});
56+
});
57+
4058
async.each(Object.keys(targets[family]), function (key) {
4159
var target = targets[family][key];
4260

@@ -53,9 +71,8 @@ async.filter(Object.keys(targets), isTargetFamily, function (families) {
5371

5472
info.key.should.be.a.String.and.equal(key);
5573

56-
info.family.should.be.a.String;
57-
info.ext.should.be.a.String;
5874
info.title.should.be.a.String;
75+
info.family.should.be.a.String;
5976

6077
done();
6178
});

0 commit comments

Comments
 (0)