Skip to content

Commit 28e702b

Browse files
committed
New files since last release: additional test cases
1 parent fba3ab4 commit 28e702b

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

source/npm/util.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ function getIgnoredFilesGlob(globArrayFromFilesProperty, packageDirectories) {
193193
'node_modules/**/*',
194194
'npm-debug.log',
195195
'package-lock.json',
196-
'.git/**/*'
196+
'.git/**/*',
197+
'.git'
197198
];
198199

199200
// Test files are assumed not to be part of the package

test/fixtures/npmignore/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
File is always included in package.

test/fixtures/npmignore/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
File is always included in package.

test/integration.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
const test = require('ava');
22
const execa = require('execa');
33

4+
test.before(async () => {
5+
await execa('git', ['submodule', 'update', '--remote']);
6+
await execa('npm', ['i'], {cwd: 'integration-test'});
7+
});
8+
49
test('Integration tests', async t => {
510
await execa('ava', {cwd: 'integration-test'});
611
t.pass();

test/npmignore.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const newFiles = [
66
'source/ignore.txt',
77
'source/pay_attention.txt',
88
'.hg',
9-
'test/file.txt'
9+
'test/file.txt',
10+
'readme.md',
11+
'README.txt'
1012
];
1113

1214
test('ignored files using file-attribute in package.json with one file', async t => {

0 commit comments

Comments
 (0)