Skip to content

Commit

Permalink
add testcase for duplicate glob ouput
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Jun 26, 2014
1 parent 99bf543 commit 438c165
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/fixtures/spm/output-glob-duplicate/a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('a');
7 changes: 7 additions & 0 deletions test/fixtures/spm/output-glob-duplicate/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "a",
"version": "1.0.0",
"spm": {
"output": ["a.js", "./*.js"]
}
}
6 changes: 6 additions & 0 deletions test/spm.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ describe('Father.SpmPackage', function() {
Object.keys(pkg.files).should.eql(['index.js','a.js', 'a1.js', 'b.js', 'b1.js', 'glob/c.js', 'c1.js']);
});

it('output glob duplicate', function() {
var pkg = getPackage('output-glob-duplicate');
pkg.output.should.eql(['a.js', './*.js']);
Object.keys(pkg.files).should.eql(['a.js']);
});

it('resolve deps', function() {
var pkg = getPackage('resolve-deps');
pkg.files['src/c.js'].dependencies.should.eql(['../a.js', '../b.js', './d.js']);
Expand Down

0 comments on commit 438c165

Please sign in to comment.