ramp-resources
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -79,2 +79,8 @@ var _ = require("lodash"); | ||
return patterns.filter(function (pattern) { | ||
// prevent exclude pattern to be interpreted as unmatched | ||
if (pattern.charAt(0) === "!") { | ||
return false; | ||
} | ||
pattern = pattern.replace(/^\/?/, "/"); | ||
@@ -81,0 +87,0 @@ return mm.match(paths, pattern, options).length === 0; |
{ | ||
"name": "ramp-resources", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Virtual file systems for exposing files and other resources on e.g. web servers", | ||
@@ -5,0 +5,0 @@ "homepage": "http://busterjs.org/docs/resources", |
var buster = require("buster-node"); | ||
var assert = buster.assert; | ||
var refute = buster.refute; | ||
var fail = buster.referee.fail; | ||
var rr = require("../lib/ramp-resources"); | ||
@@ -17,3 +18,5 @@ var Path = require("path"); | ||
return function () { | ||
if (--num == 0) done(); | ||
if (--num === 0) { | ||
done(); | ||
} | ||
}; | ||
@@ -1011,2 +1014,9 @@ } | ||
})); | ||
}, | ||
"does not fail for unmatched exclude pattern": function (done) { | ||
var paths = ["*.js", "!some-test.js"]; | ||
this.rs.appendLoad(paths).then(done(assert), done(function () { | ||
fail("error callback should not be called!"); | ||
})); | ||
} | ||
@@ -1088,2 +1098,9 @@ }, | ||
})); | ||
}, | ||
"does not fail for unmatched exclude pattern": function (done) { | ||
var paths = ["*.js", "!some-test.js"]; | ||
this.rs.prependLoad(paths).then(done(assert), done(function () { | ||
fail("error callback should not be called!"); | ||
})); | ||
} | ||
@@ -1090,0 +1107,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
264163
4914