dotdot.js 531 B

1234567891011121314151617181920
  1. var mdeps = require('../');
  2. var test = require('tap').test;
  3. var through = require('through2');
  4. var path = require('path');
  5. test('dotdot', function (t) {
  6. var expected = [
  7. path.join(__dirname, '/dotdot/index.js'),
  8. path.join(__dirname, '/dotdot/abc/index.js')
  9. ];
  10. t.plan(expected.length);
  11. var d = mdeps();
  12. d.end(path.join(__dirname, '/dotdot/abc/index.js'));
  13. d.pipe(through.obj(function (row, enc, next) {
  14. t.deepEqual(row.file, expected.shift());
  15. next();
  16. }));
  17. });