documentation/test/streams/normalize.js
Tom MacWright 86eccf6fe5 Switch from prova/istanbul/coveralls to 'just tap'
Improves test coverage. Refs #102
2015-07-24 13:03:05 -04:00

19 lines
470 B
JavaScript

'use strict';
var test = require('tap').test,
normalize = require('../../streams/normalize'),
concat = require('concat-stream');
test('normalizes tags', function (t) {
var stream = normalize();
stream.pipe(concat(function (data) {
t.deepEqual(data, [{
tags: [ { title: 'returns' }, { title: 'augments' }, { title: 'name' } ]
}]);
t.end();
}));
stream.end({ tags: [ { title: 'return' }, { title: 'extends' }, { title: 'name' } ] });
});