Sha256: 5878ffd0b5bd4a6c670e9ec9bdd9baa16f352f52c71759cdcdc9129ac1f42fb1
Contents?: true
Size: 1.09 KB
Versions: 7
Compression:
Stored size: 1.09 KB
Contents
var sort = require('../'); var test = require('tap').test; var through = require('through2'); test('expose true', function (t) { t.plan(1); var s = sort({ index: true, expose: [ '/foo.js', '/bar.js' ] }); var rows = []; function write (row, enc, next) { rows.push(row); next() } function end () { t.deepEqual(rows, [ { id: '/bar.js', deps: {}, index: '/bar.js', indexDeps: {} }, { id: '/foo.js', deps: { './bar': '/bar.js' }, index: '/foo.js', indexDeps: { './bar': '/bar.js' } }, { id: '/main.js', deps: { './foo': '/foo.js' }, index: 1, indexDeps: { './foo': '/foo.js' } }, ]); } s.pipe(through.obj(write, end)); s.write({ id: '/main.js', deps: { './foo': '/foo.js' } }); s.write({ id: '/foo.js', deps: { './bar': '/bar.js' } }); s.write({ id: '/bar.js', deps: {} }); s.end(); });
Version data entries
7 entries across 7 versions & 2 rubygems