Skip to content

Commit

Permalink
test: add test for csvComponentPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
abtris committed Apr 8, 2017
1 parent d593554 commit 3b80272
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ describe('main tests', function() {
assert.equal('"abbrev@1.0.9","abbrev","Like ruby\'s abbrev module, but in js","<<Should Never be set>>"', str.split('\n')[1]);
});

it('and convert to CSV with component prefix', function() {
var format = {
'name': '<<Default Name>>',
'description': '<<Default Description>>',
'pewpew': '<<Should Never be set>>'
};

var str = checker.asCSV(output, format, "main-module");
assert.equal('"component","module name","name","description","pewpew"', str.split('\n')[0]);
assert.equal('"main-module","abbrev@1.0.9","abbrev","Like ruby\'s abbrev module, but in js","<<Should Never be set>>"', str.split('\n')[1]);

});

it('and convert to MarkDown', function() {
var format = {
'name': '<<Default Name>>',
Expand Down

0 comments on commit 3b80272

Please sign in to comment.