Merge pull request #14 from cbou/master
- Package.json now contains depedencies. - Tests do not use test.deepEqual() anymore because with this method, the order has to be the same, which is not always the case.
This commit is contained in:
commit
a31e8029cd
4 changed files with 17 additions and 3 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
node_modules
|
||||
10
package.json
10
package.json
|
|
@ -19,12 +19,22 @@
|
|||
"lib": "./lib/"
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
},
|
||||
|
||||
"devDependencies": {
|
||||
"nodeunit": ">= 0.6.4",
|
||||
"underscore": ">= 1.3.1"
|
||||
},
|
||||
|
||||
"main": "./lib/wrench",
|
||||
|
||||
"engines": {
|
||||
"node": ">=0.1.97"
|
||||
},
|
||||
|
||||
"scripts": { "test": "./node_modules/nodeunit/bin/nodeunit tests/runner.js" },
|
||||
|
||||
"licenses": [{
|
||||
"type" : "MIT",
|
||||
"url" : "http://github.com/ryanmcgrath/wrench-js/raw/master/LICENSE"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
var testCase = require('nodeunit').testCase;
|
||||
var fs = require('fs');
|
||||
var wrench = require('wrench');
|
||||
var wrench = require('../lib/wrench');
|
||||
var path = require('path');
|
||||
|
||||
module.exports = testCase({
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
var testCase = require('nodeunit').testCase;
|
||||
var fs = require('fs');
|
||||
var wrench = require('wrench');
|
||||
var wrench = require('../lib/wrench');
|
||||
var path = require('path');
|
||||
var _und = require("underscore");
|
||||
|
||||
module.exports = testCase({
|
||||
test_readdirSyncRecursive: function(test) {
|
||||
|
|
@ -21,7 +22,9 @@ module.exports = testCase({
|
|||
var files = wrench.readdirSyncRecursive(dir);
|
||||
|
||||
test.equals(files.length, check.length, 'number of paths is correct');
|
||||
test.deepEqual(files, check, 'list shows all files and folders');
|
||||
for (var filename in files) {
|
||||
test.ok(_und.include(check, files[filename]));
|
||||
}
|
||||
|
||||
test.done();
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue