Skip to content

Commit

Permalink
tests(new-files): add repro for sindresorhus#615
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-mitchell committed Apr 3, 2023
1 parent 3ab482b commit 98c6b36
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/fixtures/files/files-slash/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('foo');
5 changes: 5 additions & 0 deletions test/fixtures/files/files-slash/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "foo",
"version": "0.0.0",
"files": ["/index.js"]
}
7 changes: 7 additions & 0 deletions test/new-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ test.serial('package.json files field - source and dist dirs', async t => {
]);
});

test.serial('package.json files field - leading slash', async t => {
await checkPackedFiles(t, 'files-slash', [
'package.json',
'index.js'
]);
});

test.serial('package.json files field - has readme and license', async t => {
await checkPackedFiles(t, 'has-readme-and-license', [
'package.json',
Expand Down

0 comments on commit 98c6b36

Please sign in to comment.