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

test-fixture

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-fixture - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

28

index.js

@@ -52,10 +52,13 @@ 'use strict';

Fixtures.prototype.copy = function(callback) {
Fixtures.prototype.copy = function( /* [to], callback */ ) {
var self = this;
tmp.dir(function (err, dir) {
if (err) {
return callback(err);
}
if (arguments.length == 2) {
var dir = arguments[0];
var callback = arguments[1];
} else {
var callback = arguments[0];
}
fse.copy(self.path, dir, function (err) {
function copydir(dir) {
fse.copy(self.path, dir, function(err) {
if (err) {

@@ -68,3 +71,14 @@ return callback(err);

});
});
}
if (dir) {
copydir(dir);
} else {
tmp.dir(function(err, dir) {
if (err) {
return callback(err);
}
copydir(dir);
});
}
};
{
"name": "test-fixture",
"version": "1.0.0",
"version": "1.0.1",
"description": "Copy test-fixtures to temp dir and get resolved file paths.",

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

@@ -69,2 +69,15 @@ 'use strict';

});
it("to specified folder", function(done){
var f = fixtures();
f.copy(node_path.join(__dirname,'temp'), function(err,dir){
done();
if (err) {
return;
}
expect_file(f.path, dir, 'a.js');
expect_file(f.path, dir, 'c');
});
});
});

@@ -71,0 +84,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