Skip to content

Commit

Permalink
chore: decrease windows shim test flakes (#6792)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys authored Sep 11, 2023
1 parent fb1b674 commit 0355153
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/bin/windows-shims.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const t = require('tap')
const { spawnSync } = require('child_process')
const { resolve, join, extname, basename, sep } = require('path')
const { readFileSync, chmodSync, readdirSync } = require('fs')
const { readFileSync, chmodSync, readdirSync, rmSync } = require('fs')
const Diff = require('diff')
const { sync: which } = require('which')
const { version } = require('../../package.json')
Expand Down Expand Up @@ -92,6 +92,10 @@ t.test('run shims', t => {
},
})

// hacky fix to decrease flakes of this test from `NOTEMPTY: directory not empty, rmdir`
// this should get better in tap@18 and we can try removing it then
t.teardown(() => rmSync(path, { recursive: true, force: true }))

const spawnPath = (cmd, args, { log, stdioString = true, ...opts } = {}) => {
if (cmd.endsWith('bash.exe')) {
// only cygwin *requires* the -l, but the others are ok with it
Expand Down

0 comments on commit 0355153

Please sign in to comment.