Skip to content

Commit

Permalink
Add failing test for packing directories recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
josephfrazier committed Apr 17, 2017
1 parent e78247d commit 6626c5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/commands/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ test.concurrent('pack should inlude all files listed in the files array', (): Pr
path.join(cwd, 'files-include-v1.0.0.tgz'),
path.join(cwd, 'files-include-v1.0.0'),
);
const expected = ['index.js', 'a.js', 'b.js'];
const expected = ['index.js', 'a.js', 'b.js', 'dir/nested.js'];
expected.forEach((filename) => {
expect(files.indexOf(filename)).toBeGreaterThanOrEqual(0);
});
Expand Down
2 changes: 2 additions & 0 deletions __tests__/fixtures/pack/files-include/dir/nested.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* @flow */
console.log('hello world');
2 changes: 1 addition & 1 deletion __tests__/fixtures/pack/files-include/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"files": ["index.js", "a.js", "b.js"]
"files": ["index.js", "a.js", "b.js", "dir/"]
}

0 comments on commit 6626c5e

Please sign in to comment.