Skip to content

Commit

Permalink
tests(glob): quick refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctalkington committed Dec 21, 2015
1 parent 9c8daab commit 1239100
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions test/archiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,17 +319,23 @@ describe('archiver', function() {
.glob('test/fixtures/test.txt', null, { stats: null })
.glob('test/fixtures/empty.txt', null, { stats: null })
.glob('test/fixtures/executable.sh', null, { stats: null })
.glob('**/*', { cwd: 'test/fixtures/directory/',ignore: 'subdir/**/*', nodir: true, stat: false }, { stats: null })
.glob('test/fixtures/directory/**/*', { ignore: 'test/fixtures/directory/subdir/**/*', nodir: true }, { stats: null })
.glob('**/*', { cwd: 'test/fixtures/directory/subdir/' }, { stats: null })
.finalize();
});

it('should append multiple entries', function() {
assert.isArray(actual);
assert.lengthOf(actual, 4);
});
console.log(entries);

assert.property(entries, 'test/fixtures/test.txt');
assert.property(entries, 'test/fixtures/executable.sh');
assert.property(entries, 'test/fixtures/empty.txt');

assert.property(entries, 'test/fixtures/directory/level0.txt');

it('should not append "subdir"', function() {
assert.equal(JSON.stringify(entries).indexOf('subdir'), -1);
assert.property(entries, 'level1.txt');
assert.property(entries, 'subsub/level2.txt');
});
});

Expand Down

0 comments on commit 1239100

Please sign in to comment.