Sha256: cd4d5db29282d1fb2c5ea492bc2db295c7c621b15a97b4f271a02e534463daf6

Contents?: true

Size: 795 Bytes

Versions: 13

Compression:

Stored size: 795 Bytes

Contents

'use strict';

var gp = require('./');
var assert = require('assert');

describe('glob-parent', function() {
  it('should strip glob magic to return parent path', function() {
    assert.equal(gp('path/to/*.js'), 'path/to');
    assert.equal(gp('/root/path/to/*.js'), '/root/path/to');
    assert.equal(gp('/*.js'), '/');
    assert.equal(gp('*.js'), '.');
    assert.equal(gp('**/*.js'), '.');
    assert.equal(gp('path/{to,from}'), 'path');
    assert.equal(gp('path/!(to|from)'), 'path');
    assert.equal(gp('path/?(to|from)'), 'path');
    assert.equal(gp('path/+(to|from)'), 'path');
    assert.equal(gp('path/*(to|from)'), 'path');
    assert.equal(gp('path/@(to|from)'), 'path');
    assert.equal(gp('path/**/*'), 'path');
    assert.equal(gp('path/**/subdir/foo.*'), 'path');
  });
});

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
hooch-0.4.2 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
gulp_assets-1.0.0.pre.5 template/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/glob-parent/test.js
gulp_assets-1.0.0.pre.4 template/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/glob-parent/test.js
gulp_assets-1.0.0.pre.3 template/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/chokidar/node_modules/glob-parent/test.js