commit
b035bdc01c
3 changed files with 5 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
node_modules
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"nodeunit": ">= 0.6.4",
|
"nodeunit": ">= 0.6.4"
|
||||||
"underscore": ">= 1.3.1"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"main": "./lib/wrench",
|
"main": "./lib/wrench",
|
||||||
|
|
@ -31,7 +30,7 @@
|
||||||
"node": ">=0.1.97"
|
"node": ">=0.1.97"
|
||||||
},
|
},
|
||||||
|
|
||||||
"scripts": { "test": "./node_modules/nodeunit/bin/nodeunit tests/runner.js" },
|
"scripts": { "test": "nodeunit tests/runner.js" },
|
||||||
|
|
||||||
"licenses": [{
|
"licenses": [{
|
||||||
"type" : "MIT",
|
"type" : "MIT",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ var testCase = require('nodeunit').testCase;
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var wrench = require('../lib/wrench');
|
var wrench = require('../lib/wrench');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var _und = require("underscore");
|
|
||||||
|
|
||||||
|
|
||||||
function checkResult(test, files) {
|
function checkResult(test, files) {
|
||||||
|
|
@ -15,11 +14,7 @@ function checkResult(test, files) {
|
||||||
path.join('foo', 'bar', 'ipsum.js')
|
path.join('foo', 'bar', 'ipsum.js')
|
||||||
];
|
];
|
||||||
|
|
||||||
test.equals(files.length, check.length, 'number of paths is correct');
|
test.deepEqual(files, check);
|
||||||
|
|
||||||
_und.each(check, function(it) {
|
|
||||||
test.ok(_und.include(files, it), 'path ' + it + ' should be returned');
|
|
||||||
});
|
|
||||||
|
|
||||||
test.done();
|
test.done();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue