Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a9d9b05

Browse filesBrowse files
committed
chore(test): Avoid spurious failures packing node_modules/.cache
1 parent 24b8bda commit a9d9b05
Copy full SHA for a9d9b05

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎test/create.js

Copy file name to clipboardExpand all lines: test/create.js
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,13 @@ t.test('gzipped tarball that makes some drain/resume stuff', t => {
154154
const cwd = path.dirname(__dirname)
155155
const out = path.resolve(dir, 'package.tgz')
156156

157-
c({ z: true, C: cwd }, ['node_modules'])
157+
// 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)
158164
.pipe(fs.createWriteStream(out))
159165
.on('finish', _ => {
160166
const child = spawn('tar', ['tf', out], {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.