Skip to content

Commit

Permalink
Merge pull request ryanmcgrath#14 from cbou/master
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
Ryan McGrath committed Feb 4, 2012
2 parents 60f6f15 + 358d77c commit a31e802
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@
"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",
Expand Down
2 changes: 1 addition & 1 deletion tests/mkdirSyncRecursive.js
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
7 changes: 5 additions & 2 deletions tests/readdirSyncRecursive.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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();
}
Expand Down

0 comments on commit a31e802

Please sign in to comment.