Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

faux-knox-2

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faux-knox-2 - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

2

index.js

@@ -139,3 +139,3 @@ var fs = require("fs");

walker.on("file", function (root, stat, next) {
files.push({Key: root + stat.name});
files.push({Key: options.prefix + stat.name});
next();

@@ -142,0 +142,0 @@ });

{
"name": "faux-knox-2",
"version": "0.1.8",
"version": "0.1.9",
"description": "Mock requests to knox module using file system",

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

@@ -46,24 +46,2 @@ var should = require("should");

});
it("should pipe a file", function(done) {
client.getFile("path/to/test.json", null, function(err, cres) {
cres.should.have.property("headers").be.a("object");
cres.should.have.property("statusCode", 200);
function getFile(callback) {
fs.mkdirSync("./test_files/from");
var stream = fs.createWriteStream("./test_files/from/test.json");
cres.on("end", callback);
cres.on("error", callback);
cres.pipe(stream);
}
function getFSFile(callback) {
fs.readFile("./test_files/path/to/test.json", callback);
}
async.parallel([getFile, getFSFile], function(err, results) {
results[0] = fs.readFileSync("./test_files/from/test.json");
should.strictEqual(results[0].toString(), results[1].toString());
done();
});
});
});
it("should not get a file", function(done) {

@@ -70,0 +48,0 @@ client.getFile("path/to/nofile.txt", null, function(err, cres) {

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