chai-files
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -5,2 +5,7 @@ | ||
## v1.4.0 | ||
- extended exception messages for `expect(...).to.exist` | ||
## v1.3.0 | ||
@@ -7,0 +12,0 @@ |
{ | ||
"name": "chai-files", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "file system assertions for chai", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,4 @@ var fs = require('fs'); | ||
var existsMessage = require('./exists-message'); | ||
function DirectoryHelper(path) { | ||
@@ -56,3 +58,3 @@ this.path = path; | ||
if (!this.exists) { | ||
throw new AssertionError('expected "' + this.path + '" to exist', {}, ssf); | ||
throw new AssertionError(existsMessage(this.path), {}, ssf); | ||
} else if (!this.stats.isDirectory()) { | ||
@@ -59,0 +61,0 @@ throw new AssertionError('expected "' + this.path + '" to be a directory', {}, ssf); |
@@ -5,2 +5,4 @@ var fs = require('fs'); | ||
var existsMessage = require('./exists-message'); | ||
function FileHelper(path) { | ||
@@ -56,3 +58,3 @@ this.path = path; | ||
if (!this.exists) { | ||
throw new AssertionError('expected "' + this.path + '" to exist', {}, ssf); | ||
throw new AssertionError(existsMessage(this.path), {}, ssf); | ||
} else if (!this.stats.isFile()) { | ||
@@ -59,0 +61,0 @@ throw new AssertionError('expected "' + this.path + '" to be a file', {}, ssf); |
18487
10
464