Skip to content

Commit

Permalink
New files since last release: additional test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
bunysae committed Aug 2, 2020
1 parent fba3ab4 commit 28e702b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/npm/util.js
Expand Up @@ -193,7 +193,8 @@ function getIgnoredFilesGlob(globArrayFromFilesProperty, packageDirectories) {
'node_modules/**/*',
'npm-debug.log',
'package-lock.json',
'.git/**/*'
'.git/**/*',
'.git'
];

// Test files are assumed not to be part of the package
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/npmignore/README.txt
@@ -0,0 +1 @@
File is always included in package.
1 change: 1 addition & 0 deletions test/fixtures/npmignore/readme.md
@@ -0,0 +1 @@
File is always included in package.
5 changes: 5 additions & 0 deletions test/integration.js
@@ -1,6 +1,11 @@
const test = require('ava');
const execa = require('execa');

test.before(async () => {
await execa('git', ['submodule', 'update', '--remote']);
await execa('npm', ['i'], {cwd: 'integration-test'});
});

test('Integration tests', async t => {
await execa('ava', {cwd: 'integration-test'});
t.pass();
Expand Down
4 changes: 3 additions & 1 deletion test/npmignore.js
Expand Up @@ -6,7 +6,9 @@ const newFiles = [
'source/ignore.txt',
'source/pay_attention.txt',
'.hg',
'test/file.txt'
'test/file.txt',
'readme.md',
'README.txt'
];

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

0 comments on commit 28e702b

Please sign in to comment.