We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24b8bda commit a9d9b05Copy full SHA for a9d9b05
test/create.js
@@ -154,7 +154,13 @@ t.test('gzipped tarball that makes some drain/resume stuff', t => {
154
const cwd = path.dirname(__dirname)
155
const out = path.resolve(dir, 'package.tgz')
156
157
- c({ z: true, C: cwd }, ['node_modules'])
+ // don't include node_modules/.cache, since that gets written to
158
+ // by nyc during tests, and can result in spurious errors.
159
+ const entries = fs.readdirSync(`${cwd}/node_modules`)
160
+ .filter(e => !/^\./.test(e))
161
+ .map(e => `node_modules/${e}`)
162
+
163
+ c({ z: true, C: cwd }, entries)
164
.pipe(fs.createWriteStream(out))
165
.on('finish', _ => {
166
const child = spawn('tar', ['tf', out], {
0 commit comments