Socket
Socket
Sign inDemoInstall

memfs

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memfs - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

lib/test/volume/exists.test.js

9

CONTRIBUTING.md

@@ -6,2 +6,3 @@ # Contributing to `memfs`

git clone https://github.com/streamich/memfs
cd memfs

@@ -15,3 +16,2 @@ Start from the `develop` branch:

cd memfs
npm install

@@ -34,9 +34,6 @@

npm test
npm run test-coverage-ts
Also make sure that your test cases have your new code well, run coverage report
using this command:
Also make sure that your test cases cover your new code well.
npm run test-coverage-ts
When done, build the project:

@@ -43,0 +40,0 @@

@@ -685,38 +685,2 @@ "use strict";

});
describe('.existsSync(path)', function () {
var vol = volume_1.Volume.fromJSON({ '/foo': 'bar' });
it('Returns true if file exists', function () {
var result = vol.existsSync('/foo');
chai_1.expect(result).to.be.true;
});
it('Returns false if file does not exist', function () {
var result = vol.existsSync('/foo2');
chai_1.expect(result).to.be.false;
});
});
describe('.exists(path, callback)', function () {
var vol = volume_1.Volume.fromJSON({ '/foo': 'bar' });
it('Returns true if file exists', function (done) {
vol.exists('/foo', function (exists) {
chai_1.expect(exists).to.be.true;
done();
});
});
it('Returns false if file does not exist', function (done) {
vol.exists('/foo2', function (exists) {
chai_1.expect(exists).to.be.false;
done();
});
});
it('Throws correct error if callback not provided', function (done) {
try {
vol.exists('/foo', undefined);
throw new Error('not_this');
}
catch (err) {
chai_1.expect(err.message).to.equal('callback must be a function');
done();
}
});
});
describe('.linkSync(existingPath, newPath)', function () {

@@ -723,0 +687,0 @@ var vol = new volume_1.Volume;

{
"name": "memfs",
"version": "2.2.0",
"version": "2.3.0",
"description": "In-memory file-system with Node's fs API.",

@@ -75,3 +75,3 @@ "main": "lib/index.js",

"build-js": "babel src --out-dir lib",
"test": "npm run test-coverage-ts",
"test": "npm run test-basic-js",
"test-basic-js": "mocha lib/**/**/**/*.test.js",

@@ -78,0 +78,0 @@ "test-basic-ts": "mocha --require ts-node/register src/**/**/**/*.test.ts",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc