Socket
Socket
Sign inDemoInstall

chai-files

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0 to 1.4.0

src/exists-message.js

5

CHANGELOG.md

@@ -5,2 +5,7 @@

## v1.4.0
- extended exception messages for `expect(...).to.exist`
## v1.3.0

@@ -7,0 +12,0 @@

2

package.json
{
"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);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc