Skip to content

Commit

Permalink
Upgrade to tap@4
Browse files Browse the repository at this point in the history
Required a slight change since Istanbul now includes a
fs.readdirSync(), which triggered the ENOTSUP test monkeypatch.
  • Loading branch information
isaacs committed Dec 31, 2015
1 parent 2df859c commit 8ecbd73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"mkdirp": "0",
"rimraf": "^2.2.8",
"tap": "^1.1.4",
"tap": "^4.0.0",
"tick": "0.0.6"
},
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions test/enotsup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var allowedDirs = [
]

fs.readdirSync = function (p) {
if (allowedDirs.indexOf(path.resolve(p)) === -1) {
if (allowedDirs.indexOf(path.resolve(p)) === -1 &&
!p.match(/[\\\/]node_modules[\\\/]/)) {
sawSyncENOTSUP = true
var er = new Error('ENOTSUP: Operation not supported')
er.path = path
Expand All @@ -24,7 +25,8 @@ fs.readdirSync = function (p) {
}

fs.readdir = function (p, cb) {
if (allowedDirs.indexOf(path.resolve(p)) === -1) {
if (allowedDirs.indexOf(path.resolve(p)) === -1 &&
!p.match(/[\\\/]node_modules[\\\/]/)) {
setTimeout(function () {
sawAsyncENOTSUP = true
er = new Error('ENOTSUP: Operation not supported')
Expand Down

0 comments on commit 8ecbd73

Please sign in to comment.