Socket
Socket
Sign inDemoInstall

mem-fs-editor

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mem-fs-editor - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

1

actions/commit.js

@@ -44,3 +44,2 @@ 'use strict';

delete file.state;
this.push(file);
cb();

@@ -47,0 +46,0 @@ });

2

package.json
{
"name": "mem-fs-editor",
"version": "1.0.0",
"version": "1.0.1",
"description": "File edition helpers working on top of mem-fs",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

mem-fs-editor
mem-fs-editor [![Build Status](https://travis-ci.org/SBoudrias/mem-fs-editor.svg?branch=master)](https://travis-ci.org/SBoudrias/mem-fs-editor)
=============

@@ -3,0 +3,0 @@

@@ -14,8 +14,17 @@ 'use strict';

describe('#commit()', function () {
var fixtureDir = path.join(os.tmpdir(), '/mem-fs-editor-test-fixture');
var output = path.join(os.tmpdir(), '/mem-fs-editor-test');
beforeEach(function(done) {
rimraf.sync(fixtureDir);
var store = memFs.create();
this.fs = editor.create(store);
this.fs.copy(__dirname + '/fixtures/**', output);
mkdirp.sync(fixtureDir);
// Create a 100 files to exercise the stream high water mark
var i = 100;
while (i--) {
fs.writeFileSync(path.join(fixtureDir, 'file-' + i + '.txt'), 'foo');
}
this.fs.copy(fixtureDir + '/**', output);
rimraf(output, done);

@@ -39,4 +48,4 @@ });

this.fs.commit([filter], function () {
assert.equal(called, 5);
assert.equal(this.fs.read(path.join(output, 'file-a.txt')), 'modified');
assert.equal(called, 100);
assert.equal(this.fs.read(path.join(output, 'file-1.txt')), 'modified');
done();

@@ -48,3 +57,5 @@ }.bind(this));

this.fs.commit(function () {
assert(fs.existsSync(path.join(output, 'file-a.txt')));
assert(fs.existsSync(path.join(output, 'file-1.txt')));
assert(fs.existsSync(path.join(output, 'file-50.txt')));
assert(fs.existsSync(path.join(output, 'file-99.txt')));
done();

@@ -51,0 +62,0 @@ });

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