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

hardhat

Package Overview
Dependencies
Maintainers
1
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hardhat - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

6

lib/scaffold.js

@@ -43,3 +43,3 @@ /**

if (!path.existsSync(dirIn)) {
callback(new Error('The input directory does not exist.'));
return callback(new Error('The input directory does not exist (' + dirIn + ').'));
}

@@ -49,3 +49,3 @@ // If dirOut does not exist, try to create it.

if (!mkdirp.sync(dirOut)) {
callback(new Error('Could not create the output directory.'));
return callback(new Error('Could not create the output directory (' + dirOut + ').'));
}

@@ -56,3 +56,3 @@ }

if (!cons[options.engine]) {
callback(new Error('The templating engine `' + options.engine + '` does not exist.'));
return callback(new Error('The templating engine `' + options.engine + '` does not exist.'));
}

@@ -59,0 +59,0 @@

@@ -6,3 +6,3 @@ {

"keywords": ["scaffold", "cli", "copy", "file", "directory", "directories"],
"version": "0.0.1",
"version": "0.0.2",
"homepage": "http://cantina.github.com",

@@ -9,0 +9,0 @@ "repository": {

@@ -71,2 +71,23 @@ /**

});
describe('Error Conditions', function() {
it('should error on a bad input directory', function(done) {
dirIn = path.join(__dirname, 'fixtures/bad');
hardhat.scaffold(dirIn, dirOut, function(err) {
assert.ok(err, 'An error was not present.')
assert.equal(err.message.indexOf('The input directory does not exist'), 0, 'An incorrect error message was observed.')
done();
});
});
it('should error on a bad templating engine', function(done) {
dirIn = path.join(__dirname, 'fixtures/plain');
hardhat.scaffold(dirIn, dirOut, {engine: 'bad'}, function(err) {
assert.ok(err, 'An error was not present.')
assert.equal(err.message.indexOf('The templating engine'), 0, 'An incorrect error message was observed.')
done();
});
});
});
});
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