From 828798c43c40725853db7c310beaf06fa6930e85 Mon Sep 17 00:00:00 2001 From: domenic Date: Mon, 14 May 2012 19:21:37 -0400 Subject: [PATCH] Using nodeunit's deepEqual instead of manually looping. This makes for more readable assertion messages (so you can actually see the difference in the lists), and removes the underscore dependency. --- package.json | 3 +-- tests/readdir.js | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 424e6ea..4cc9362 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,7 @@ }, "devDependencies": { - "nodeunit": ">= 0.6.4", - "underscore": ">= 1.3.1" + "nodeunit": ">= 0.6.4" }, "main": "./lib/wrench", diff --git a/tests/readdir.js b/tests/readdir.js index b2d14f0..bca8ad6 100644 --- a/tests/readdir.js +++ b/tests/readdir.js @@ -2,7 +2,6 @@ var testCase = require('nodeunit').testCase; var fs = require('fs'); var wrench = require('../lib/wrench'); var path = require('path'); -var _und = require("underscore"); function checkResult(test, files) { @@ -15,11 +14,7 @@ function checkResult(test, files) { 'foo/bar/ipsum.js' ]; - test.equals(files.length, check.length, 'number of paths is correct'); - - _und.each(check, function(it) { - test.ok(_und.include(files, it), 'path ' + it + ' should be returned'); - }); + test.deepEqual(files, check); test.done(); }