add quotes around the path and fix the test

This commit is contained in:
Dylan Greene
2013-05-06 22:16:52 -04:00
parent f668596667
commit cff641ef80
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ function find(folder, callback) {
fs.exists(file, function (exists) {
if (exists) return callback(null, file);
var err = new Error('Neither bower.json nor component.json were found in ' + folder);
var err = new Error('Neither bower.json nor component.json were found in "' + folder + '"');
err.code = 'ENOENT';
callback(err);
});

View File

@@ -25,7 +25,7 @@ describe('.find', function () {
bowerJson.find(__dirname, function (err) {
expect(err).to.be.an(Error);
expect(err.code).to.equal('ENOENT');
expect(err.message).to.contain('no json file');
expect(err.message).to.equal('Neither bower.json nor component.json were found in "' + __dirname + '"');
done();
});
});