var assert = require("should");
var depcheck = require("../index");
var path = require("path");

describe("depcheck", function () {
  it("should find unused dependencies", function testUnused(done) {
    var absolutePath = path.resolve("test/fake_modules/bad");

    depcheck(absolutePath, {}, function checked(unused) {
      assert.equal(unused.length, 1);
      done();
    });
  });

  it("should find all dependencies", function testUnused(done) {
    var absolutePath = path.resolve("test/fake_modules/good");

    depcheck(absolutePath, {}, function checked(unused) {
      assert.equal(unused.length, 0);
      done();
    });
  });

  it("should find manage grunt dependencies", function testUnused(done) {
    var absolutePath = path.resolve("test/fake_modules/grunt");

    depcheck(absolutePath, {}, function checked(unused) {
      assert.equal(unused.length, 0);
      done();
    });
  });

  it("should find manage grunt task dependencies", function testUnused(done) {
    var absolutePath = path.resolve("test/fake_modules/grunt-tasks");

    depcheck(absolutePath, {}, function checked(unused) {
      assert.equal(unused.length, 0);
      done();
    });
  });

  it("should look at devDependencies", function testUnused(done) {
    var absolutePath = path.resolve("test/fake_modules/dev");

    depcheck(absolutePath, { "withDev": true }, function checked(unused) {
      assert.equal(unused.length, 1);
      done();
    });
  });
});

@@ -276,32 +276,53 @@
 (absolutePath, %7B
+ %22withouttDev%22: true 
 %7D, function chec
@@ -353,32 +353,45 @@
 rt.equal(unused.
+dependencies.
 length, 1);%0A    
@@ -564,32 +564,53 @@
 (absolutePath, %7B
+ %22withouttDev%22: true 
 %7D, function chec
@@ -641,32 +641,45 @@
 rt.equal(unused.
+dependencies.
 length, 0);%0A    
@@ -862,32 +862,53 @@
 (absolutePath, %7B
+ %22withouttDev%22: true 
 %7D, function chec
@@ -939,32 +939,45 @@
 rt.equal(unused.
+dependencies.
 length, 0);%0A    
@@ -1179,16 +1179,37 @@
 ePath, %7B
+ %22withouttDev%22: true 
 %7D, funct
@@ -1248,32 +1248,45 @@
 rt.equal(unused.
+dependencies.
 length, 0);%0A    
@@ -1474,25 +1474,30 @@
  %7B %22with
+outt
 Dev%22: 
-tru
+fals
 e %7D, fun
@@ -1546,16 +1546,32 @@
 (unused.
+devDependencies.
 length, 

Make tests pass