test-helpers
Advanced tools
+7
-16
@@ -33,3 +33,8 @@ /*! | ||
| extend(helpers, Options.prototype); | ||
| helpers.init(options || {}); | ||
| var opts = extend({}, options); | ||
| helpers.option('dir', opts.dir || 'test'); | ||
| helpers.option('fixtures', helpers.options.dir + '/fixtures'); | ||
| helpers.option('actual', helpers.options.dir + '/actual'); | ||
| helpers.config(opts); | ||
| return helpers; | ||
@@ -39,3 +44,2 @@ } | ||
| /** | ||
@@ -51,15 +55,2 @@ * Cache for storing commonly used options. | ||
| /** | ||
| * Initialize defaults. | ||
| * | ||
| * @api private | ||
| */ | ||
| helpers.init = function(opts) { | ||
| this.option('dir', 'test'); | ||
| this.option('fixtures', this.options.dir + '/fixtures'); | ||
| this.option('actual', this.options.dir + '/actual'); | ||
| this.config(opts); | ||
| }; | ||
| /** | ||
| * Extend the options with the given `config` | ||
@@ -81,3 +72,3 @@ * object. | ||
| helpers.config = function(config) { | ||
| this.options = extend({}, this.options, config); | ||
| extend(this.options, config); | ||
| return this; | ||
@@ -84,0 +75,0 @@ }; |
+1
-1
| { | ||
| "name": "test-helpers", | ||
| "description": "Node.js path and fs helpers for things like reading fixtures and writing results while running tests. ", | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "homepage": "https://github.com/jonschlinkert/test-helpers", | ||
@@ -6,0 +6,0 @@ "author": { |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
9519
-0.77%135
-4.93%