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