Sha256: 2fc24f66041c249c1333da67f88f7a536fbd1eb765becba0317a3dd6380038fb
Contents?: true
Size: 697 Bytes
Versions: 7
Compression:
Stored size: 697 Bytes
Contents
var sort = require('../'); var test = require('tap').test; var through = require('through2'); test('sort', function (t) { t.plan(1); var s = sort(); var rows = []; function write (row, enc, next) { rows.push(row); next() } function end () { t.deepEqual(rows, [ { id: '/bar.js', deps: {} }, { id: '/foo.js', deps: { './bar': '/bar.js' } }, { id: '/main.js', deps: { './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