+ * MIT Licensed
+ */
+
+/**
+ * Lame Array.isArray() polyfill for now.
+ */
+
+if (!Array.isArray) {
+ Array.isArray = function(arr){
+ return '[object Array]' == Object.prototype.toString.call(arr);
+ };
+}
+
+/**
+ * Lame Object.keys() polyfill for now.
+ */
+
+if (!Object.keys) {
+ Object.keys = function(obj){
+ var arr = [];
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ arr.push(key);
+ }
+ }
+ return arr;
+ }
+}
+
+/**
+ * Merge two attribute objects giving precedence
+ * to values in object `b`. Classes are special-cased
+ * allowing for arrays and merging/joining appropriately
+ * resulting in a string.
+ *
+ * @param {Object} a
+ * @param {Object} b
+ * @return {Object} a
+ * @api private
+ */
+
+exports.merge = function merge(a, b) {
+ var ac = a['class'];
+ var bc = b['class'];
+
+ if (ac || bc) {
+ ac = ac || [];
+ bc = bc || [];
+ if (!Array.isArray(ac)) ac = [ac];
+ if (!Array.isArray(bc)) bc = [bc];
+ ac = ac.filter(nulls);
+ bc = bc.filter(nulls);
+ a['class'] = ac.concat(bc).join(' ');
+ }
+
+ for (var key in b) {
+ if (key != 'class') {
+ a[key] = b[key];
+ }
+ }
+
+ return a;
+};
+
+/**
+ * Filter null `val`s.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function nulls(val) {
+ return val != null;
+}
+
+/**
+ * Render the given attributes object.
+ *
+ * @param {Object} obj
+ * @param {Object} escaped
+ * @return {String}
+ * @api private
+ */
+
+exports.attrs = function attrs(obj, escaped){
+ var buf = []
+ , terse = obj.terse;
+
+ delete obj.terse;
+ var keys = Object.keys(obj)
+ , len = keys.length;
+
+ if (len) {
+ buf.push('');
+ for (var i = 0; i < len; ++i) {
+ var key = keys[i]
+ , val = obj[key];
+
+ if ('boolean' == typeof val || null == val) {
+ if (val) {
+ terse
+ ? buf.push(key)
+ : buf.push(key + '="' + key + '"');
+ }
+ } else if (0 == key.indexOf('data') && 'string' != typeof val) {
+ buf.push(key + "='" + JSON.stringify(val) + "'");
+ } else if ('class' == key && Array.isArray(val)) {
+ buf.push(key + '="' + exports.escape(val.join(' ')) + '"');
+ } else if (escaped && escaped[key]) {
+ buf.push(key + '="' + exports.escape(val) + '"');
+ } else {
+ buf.push(key + '="' + val + '"');
+ }
+ }
+ }
+
+ return buf.join(' ');
+};
+
+/**
+ * Escape the given string of `html`.
+ *
+ * @param {String} html
+ * @return {String}
+ * @api private
+ */
+
+exports.escape = function escape(html){
+ return String(html)
+ .replace(/&(?!(\w+|\#\d+);)/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"');
+};
+
+/**
+ * Re-throw the given `err` in context to the
+ * the jade in `filename` at the given `lineno`.
+ *
+ * @param {Error} err
+ * @param {String} filename
+ * @param {String} lineno
+ * @api private
+ */
+
+exports.rethrow = function rethrow(err, filename, lineno){
+ if (!filename) throw err;
+
+ var context = 3
+ , str = require('fs').readFileSync(filename, 'utf8')
+ , lines = str.split('\n')
+ , start = Math.max(lineno - context, 0)
+ , end = Math.min(lines.length, lineno + context);
+
+ // Error context
+ var context = lines.slice(start, end).map(function(line, i){
+ var curr = i + start + 1;
+ return (curr == lineno ? ' > ' : ' ')
+ + curr
+ + '| '
+ + line;
+ }).join('\n');
+
+ // Alter exception message
+ err.path = filename;
+ err.message = (filename || 'Jade') + ':' + lineno
+ + '\n' + context + '\n\n' + err.message;
+ throw err;
+};
+
+ return exports;
+
+})({});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/runtime.min.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/runtime.min.js
new file mode 100644
index 0000000..1714efb
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/runtime.min.js
@@ -0,0 +1 @@
+jade=function(exports){Array.isArray||(Array.isArray=function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}),Object.keys||(Object.keys=function(obj){var arr=[];for(var key in obj)obj.hasOwnProperty(key)&&arr.push(key);return arr}),exports.merge=function merge(a,b){var ac=a["class"],bc=b["class"];if(ac||bc)ac=ac||[],bc=bc||[],Array.isArray(ac)||(ac=[ac]),Array.isArray(bc)||(bc=[bc]),ac=ac.filter(nulls),bc=bc.filter(nulls),a["class"]=ac.concat(bc).join(" ");for(var key in b)key!="class"&&(a[key]=b[key]);return a};function nulls(val){return val!=null}return exports.attrs=function attrs(obj,escaped){var buf=[],terse=obj.terse;delete obj.terse;var keys=Object.keys(obj),len=keys.length;if(len){buf.push("");for(var i=0;i/g,">").replace(/"/g,""")},exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");throw err.path=filename,err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message,err},exports}({});
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/test.jade b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/test.jade
new file mode 100644
index 0000000..b3a8988
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/test.jade
@@ -0,0 +1,7 @@
+p.
+ This is a large
+ body of text for
+ this tag.
+
+ Nothing too
+ exciting.
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/head.jade b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/head.jade
new file mode 100644
index 0000000..8515406
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/head.jade
@@ -0,0 +1,5 @@
+head
+ script(src='/jquery.js')
+ yield
+ if false
+ script(src='/jquery.ui.js')
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/index.jade b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/index.jade
new file mode 100644
index 0000000..1032c5f
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/index.jade
@@ -0,0 +1,22 @@
+
+tag = 'p'
+foo = 'bar'
+
+#{tag} value
+#{tag}(foo='bar') value
+#{foo ? 'a' : 'li'}(something) here
+
+mixin item(icon)
+ li
+ if attributes.href
+ a(attributes)
+ img.icon(src=icon)
+ block
+ else
+ span(attributes)
+ img.icon(src=icon)
+ block
+
+ul
+ +item('contact') Contact
+ +item(href='/contact') Contact
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/index.js
new file mode 100644
index 0000000..226e8c0
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/index.js
@@ -0,0 +1,11 @@
+
+/**
+ * Module dependencies.
+ */
+
+var jade = require('../');
+
+jade.renderFile('testing/index.jade', { pretty: true, debug: true, compileDebug: false }, function(err, str){
+ if (err) throw err;
+ console.log(str);
+});
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/layout.jade b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/layout.jade
new file mode 100644
index 0000000..6923cf1
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/layout.jade
@@ -0,0 +1,6 @@
+html
+ include head
+ script(src='/caustic.js')
+ script(src='/app.js')
+ body
+ block content
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/user.jade b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/user.jade
new file mode 100644
index 0000000..3c636b7
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/user.jade
@@ -0,0 +1,7 @@
+h1 Tobi
+p Is a ferret
+
+ul
+ li: a foo
+ li: a bar
+ li: a baz
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/user.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/user.js
new file mode 100644
index 0000000..2ecc45e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/jade/testing/user.js
@@ -0,0 +1,27 @@
+function anonymous(locals, attrs, escape, rethrow) {
+var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow;
+var __jade = [{ lineno: 1, filename: "testing/user.jade" }];
+try {
+var buf = [];
+with (locals || {}) {
+var interp;
+__jade.unshift({ lineno: 1, filename: __jade[0].filename });
+__jade.unshift({ lineno: 1, filename: __jade[0].filename });
+buf.push('Tobi');
+__jade.unshift({ lineno: undefined, filename: __jade[0].filename });
+__jade.shift();
+buf.push('
');
+__jade.shift();
+__jade.unshift({ lineno: 2, filename: __jade[0].filename });
+buf.push('Is a ferret');
+__jade.unshift({ lineno: undefined, filename: __jade[0].filename });
+__jade.shift();
+buf.push('
');
+__jade.shift();
+__jade.shift();
+}
+return buf.join("");
+} catch (err) {
+ rethrow(err, __jade[0].filename, __jade[0].lineno);
+}
+}
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/LICENSE b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/LICENSE
new file mode 100644
index 0000000..9cd87e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/README.md
new file mode 100644
index 0000000..71f5d34
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/README.md
@@ -0,0 +1,20 @@
+# lodash.create v3.1.1
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.create` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.create
+```
+
+In Node.js/io.js:
+
+```js
+var create = require('lodash.create');
+```
+
+See the [documentation](https://lodash.com/docs#create) or [package source](https://github.com/lodash/lodash/blob/3.1.1-npm-packages/lodash.create) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/index.js
new file mode 100644
index 0000000..4fb7215
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/index.js
@@ -0,0 +1,55 @@
+/**
+ * lodash 3.1.1 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+var baseAssign = require('lodash._baseassign'),
+ baseCreate = require('lodash._basecreate'),
+ isIterateeCall = require('lodash._isiterateecall');
+
+/**
+ * Creates an object that inherits from the given `prototype` object. If a
+ * `properties` object is provided its own enumerable properties are assigned
+ * to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+function create(prototype, properties, guard) {
+ var result = baseCreate(prototype);
+ if (guard && isIterateeCall(prototype, properties, guard)) {
+ properties = undefined;
+ }
+ return properties ? baseAssign(result, properties) : result;
+}
+
+module.exports = create;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/LICENSE.txt b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/LICENSE.txt
new file mode 100644
index 0000000..9cd87e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/README.md
new file mode 100644
index 0000000..0aa2309
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/README.md
@@ -0,0 +1,20 @@
+# lodash._baseassign v3.2.0
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseAssign` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._baseassign
+```
+
+In Node.js/io.js:
+
+```js
+var baseAssign = require('lodash._baseassign');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.2.0-npm-packages/lodash._baseassign) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/index.js
new file mode 100644
index 0000000..f5612c8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/index.js
@@ -0,0 +1,27 @@
+/**
+ * lodash 3.2.0 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+var baseCopy = require('lodash._basecopy'),
+ keys = require('lodash.keys');
+
+/**
+ * The base implementation of `_.assign` without support for argument juggling,
+ * multiple sources, and `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, keys(source), object);
+}
+
+module.exports = baseAssign;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/LICENSE.txt b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/LICENSE.txt
new file mode 100644
index 0000000..9cd87e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/README.md
new file mode 100644
index 0000000..acdfa29
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/README.md
@@ -0,0 +1,20 @@
+# lodash._basecopy v3.0.1
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCopy` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._basecopy
+```
+
+In Node.js/io.js:
+
+```js
+var baseCopy = require('lodash._basecopy');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._basecopy) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/index.js
new file mode 100644
index 0000000..b586d31
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/index.js
@@ -0,0 +1,32 @@
+/**
+ * lodash 3.0.1 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @returns {Object} Returns `object`.
+ */
+function baseCopy(source, props, object) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+ object[key] = source[key];
+ }
+ return object;
+}
+
+module.exports = baseCopy;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/package.json
new file mode 100644
index 0000000..0313b15
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash._basecopy/package.json
@@ -0,0 +1,88 @@
+{
+ "name": "lodash._basecopy",
+ "version": "3.0.1",
+ "description": "The modern build of lodash’s internal `baseCopy` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Benjamin Tan",
+ "email": "demoneaux@gmail.com",
+ "url": "https://d10.github.io/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine@iceddev.com",
+ "url": "http://www.iceddev.com/"
+ },
+ {
+ "name": "Kit Cambridge",
+ "email": "github@kitcambridge.be",
+ "url": "http://kitcambridge.be/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash._basecopy@3.0.1",
+ "_shasum": "8da0e6a876cf344c0ad8a54882111dd3c5c7ca36",
+ "_from": "lodash._basecopy@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.7.6",
+ "_nodeVersion": "0.12.2",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8da0e6a876cf344c0ad8a54882111dd3c5c7ca36",
+ "tarball": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/LICENSE b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/LICENSE
new file mode 100644
index 0000000..9cd87e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/README.md
new file mode 100644
index 0000000..5f69a18
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/README.md
@@ -0,0 +1,20 @@
+# lodash.keys v3.1.2
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.keys
+```
+
+In Node.js/io.js:
+
+```js
+var keys = require('lodash.keys');
+```
+
+See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.1.2-npm-packages/lodash.keys) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/index.js
new file mode 100644
index 0000000..f4c1774
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/index.js
@@ -0,0 +1,236 @@
+/**
+ * lodash 3.1.2 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+var getNative = require('lodash._getnative'),
+ isArguments = require('lodash.isarguments'),
+ isArray = require('lodash.isarray');
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^\d+$/;
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeKeys = getNative(Object, 'keys');
+
+/**
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * A fallback implementation of `Object.keys` which creates an array of the
+ * own enumerable property names of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function shimKeys(object) {
+ var props = keysIn(object),
+ propsLength = props.length,
+ length = propsLength && object.length;
+
+ var allowIndexes = !!length && isLength(length) &&
+ (isArray(object) || isArguments(object));
+
+ var index = -1,
+ result = [];
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+var keys = !nativeKeys ? shimKeys : function(object) {
+ var Ctor = object == null ? undefined : object.constructor;
+ if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
+ (typeof object != 'function' && isArrayLike(object))) {
+ return shimKeys(object);
+ }
+ return isObject(object) ? nativeKeys(object) : [];
+};
+
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+ if (object == null) {
+ return [];
+ }
+ if (!isObject(object)) {
+ object = Object(object);
+ }
+ var length = object.length;
+ length = (length && isLength(length) &&
+ (isArray(object) || isArguments(object)) && length) || 0;
+
+ var Ctor = object.constructor,
+ index = -1,
+ isProto = typeof Ctor == 'function' && Ctor.prototype === object,
+ result = Array(length),
+ skipIndexes = length > 0;
+
+ while (++index < length) {
+ result[index] = (index + '');
+ }
+ for (var key in object) {
+ if (!(skipIndexes && isIndex(key, length)) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = keys;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/LICENSE b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/LICENSE
new file mode 100644
index 0000000..9cd87e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/README.md
new file mode 100644
index 0000000..7835cec
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/README.md
@@ -0,0 +1,20 @@
+# lodash._getnative v3.9.1
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `getNative` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._getnative
+```
+
+In Node.js/io.js:
+
+```js
+var getNative = require('lodash._getnative');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.9.1-npm-packages/lodash._getnative) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/index.js
new file mode 100644
index 0000000..a32063d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/index.js
@@ -0,0 +1,137 @@
+/**
+ * lodash 3.9.1 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** `Object#toString` result references. */
+var funcTag = '[object Function]';
+
+/** Used to detect host constructors (Safari > 5). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var fnToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = object == null ? undefined : object[key];
+ return isNative(value) ? value : undefined;
+}
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in older versions of Chrome and Safari which return 'function' for regexes
+ // and Safari 8 equivalents which return 'object' for typed array constructors.
+ return isObject(value) && objToString.call(value) == funcTag;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (isFunction(value)) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+}
+
+module.exports = getNative;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/package.json
new file mode 100644
index 0000000..8f04933
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash._getnative/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "lodash._getnative",
+ "version": "3.9.1",
+ "description": "The modern build of lodash’s internal `getNative` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Benjamin Tan",
+ "email": "demoneaux@gmail.com",
+ "url": "https://d10.github.io/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine@iceddev.com",
+ "url": "http://www.iceddev.com/"
+ },
+ {
+ "name": "Kit Cambridge",
+ "email": "github@kitcambridge.be",
+ "url": "http://kitcambridge.be/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash._getnative@3.9.1",
+ "_shasum": "570bc7dede46d61cdcde687d65d3eecbaa3aaff5",
+ "_from": "lodash._getnative@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.12.0",
+ "_nodeVersion": "0.12.5",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "dist": {
+ "shasum": "570bc7dede46d61cdcde687d65d3eecbaa3aaff5",
+ "tarball": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/LICENSE b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/LICENSE
new file mode 100644
index 0000000..e0c69d5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/README.md
new file mode 100644
index 0000000..eb95fe1
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/README.md
@@ -0,0 +1,18 @@
+# lodash.isarguments v3.1.0
+
+The [lodash](https://lodash.com/) method `_.isArguments` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isarguments
+```
+
+In Node.js:
+```js
+var isArguments = require('lodash.isarguments');
+```
+
+See the [documentation](https://lodash.com/docs#isArguments) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.isarguments) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/index.js
new file mode 100644
index 0000000..042dac5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/index.js
@@ -0,0 +1,229 @@
+/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]';
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+function isArguments(value) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+}
+
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+}
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+}
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+module.exports = isArguments;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/package.json
new file mode 100644
index 0000000..39931f3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarguments/package.json
@@ -0,0 +1,78 @@
+{
+ "name": "lodash.isarguments",
+ "version": "3.1.0",
+ "description": "The lodash method `_.isArguments` exported as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": [
+ "lodash-modularized",
+ "isarguments"
+ ],
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine.bublitz@gmail.com",
+ "url": "https://github.com/phated"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash.isarguments@3.1.0",
+ "_shasum": "2f573d85c6a24289ff00663b491c1d338ff3458a",
+ "_from": "lodash.isarguments@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.15.10",
+ "_nodeVersion": "4.4.7",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "dist": {
+ "shasum": "2f573d85c6a24289ff00663b491c1d338ff3458a",
+ "tarball": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/lodash.isarguments-3.1.0.tgz_1471110006733_0.7392017105594277"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/LICENSE b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/LICENSE
new file mode 100644
index 0000000..9cd87e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/README.md
new file mode 100644
index 0000000..ea274aa
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/README.md
@@ -0,0 +1,20 @@
+# lodash.isarray v3.0.4
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.isArray` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash.isarray
+```
+
+In Node.js/io.js:
+
+```js
+var isArray = require('lodash.isarray');
+```
+
+See the [documentation](https://lodash.com/docs#isArray) or [package source](https://github.com/lodash/lodash/blob/3.0.4-npm-packages/lodash.isarray) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/index.js
new file mode 100644
index 0000000..dd24658
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/index.js
@@ -0,0 +1,180 @@
+/**
+ * lodash 3.0.4 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** `Object#toString` result references. */
+var arrayTag = '[object Array]',
+ funcTag = '[object Function]';
+
+/** Used to detect host constructors (Safari > 5). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var fnToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeIsArray = getNative(Array, 'isArray');
+
+/**
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = object == null ? undefined : object[key];
+ return isNative(value) ? value : undefined;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(function() { return arguments; }());
+ * // => false
+ */
+var isArray = nativeIsArray || function(value) {
+ return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
+};
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in older versions of Chrome and Safari which return 'function' for regexes
+ // and Safari 8 equivalents which return 'object' for typed array constructors.
+ return isObject(value) && objToString.call(value) == funcTag;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (isFunction(value)) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+}
+
+module.exports = isArray;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/package.json
new file mode 100644
index 0000000..a64dadb
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/node_modules/lodash.isarray/package.json
@@ -0,0 +1,94 @@
+{
+ "name": "lodash.isarray",
+ "version": "3.0.4",
+ "description": "The modern build of lodash’s `_.isArray` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": [
+ "lodash",
+ "lodash-modularized",
+ "stdlib",
+ "util"
+ ],
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Benjamin Tan",
+ "email": "demoneaux@gmail.com",
+ "url": "https://d10.github.io/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine@iceddev.com",
+ "url": "http://www.iceddev.com/"
+ },
+ {
+ "name": "Kit Cambridge",
+ "email": "github@kitcambridge.be",
+ "url": "http://kitcambridge.be/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash.isarray@3.0.4",
+ "_shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55",
+ "_from": "lodash.isarray@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.12.0",
+ "_nodeVersion": "0.12.5",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "79e4eb88c36a8122af86f844aa9bcd851b5fbb55",
+ "tarball": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/package.json
new file mode 100644
index 0000000..5e669b8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/node_modules/lodash.keys/package.json
@@ -0,0 +1,99 @@
+{
+ "name": "lodash.keys",
+ "version": "3.1.2",
+ "description": "The modern build of lodash’s `_.keys` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": [
+ "lodash",
+ "lodash-modularized",
+ "stdlib",
+ "util"
+ ],
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Benjamin Tan",
+ "email": "demoneaux@gmail.com",
+ "url": "https://d10.github.io/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine@iceddev.com",
+ "url": "http://www.iceddev.com/"
+ },
+ {
+ "name": "Kit Cambridge",
+ "email": "github@kitcambridge.be",
+ "url": "http://kitcambridge.be/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "dependencies": {
+ "lodash._getnative": "^3.0.0",
+ "lodash.isarguments": "^3.0.0",
+ "lodash.isarray": "^3.0.0"
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash.keys@3.1.2",
+ "_shasum": "4dbc0472b156be50a0b286855d1bd0b0c656098a",
+ "_from": "lodash.keys@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.12.0",
+ "_nodeVersion": "0.12.5",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "4dbc0472b156be50a0b286855d1bd0b0c656098a",
+ "tarball": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/package.json
new file mode 100644
index 0000000..1b277eb
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._baseassign/package.json
@@ -0,0 +1,92 @@
+{
+ "name": "lodash._baseassign",
+ "version": "3.2.0",
+ "description": "The modern build of lodash’s internal `baseAssign` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Benjamin Tan",
+ "email": "demoneaux@gmail.com",
+ "url": "https://d10.github.io/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine@iceddev.com",
+ "url": "http://www.iceddev.com/"
+ },
+ {
+ "name": "Kit Cambridge",
+ "email": "github@kitcambridge.be",
+ "url": "http://kitcambridge.be/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "dependencies": {
+ "lodash._basecopy": "^3.0.0",
+ "lodash.keys": "^3.0.0"
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash._baseassign@3.2.0",
+ "_shasum": "8c38a099500f215ad09e59f1722fd0c52bfe0a4e",
+ "_from": "lodash._baseassign@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.10.0",
+ "_nodeVersion": "0.12.3",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "dist": {
+ "shasum": "8c38a099500f215ad09e59f1722fd0c52bfe0a4e",
+ "tarball": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/LICENSE b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/LICENSE
new file mode 100644
index 0000000..9cd87e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/LICENSE
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/README.md
new file mode 100644
index 0000000..ab02328
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/README.md
@@ -0,0 +1,20 @@
+# lodash._basecreate v3.0.3
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `baseCreate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._basecreate
+```
+
+In Node.js/io.js:
+
+```js
+var baseCreate = require('lodash._basecreate');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash._basecreate) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/index.js
new file mode 100644
index 0000000..df11575
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/index.js
@@ -0,0 +1,57 @@
+/**
+ * lodash 3.0.3 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+ function object() {}
+ return function(prototype) {
+ if (isObject(prototype)) {
+ object.prototype = prototype;
+ var result = new object;
+ object.prototype = undefined;
+ }
+ return result || {};
+ };
+}());
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = baseCreate;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/package.json
new file mode 100644
index 0000000..b9c21e6
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._basecreate/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "lodash._basecreate",
+ "version": "3.0.3",
+ "description": "The modern build of lodash’s internal `baseCreate` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Benjamin Tan",
+ "email": "demoneaux@gmail.com",
+ "url": "https://d10.github.io/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine@iceddev.com",
+ "url": "http://www.iceddev.com/"
+ },
+ {
+ "name": "Kit Cambridge",
+ "email": "github@kitcambridge.be",
+ "url": "http://kitcambridge.be/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash._basecreate@3.0.3",
+ "_shasum": "1bc661614daa7fc311b7d03bf16806a0213cf821",
+ "_from": "lodash._basecreate@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.12.0",
+ "_nodeVersion": "0.12.5",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "1bc661614daa7fc311b7d03bf16806a0213cf821",
+ "tarball": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/LICENSE.txt b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/LICENSE.txt
new file mode 100644
index 0000000..9cd87e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright 2012-2015 The Dojo Foundation
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/README.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/README.md
new file mode 100644
index 0000000..0c5c701
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/README.md
@@ -0,0 +1,20 @@
+# lodash._isiterateecall v3.0.9
+
+The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `isIterateeCall` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
+
+## Installation
+
+Using npm:
+
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._isiterateecall
+```
+
+In Node.js/io.js:
+
+```js
+var isIterateeCall = require('lodash._isiterateecall');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.0.9-npm-packages/lodash._isiterateecall) for more details.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/index.js
new file mode 100644
index 0000000..ea3761b
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/index.js
@@ -0,0 +1,132 @@
+/**
+ * lodash 3.0.9 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^\d+$/;
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+}
+
+/**
+ * Checks if the provided arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
+ */
+function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)) {
+ var other = object[index];
+ return value === value ? (value === other) : (other !== other);
+ }
+ return false;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = isIterateeCall;
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/package.json
new file mode 100644
index 0000000..b166b6d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/node_modules/lodash._isiterateecall/package.json
@@ -0,0 +1,88 @@
+{
+ "name": "lodash._isiterateecall",
+ "version": "3.0.9",
+ "description": "The modern build of lodash’s internal `isIterateeCall` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Benjamin Tan",
+ "email": "demoneaux@gmail.com",
+ "url": "https://d10.github.io/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine@iceddev.com",
+ "url": "http://www.iceddev.com/"
+ },
+ {
+ "name": "Kit Cambridge",
+ "email": "github@kitcambridge.be",
+ "url": "http://kitcambridge.be/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash._isiterateecall@3.0.9",
+ "_shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c",
+ "_from": "lodash._isiterateecall@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.10.1",
+ "_nodeVersion": "2.0.2",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ }
+ ],
+ "dist": {
+ "shasum": "5203ad7ba425fae842460e696db9cf3e6aac057c",
+ "tarball": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/package.json
new file mode 100644
index 0000000..8df513c
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/lodash.create/package.json
@@ -0,0 +1,98 @@
+{
+ "name": "lodash.create",
+ "version": "3.1.1",
+ "description": "The modern build of lodash’s `_.create` as a module.",
+ "homepage": "https://lodash.com/",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "keywords": [
+ "lodash",
+ "lodash-modularized",
+ "stdlib",
+ "util"
+ ],
+ "author": {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ "contributors": [
+ {
+ "name": "John-David Dalton",
+ "email": "john.david.dalton@gmail.com",
+ "url": "http://allyoucanleet.com/"
+ },
+ {
+ "name": "Benjamin Tan",
+ "email": "demoneaux@gmail.com",
+ "url": "https://d10.github.io/"
+ },
+ {
+ "name": "Blaine Bublitz",
+ "email": "blaine@iceddev.com",
+ "url": "http://www.iceddev.com/"
+ },
+ {
+ "name": "Kit Cambridge",
+ "email": "github@kitcambridge.be",
+ "url": "http://kitcambridge.be/"
+ },
+ {
+ "name": "Mathias Bynens",
+ "email": "mathias@qiwi.be",
+ "url": "https://mathiasbynens.be/"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lodash/lodash.git"
+ },
+ "scripts": {
+ "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
+ },
+ "dependencies": {
+ "lodash._baseassign": "^3.0.0",
+ "lodash._basecreate": "^3.0.0",
+ "lodash._isiterateecall": "^3.0.0"
+ },
+ "bugs": {
+ "url": "https://github.com/lodash/lodash/issues"
+ },
+ "_id": "lodash.create@3.1.1",
+ "_shasum": "d7f2849f0dbda7e04682bb8cd72ab022461debe7",
+ "_from": "lodash.create@>=3.1.1 <4.0.0",
+ "_npmVersion": "2.12.0",
+ "_nodeVersion": "0.12.5",
+ "_npmUser": {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jdalton",
+ "email": "john.david.dalton@gmail.com"
+ },
+ {
+ "name": "kitcambridge",
+ "email": "github@kitcambridge.be"
+ },
+ {
+ "name": "mathias",
+ "email": "mathias@qiwi.be"
+ },
+ {
+ "name": "phated",
+ "email": "blaine@iceddev.com"
+ },
+ {
+ "name": "d10",
+ "email": "demoneaux@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "d7f2849f0dbda7e04682bb8cd72ab022461debe7",
+ "tarball": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/.npmignore b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/.npmignore
new file mode 100644
index 0000000..9303c34
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/.npmignore
@@ -0,0 +1,2 @@
+node_modules/
+npm-debug.log
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/.travis.yml b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/.travis.yml
new file mode 100644
index 0000000..c693a93
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
+ - "0.10"
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/LICENSE b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/LICENSE
new file mode 100644
index 0000000..432d1ae
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/LICENSE
@@ -0,0 +1,21 @@
+Copyright 2010 James Halliday (mail@substack.net)
+
+This project is free software released under the MIT/X11 license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/bin/cmd.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/bin/cmd.js
new file mode 100755
index 0000000..d95de15
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/bin/cmd.js
@@ -0,0 +1,33 @@
+#!/usr/bin/env node
+
+var mkdirp = require('../');
+var minimist = require('minimist');
+var fs = require('fs');
+
+var argv = minimist(process.argv.slice(2), {
+ alias: { m: 'mode', h: 'help' },
+ string: [ 'mode' ]
+});
+if (argv.help) {
+ fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout);
+ return;
+}
+
+var paths = argv._.slice();
+var mode = argv.mode ? parseInt(argv.mode, 8) : undefined;
+
+(function next () {
+ if (paths.length === 0) return;
+ var p = paths.shift();
+
+ if (mode === undefined) mkdirp(p, cb)
+ else mkdirp(p, mode, cb)
+
+ function cb (err) {
+ if (err) {
+ console.error(err.message);
+ process.exit(1);
+ }
+ else next();
+ }
+})();
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/bin/usage.txt b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/bin/usage.txt
new file mode 100644
index 0000000..f952aa2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/bin/usage.txt
@@ -0,0 +1,12 @@
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories that
+ don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m, --mode If a directory needs to be created, set the mode as an octal
+ permission string.
+
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/examples/pow.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/examples/pow.js
new file mode 100644
index 0000000..e692421
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/examples/pow.js
@@ -0,0 +1,6 @@
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', function (err) {
+ if (err) console.error(err)
+ else console.log('pow!')
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/index.js
new file mode 100644
index 0000000..a1742b2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/index.js
@@ -0,0 +1,97 @@
+var path = require('path');
+var fs = require('fs');
+
+module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
+
+function mkdirP (p, opts, f, made) {
+ if (typeof opts === 'function') {
+ f = opts;
+ opts = {};
+ }
+ else if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = 0777 & (~process.umask());
+ }
+ if (!made) made = null;
+
+ var cb = f || function () {};
+ p = path.resolve(p);
+
+ xfs.mkdir(p, mode, function (er) {
+ if (!er) {
+ made = made || p;
+ return cb(null, made);
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ mkdirP(path.dirname(p), opts, function (er, made) {
+ if (er) cb(er, made);
+ else mkdirP(p, opts, cb, made);
+ });
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ xfs.stat(p, function (er2, stat) {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) cb(er, made)
+ else cb(null, made);
+ });
+ break;
+ }
+ });
+}
+
+mkdirP.sync = function sync (p, opts, made) {
+ if (!opts || typeof opts !== 'object') {
+ opts = { mode: opts };
+ }
+
+ var mode = opts.mode;
+ var xfs = opts.fs || fs;
+
+ if (mode === undefined) {
+ mode = 0777 & (~process.umask());
+ }
+ if (!made) made = null;
+
+ p = path.resolve(p);
+
+ try {
+ xfs.mkdirSync(p, mode);
+ made = made || p;
+ }
+ catch (err0) {
+ switch (err0.code) {
+ case 'ENOENT' :
+ made = sync(path.dirname(p), opts, made);
+ sync(p, opts, made);
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ var stat;
+ try {
+ stat = xfs.statSync(p);
+ }
+ catch (err1) {
+ throw err0;
+ }
+ if (!stat.isDirectory()) throw err0;
+ break;
+ }
+ }
+
+ return made;
+};
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/.travis.yml b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/.travis.yml
new file mode 100644
index 0000000..cc4dba2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/LICENSE b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/example/parse.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/example/parse.js
new file mode 100644
index 0000000..abff3e8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/example/parse.js
@@ -0,0 +1,2 @@
+var argv = require('../')(process.argv.slice(2));
+console.dir(argv);
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/index.js
new file mode 100644
index 0000000..584f551
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/index.js
@@ -0,0 +1,187 @@
+module.exports = function (args, opts) {
+ if (!opts) opts = {};
+
+ var flags = { bools : {}, strings : {} };
+
+ [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ });
+
+ [].concat(opts.string).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ });
+
+ var aliases = {};
+ Object.keys(opts.alias || {}).forEach(function (key) {
+ aliases[key] = [].concat(opts.alias[key]);
+ aliases[key].forEach(function (x) {
+ aliases[x] = [key].concat(aliases[key].filter(function (y) {
+ return x !== y;
+ }));
+ });
+ });
+
+ var defaults = opts['default'] || {};
+
+ var argv = { _ : [] };
+ Object.keys(flags.bools).forEach(function (key) {
+ setArg(key, defaults[key] === undefined ? false : defaults[key]);
+ });
+
+ var notFlags = [];
+
+ if (args.indexOf('--') !== -1) {
+ notFlags = args.slice(args.indexOf('--')+1);
+ args = args.slice(0, args.indexOf('--'));
+ }
+
+ function setArg (key, val) {
+ var value = !flags.strings[key] && isNumber(val)
+ ? Number(val) : val
+ ;
+ setKey(argv, key.split('.'), value);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), value);
+ });
+ }
+
+ for (var i = 0; i < args.length; i++) {
+ var arg = args[i];
+
+ if (/^--.+=/.test(arg)) {
+ // Using [\s\S] instead of . because js doesn't support the
+ // 'dotall' regex modifier. See:
+ // http://stackoverflow.com/a/1068308/13216
+ var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
+ setArg(m[1], m[2]);
+ }
+ else if (/^--no-.+/.test(arg)) {
+ var key = arg.match(/^--no-(.+)/)[1];
+ setArg(key, false);
+ }
+ else if (/^--.+/.test(arg)) {
+ var key = arg.match(/^--(.+)/)[1];
+ var next = args[i + 1];
+ if (next !== undefined && !/^-/.test(next)
+ && !flags.bools[key]
+ && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
+ setArg(key, next);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next === 'true');
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true);
+ }
+ }
+ else if (/^-[^-]+/.test(arg)) {
+ var letters = arg.slice(1,-1).split('');
+
+ var broken = false;
+ for (var j = 0; j < letters.length; j++) {
+ var next = arg.slice(j+2);
+
+ if (next === '-') {
+ setArg(letters[j], next)
+ continue;
+ }
+
+ if (/[A-Za-z]/.test(letters[j])
+ && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
+ setArg(letters[j], next);
+ broken = true;
+ break;
+ }
+
+ if (letters[j+1] && letters[j+1].match(/\W/)) {
+ setArg(letters[j], arg.slice(j+2));
+ broken = true;
+ break;
+ }
+ else {
+ setArg(letters[j], flags.strings[letters[j]] ? '' : true);
+ }
+ }
+
+ var key = arg.slice(-1)[0];
+ if (!broken && key !== '-') {
+ if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
+ && !flags.bools[key]
+ && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
+ setArg(key, args[i+1]);
+ i++;
+ }
+ else if (args[i+1] && /true|false/.test(args[i+1])) {
+ setArg(key, args[i+1] === 'true');
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true);
+ }
+ }
+ }
+ else {
+ argv._.push(
+ flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+ );
+ }
+ }
+
+ Object.keys(defaults).forEach(function (key) {
+ if (!hasKey(argv, key.split('.'))) {
+ setKey(argv, key.split('.'), defaults[key]);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), defaults[key]);
+ });
+ }
+ });
+
+ notFlags.forEach(function(key) {
+ argv._.push(key);
+ });
+
+ return argv;
+};
+
+function hasKey (obj, keys) {
+ var o = obj;
+ keys.slice(0,-1).forEach(function (key) {
+ o = (o[key] || {});
+ });
+
+ var key = keys[keys.length - 1];
+ return key in o;
+}
+
+function setKey (obj, keys, value) {
+ var o = obj;
+ keys.slice(0,-1).forEach(function (key) {
+ if (o[key] === undefined) o[key] = {};
+ o = o[key];
+ });
+
+ var key = keys[keys.length - 1];
+ if (o[key] === undefined || typeof o[key] === 'boolean') {
+ o[key] = value;
+ }
+ else if (Array.isArray(o[key])) {
+ o[key].push(value);
+ }
+ else {
+ o[key] = [ o[key], value ];
+ }
+}
+
+function isNumber (x) {
+ if (typeof x === 'number') return true;
+ if (/^0x[0-9a-f]+$/i.test(x)) return true;
+ return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+}
+
+function longest (xs) {
+ return Math.max.apply(null, xs.map(function (x) { return x.length }));
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/package.json
new file mode 100644
index 0000000..0c9af0e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "minimist",
+ "version": "0.0.8",
+ "description": "parse argument options",
+ "main": "index.js",
+ "devDependencies": {
+ "tape": "~1.0.4",
+ "tap": "~0.4.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "ff/5",
+ "firefox/latest",
+ "chrome/10",
+ "chrome/latest",
+ "safari/5.1",
+ "safari/latest",
+ "opera/12"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/minimist.git"
+ },
+ "homepage": "https://github.com/substack/minimist",
+ "keywords": [
+ "argv",
+ "getopt",
+ "parser",
+ "optimist"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/substack/minimist/issues"
+ },
+ "_id": "minimist@0.0.8",
+ "dist": {
+ "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
+ "tarball": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
+ },
+ "_from": "minimist@0.0.8",
+ "_npmVersion": "1.4.3",
+ "_npmUser": {
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ }
+ ],
+ "directories": {},
+ "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
+ "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/readme.markdown b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/readme.markdown
new file mode 100644
index 0000000..c256353
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/readme.markdown
@@ -0,0 +1,73 @@
+# minimist
+
+parse argument options
+
+This module is the guts of optimist's argument parser without all the
+fanciful decoration.
+
+[](http://ci.testling.com/substack/minimist)
+
+[](http://travis-ci.org/substack/minimist)
+
+# example
+
+``` js
+var argv = require('minimist')(process.argv.slice(2));
+console.dir(argv);
+```
+
+```
+$ node example/parse.js -a beep -b boop
+{ _: [], a: 'beep', b: 'boop' }
+```
+
+```
+$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
+{ _: [ 'foo', 'bar', 'baz' ],
+ x: 3,
+ y: 4,
+ n: 5,
+ a: true,
+ b: true,
+ c: true,
+ beep: 'boop' }
+```
+
+# methods
+
+``` js
+var parseArgs = require('minimist')
+```
+
+## var argv = parseArgs(args, opts={})
+
+Return an argument object `argv` populated with the array arguments from `args`.
+
+`argv._` contains all the arguments that didn't have an option associated with
+them.
+
+Numeric-looking arguments will be returned as numbers unless `opts.string` or
+`opts.boolean` is set for that argument name.
+
+Any arguments after `'--'` will not be parsed and will end up in `argv._`.
+
+options can be:
+
+* `opts.string` - a string or array of strings argument names to always treat as
+strings
+* `opts.boolean` - a string or array of strings to always treat as booleans
+* `opts.alias` - an object mapping string names to strings or arrays of string
+argument names to use as aliases
+* `opts.default` - an object mapping string argument names to default values
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install minimist
+```
+
+# license
+
+MIT
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/dash.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/dash.js
new file mode 100644
index 0000000..8b034b9
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/dash.js
@@ -0,0 +1,24 @@
+var parse = require('../');
+var test = require('tape');
+
+test('-', function (t) {
+ t.plan(5);
+ t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
+ t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
+ t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
+ t.deepEqual(
+ parse([ '-b', '-' ], { boolean: 'b' }),
+ { b: true, _: [ '-' ] }
+ );
+ t.deepEqual(
+ parse([ '-s', '-' ], { string: 's' }),
+ { s: '-', _: [] }
+ );
+});
+
+test('-a -- b', function (t) {
+ t.plan(3);
+ t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+ t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+ t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
new file mode 100644
index 0000000..f0041ee
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
@@ -0,0 +1,20 @@
+var test = require('tape');
+var parse = require('../');
+
+test('boolean default true', function (t) {
+ var argv = parse([], {
+ boolean: 'sometrue',
+ default: { sometrue: true }
+ });
+ t.equal(argv.sometrue, true);
+ t.end();
+});
+
+test('boolean default false', function (t) {
+ var argv = parse([], {
+ boolean: 'somefalse',
+ default: { somefalse: false }
+ });
+ t.equal(argv.somefalse, false);
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/dotted.js
new file mode 100644
index 0000000..ef0ae34
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/dotted.js
@@ -0,0 +1,16 @@
+var parse = require('../');
+var test = require('tape');
+
+test('dotted alias', function (t) {
+ var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
+ t.equal(argv.a.b, 22);
+ t.equal(argv.aa.bb, 22);
+ t.end();
+});
+
+test('dotted default', function (t) {
+ var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
+ t.equal(argv.a.b, 11);
+ t.equal(argv.aa.bb, 11);
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/long.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/long.js
new file mode 100644
index 0000000..5d3a1e0
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/long.js
@@ -0,0 +1,31 @@
+var test = require('tape');
+var parse = require('../');
+
+test('long opts', function (t) {
+ t.deepEqual(
+ parse([ '--bool' ]),
+ { bool : true, _ : [] },
+ 'long boolean'
+ );
+ t.deepEqual(
+ parse([ '--pow', 'xixxle' ]),
+ { pow : 'xixxle', _ : [] },
+ 'long capture sp'
+ );
+ t.deepEqual(
+ parse([ '--pow=xixxle' ]),
+ { pow : 'xixxle', _ : [] },
+ 'long capture eq'
+ );
+ t.deepEqual(
+ parse([ '--host', 'localhost', '--port', '555' ]),
+ { host : 'localhost', port : 555, _ : [] },
+ 'long captures sp'
+ );
+ t.deepEqual(
+ parse([ '--host=localhost', '--port=555' ]),
+ { host : 'localhost', port : 555, _ : [] },
+ 'long captures eq'
+ );
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/parse.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/parse.js
new file mode 100644
index 0000000..8a90646
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/parse.js
@@ -0,0 +1,318 @@
+var parse = require('../');
+var test = require('tape');
+
+test('parse args', function (t) {
+ t.deepEqual(
+ parse([ '--no-moo' ]),
+ { moo : false, _ : [] },
+ 'no'
+ );
+ t.deepEqual(
+ parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
+ { v : ['a','b','c'], _ : [] },
+ 'multi'
+ );
+ t.end();
+});
+
+test('comprehensive', function (t) {
+ t.deepEqual(
+ parse([
+ '--name=meowmers', 'bare', '-cats', 'woo',
+ '-h', 'awesome', '--multi=quux',
+ '--key', 'value',
+ '-b', '--bool', '--no-meep', '--multi=baz',
+ '--', '--not-a-flag', 'eek'
+ ]),
+ {
+ c : true,
+ a : true,
+ t : true,
+ s : 'woo',
+ h : 'awesome',
+ b : true,
+ bool : true,
+ key : 'value',
+ multi : [ 'quux', 'baz' ],
+ meep : false,
+ name : 'meowmers',
+ _ : [ 'bare', '--not-a-flag', 'eek' ]
+ }
+ );
+ t.end();
+});
+
+test('nums', function (t) {
+ var argv = parse([
+ '-x', '1234',
+ '-y', '5.67',
+ '-z', '1e7',
+ '-w', '10f',
+ '--hex', '0xdeadbeef',
+ '789'
+ ]);
+ t.deepEqual(argv, {
+ x : 1234,
+ y : 5.67,
+ z : 1e7,
+ w : '10f',
+ hex : 0xdeadbeef,
+ _ : [ 789 ]
+ });
+ t.deepEqual(typeof argv.x, 'number');
+ t.deepEqual(typeof argv.y, 'number');
+ t.deepEqual(typeof argv.z, 'number');
+ t.deepEqual(typeof argv.w, 'string');
+ t.deepEqual(typeof argv.hex, 'number');
+ t.deepEqual(typeof argv._[0], 'number');
+ t.end();
+});
+
+test('flag boolean', function (t) {
+ var argv = parse([ '-t', 'moo' ], { boolean: 't' });
+ t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+});
+
+test('flag boolean value', function (t) {
+ var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
+ boolean: [ 't', 'verbose' ],
+ default: { verbose: true }
+ });
+
+ t.deepEqual(argv, {
+ verbose: false,
+ t: true,
+ _: ['moo']
+ });
+
+ t.deepEqual(typeof argv.verbose, 'boolean');
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+});
+
+test('flag boolean default false', function (t) {
+ var argv = parse(['moo'], {
+ boolean: ['t', 'verbose'],
+ default: { verbose: false, t: false }
+ });
+
+ t.deepEqual(argv, {
+ verbose: false,
+ t: false,
+ _: ['moo']
+ });
+
+ t.deepEqual(typeof argv.verbose, 'boolean');
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+
+});
+
+test('boolean groups', function (t) {
+ var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
+ boolean: ['x','y','z']
+ });
+
+ t.deepEqual(argv, {
+ x : true,
+ y : false,
+ z : true,
+ _ : [ 'one', 'two', 'three' ]
+ });
+
+ t.deepEqual(typeof argv.x, 'boolean');
+ t.deepEqual(typeof argv.y, 'boolean');
+ t.deepEqual(typeof argv.z, 'boolean');
+ t.end();
+});
+
+test('newlines in params' , function (t) {
+ var args = parse([ '-s', "X\nX" ])
+ t.deepEqual(args, { _ : [], s : "X\nX" });
+
+ // reproduce in bash:
+ // VALUE="new
+ // line"
+ // node program.js --s="$VALUE"
+ args = parse([ "--s=X\nX" ])
+ t.deepEqual(args, { _ : [], s : "X\nX" });
+ t.end();
+});
+
+test('strings' , function (t) {
+ var s = parse([ '-s', '0001234' ], { string: 's' }).s;
+ t.equal(s, '0001234');
+ t.equal(typeof s, 'string');
+
+ var x = parse([ '-x', '56' ], { string: 'x' }).x;
+ t.equal(x, '56');
+ t.equal(typeof x, 'string');
+ t.end();
+});
+
+test('stringArgs', function (t) {
+ var s = parse([ ' ', ' ' ], { string: '_' })._;
+ t.same(s.length, 2);
+ t.same(typeof s[0], 'string');
+ t.same(s[0], ' ');
+ t.same(typeof s[1], 'string');
+ t.same(s[1], ' ');
+ t.end();
+});
+
+test('empty strings', function(t) {
+ var s = parse([ '-s' ], { string: 's' }).s;
+ t.equal(s, '');
+ t.equal(typeof s, 'string');
+
+ var str = parse([ '--str' ], { string: 'str' }).str;
+ t.equal(str, '');
+ t.equal(typeof str, 'string');
+
+ var letters = parse([ '-art' ], {
+ string: [ 'a', 't' ]
+ });
+
+ t.equal(letters.a, '');
+ t.equal(letters.r, true);
+ t.equal(letters.t, '');
+
+ t.end();
+});
+
+
+test('slashBreak', function (t) {
+ t.same(
+ parse([ '-I/foo/bar/baz' ]),
+ { I : '/foo/bar/baz', _ : [] }
+ );
+ t.same(
+ parse([ '-xyz/foo/bar/baz' ]),
+ { x : true, y : true, z : '/foo/bar/baz', _ : [] }
+ );
+ t.end();
+});
+
+test('alias', function (t) {
+ var argv = parse([ '-f', '11', '--zoom', '55' ], {
+ alias: { z: 'zoom' }
+ });
+ t.equal(argv.zoom, 55);
+ t.equal(argv.z, argv.zoom);
+ t.equal(argv.f, 11);
+ t.end();
+});
+
+test('multiAlias', function (t) {
+ var argv = parse([ '-f', '11', '--zoom', '55' ], {
+ alias: { z: [ 'zm', 'zoom' ] }
+ });
+ t.equal(argv.zoom, 55);
+ t.equal(argv.z, argv.zoom);
+ t.equal(argv.z, argv.zm);
+ t.equal(argv.f, 11);
+ t.end();
+});
+
+test('nested dotted objects', function (t) {
+ var argv = parse([
+ '--foo.bar', '3', '--foo.baz', '4',
+ '--foo.quux.quibble', '5', '--foo.quux.o_O',
+ '--beep.boop'
+ ]);
+
+ t.same(argv.foo, {
+ bar : 3,
+ baz : 4,
+ quux : {
+ quibble : 5,
+ o_O : true
+ }
+ });
+ t.same(argv.beep, { boop : true });
+ t.end();
+});
+
+test('boolean and alias with chainable api', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ herp: { alias: 'h', boolean: true }
+ };
+ var aliasedArgv = parse(aliased, {
+ boolean: 'herp',
+ alias: { h: 'herp' }
+ });
+ var propertyArgv = parse(regular, {
+ boolean: 'herp',
+ alias: { h: 'herp' }
+ });
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias with options hash', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ alias: { 'h': 'herp' },
+ boolean: 'herp'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias using explicit true', function (t) {
+ var aliased = [ '-h', 'true' ];
+ var regular = [ '--herp', 'true' ];
+ var opts = {
+ alias: { h: 'herp' },
+ boolean: 'h'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ ]
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+// regression, see https://github.com/substack/node-optimist/issues/71
+test('boolean and --x=true', function(t) {
+ var parsed = parse(['--boool', '--other=true'], {
+ boolean: 'boool'
+ });
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'true');
+
+ parsed = parse(['--boool', '--other=false'], {
+ boolean: 'boool'
+ });
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'false');
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
new file mode 100644
index 0000000..21851b0
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
@@ -0,0 +1,9 @@
+var parse = require('../');
+var test = require('tape');
+
+test('parse with modifier functions' , function (t) {
+ t.plan(1);
+
+ var argv = parse([ '-b', '123' ], { boolean: 'b' });
+ t.deepEqual(argv, { b: true, _: ['123'] });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/short.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/short.js
new file mode 100644
index 0000000..d513a1c
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/short.js
@@ -0,0 +1,67 @@
+var parse = require('../');
+var test = require('tape');
+
+test('numeric short args', function (t) {
+ t.plan(2);
+ t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
+ t.deepEqual(
+ parse([ '-123', '456' ]),
+ { 1: true, 2: true, 3: 456, _: [] }
+ );
+});
+
+test('short', function (t) {
+ t.deepEqual(
+ parse([ '-b' ]),
+ { b : true, _ : [] },
+ 'short boolean'
+ );
+ t.deepEqual(
+ parse([ 'foo', 'bar', 'baz' ]),
+ { _ : [ 'foo', 'bar', 'baz' ] },
+ 'bare'
+ );
+ t.deepEqual(
+ parse([ '-cats' ]),
+ { c : true, a : true, t : true, s : true, _ : [] },
+ 'group'
+ );
+ t.deepEqual(
+ parse([ '-cats', 'meow' ]),
+ { c : true, a : true, t : true, s : 'meow', _ : [] },
+ 'short group next'
+ );
+ t.deepEqual(
+ parse([ '-h', 'localhost' ]),
+ { h : 'localhost', _ : [] },
+ 'short capture'
+ );
+ t.deepEqual(
+ parse([ '-h', 'localhost', '-p', '555' ]),
+ { h : 'localhost', p : 555, _ : [] },
+ 'short captures'
+ );
+ t.end();
+});
+
+test('mixed short bool and capture', function (t) {
+ t.same(
+ parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+ {
+ f : true, p : 555, h : 'localhost',
+ _ : [ 'script.js' ]
+ }
+ );
+ t.end();
+});
+
+test('short and long', function (t) {
+ t.deepEqual(
+ parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+ {
+ f : true, p : 555, h : 'localhost',
+ _ : [ 'script.js' ]
+ }
+ );
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
new file mode 100644
index 0000000..8a52a58
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
@@ -0,0 +1,8 @@
+var parse = require('../');
+var test = require('tape');
+
+test('whitespace should be whitespace' , function (t) {
+ t.plan(1);
+ var x = parse([ '-x', '\t' ]).x;
+ t.equal(x, '\t');
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/package.json
new file mode 100644
index 0000000..9f79ddf
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "mkdirp",
+ "description": "Recursively mkdir, like `mkdir -p`",
+ "version": "0.5.0",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "main": "./index",
+ "keywords": [
+ "mkdir",
+ "directory"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/substack/node-mkdirp.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "dependencies": {
+ "minimist": "0.0.8"
+ },
+ "devDependencies": {
+ "tap": "~0.4.0",
+ "mock-fs": "~2.2.0"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/substack/node-mkdirp/issues"
+ },
+ "homepage": "https://github.com/substack/node-mkdirp",
+ "_id": "mkdirp@0.5.0",
+ "dist": {
+ "shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12",
+ "tarball": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz"
+ },
+ "_from": "mkdirp@0.5.0",
+ "_npmVersion": "1.4.3",
+ "_npmUser": {
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ }
+ ],
+ "directories": {},
+ "_shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12",
+ "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/readme.markdown b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/readme.markdown
new file mode 100644
index 0000000..3cc1315
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/readme.markdown
@@ -0,0 +1,100 @@
+# mkdirp
+
+Like `mkdir -p`, but in node.js!
+
+[](http://travis-ci.org/substack/node-mkdirp)
+
+# example
+
+## pow.js
+
+```js
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', function (err) {
+ if (err) console.error(err)
+ else console.log('pow!')
+});
+```
+
+Output
+
+```
+pow!
+```
+
+And now /tmp/foo/bar/baz exists, huzzah!
+
+# methods
+
+```js
+var mkdirp = require('mkdirp');
+```
+
+## mkdirp(dir, opts, cb)
+
+Create a new directory and any necessary subdirectories at `dir` with octal
+permission string `opts.mode`. If `opts` is a non-object, it will be treated as
+the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+`cb(err, made)` fires with the error or the first directory `made`
+that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and
+`opts.fs.stat(path, cb)`.
+
+## mkdirp.sync(dir, opts)
+
+Synchronously create a new directory and any necessary subdirectories at `dir`
+with octal permission string `opts.mode`. If `opts` is a non-object, it will be
+treated as the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+Returns the first directory that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and
+`opts.fs.statSync(path)`.
+
+# usage
+
+This package also ships with a `mkdirp` command.
+
+```
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+ Create each supplied directory including any necessary parent directories that
+ don't yet exist.
+
+ If the directory already exists, do nothing.
+
+OPTIONS are:
+
+ -m, --mode If a directory needs to be created, set the mode as an octal
+ permission string.
+
+```
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install mkdirp
+```
+
+to get the library, or
+
+```
+npm install -g mkdirp
+```
+
+to get the command.
+
+# license
+
+MIT
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/chmod.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/chmod.js
new file mode 100644
index 0000000..520dcb8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/chmod.js
@@ -0,0 +1,38 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+var ps = [ '', 'tmp' ];
+
+for (var i = 0; i < 25; i++) {
+ var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ ps.push(dir);
+}
+
+var file = ps.join('/');
+
+test('chmod-pre', function (t) {
+ var mode = 0744
+ mkdirp(file, mode, function (er) {
+ t.ifError(er, 'should not error');
+ fs.stat(file, function (er, stat) {
+ t.ifError(er, 'should exist');
+ t.ok(stat && stat.isDirectory(), 'should be directory');
+ t.equal(stat && stat.mode & 0777, mode, 'should be 0744');
+ t.end();
+ });
+ });
+});
+
+test('chmod', function (t) {
+ var mode = 0755
+ mkdirp(file, mode, function (er) {
+ t.ifError(er, 'should not error');
+ fs.stat(file, function (er, stat) {
+ t.ifError(er, 'should exist');
+ t.ok(stat && stat.isDirectory(), 'should be directory');
+ t.end();
+ });
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/clobber.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/clobber.js
new file mode 100644
index 0000000..0eb7099
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/clobber.js
@@ -0,0 +1,37 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+var ps = [ '', 'tmp' ];
+
+for (var i = 0; i < 25; i++) {
+ var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ ps.push(dir);
+}
+
+var file = ps.join('/');
+
+// a file in the way
+var itw = ps.slice(0, 3).join('/');
+
+
+test('clobber-pre', function (t) {
+ console.error("about to write to "+itw)
+ fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
+
+ fs.stat(itw, function (er, stat) {
+ t.ifError(er)
+ t.ok(stat && stat.isFile(), 'should be file')
+ t.end()
+ })
+})
+
+test('clobber', function (t) {
+ t.plan(2);
+ mkdirp(file, 0755, function (err) {
+ t.ok(err);
+ t.equal(err.code, 'ENOTDIR');
+ t.end();
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/mkdirp.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/mkdirp.js
new file mode 100644
index 0000000..3b624dd
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/mkdirp.js
@@ -0,0 +1,26 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('woo', function (t) {
+ t.plan(5);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ mkdirp(file, 0755, function (err) {
+ t.ifError(err);
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ })
+ })
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/opts_fs.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/opts_fs.js
new file mode 100644
index 0000000..f1fbeca
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/opts_fs.js
@@ -0,0 +1,27 @@
+var mkdirp = require('../');
+var path = require('path');
+var test = require('tap').test;
+var mockfs = require('mock-fs');
+
+test('opts.fs', function (t) {
+ t.plan(5);
+
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/beep/boop/' + [x,y,z].join('/');
+ var xfs = mockfs.fs();
+
+ mkdirp(file, { fs: xfs, mode: 0755 }, function (err) {
+ t.ifError(err);
+ xfs.exists(file, function (ex) {
+ t.ok(ex, 'created file');
+ xfs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ });
+ });
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/opts_fs_sync.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/opts_fs_sync.js
new file mode 100644
index 0000000..224b506
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/opts_fs_sync.js
@@ -0,0 +1,25 @@
+var mkdirp = require('../');
+var path = require('path');
+var test = require('tap').test;
+var mockfs = require('mock-fs');
+
+test('opts.fs sync', function (t) {
+ t.plan(4);
+
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/beep/boop/' + [x,y,z].join('/');
+ var xfs = mockfs.fs();
+
+ mkdirp.sync(file, { fs: xfs, mode: 0755 });
+ xfs.exists(file, function (ex) {
+ t.ok(ex, 'created file');
+ xfs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ });
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/perm.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/perm.js
new file mode 100644
index 0000000..2c97590
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/perm.js
@@ -0,0 +1,30 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('async perm', function (t) {
+ t.plan(5);
+ var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
+
+ mkdirp(file, 0755, function (err) {
+ t.ifError(err);
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ })
+ })
+ });
+});
+
+test('async root perm', function (t) {
+ mkdirp('/tmp', 0755, function (err) {
+ if (err) t.fail(err);
+ t.end();
+ });
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/perm_sync.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/perm_sync.js
new file mode 100644
index 0000000..327e54b
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/perm_sync.js
@@ -0,0 +1,34 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('sync perm', function (t) {
+ t.plan(4);
+ var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
+
+ mkdirp.sync(file, 0755);
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ });
+ });
+});
+
+test('sync root perm', function (t) {
+ t.plan(3);
+
+ var file = '/tmp';
+ mkdirp.sync(file, 0755);
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ })
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/race.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/race.js
new file mode 100644
index 0000000..7c295f4
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/race.js
@@ -0,0 +1,40 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('race', function (t) {
+ t.plan(6);
+ var ps = [ '', 'tmp' ];
+
+ for (var i = 0; i < 25; i++) {
+ var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ ps.push(dir);
+ }
+ var file = ps.join('/');
+
+ var res = 2;
+ mk(file, function () {
+ if (--res === 0) t.end();
+ });
+
+ mk(file, function () {
+ if (--res === 0) t.end();
+ });
+
+ function mk (file, cb) {
+ mkdirp(file, 0755, function (err) {
+ t.ifError(err);
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ if (cb) cb();
+ });
+ })
+ });
+ }
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/rel.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/rel.js
new file mode 100644
index 0000000..d1f175c
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/rel.js
@@ -0,0 +1,30 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('rel', function (t) {
+ t.plan(5);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var cwd = process.cwd();
+ process.chdir('/tmp');
+
+ var file = [x,y,z].join('/');
+
+ mkdirp(file, 0755, function (err) {
+ t.ifError(err);
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ process.chdir(cwd);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ })
+ })
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/return.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/return.js
new file mode 100644
index 0000000..bce68e5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/return.js
@@ -0,0 +1,25 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('return value', function (t) {
+ t.plan(4);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ // should return the first dir created.
+ // By this point, it would be profoundly surprising if /tmp didn't
+ // already exist, since every other test makes things in there.
+ mkdirp(file, function (err, made) {
+ t.ifError(err);
+ t.equal(made, '/tmp/' + x);
+ mkdirp(file, function (err, made) {
+ t.ifError(err);
+ t.equal(made, null);
+ });
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/return_sync.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/return_sync.js
new file mode 100644
index 0000000..7c222d3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/return_sync.js
@@ -0,0 +1,24 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('return value', function (t) {
+ t.plan(2);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ // should return the first dir created.
+ // By this point, it would be profoundly surprising if /tmp didn't
+ // already exist, since every other test makes things in there.
+ // Note that this will throw on failure, which will fail the test.
+ var made = mkdirp.sync(file);
+ t.equal(made, '/tmp/' + x);
+
+ // making the same file again should have no effect.
+ made = mkdirp.sync(file);
+ t.equal(made, null);
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/root.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/root.js
new file mode 100644
index 0000000..97ad7a2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/root.js
@@ -0,0 +1,18 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('root', function (t) {
+ // '/' on unix, 'c:/' on windows.
+ var file = path.resolve('/');
+
+ mkdirp(file, 0755, function (err) {
+ if (err) throw err
+ fs.stat(file, function (er, stat) {
+ if (er) throw er
+ t.ok(stat.isDirectory(), 'target is a directory');
+ t.end();
+ })
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/sync.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/sync.js
new file mode 100644
index 0000000..88fa432
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/sync.js
@@ -0,0 +1,30 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('sync', function (t) {
+ t.plan(4);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ try {
+ mkdirp.sync(file, 0755);
+ } catch (err) {
+ t.fail(err);
+ return t.end();
+ }
+
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ });
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/umask.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/umask.js
new file mode 100644
index 0000000..82c393a
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/umask.js
@@ -0,0 +1,26 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('implicit mode from umask', function (t) {
+ t.plan(5);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ mkdirp(file, function (err) {
+ t.ifError(err);
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, 0777 & (~process.umask()));
+ t.ok(stat.isDirectory(), 'target not a directory');
+ });
+ })
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/umask_sync.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/umask_sync.js
new file mode 100644
index 0000000..e537fbe
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/mkdirp/test/umask_sync.js
@@ -0,0 +1,30 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('umask sync modes', function (t) {
+ t.plan(4);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ try {
+ mkdirp.sync(file);
+ } catch (err) {
+ t.fail(err);
+ return t.end();
+ }
+
+ exists(file, function (ex) {
+ t.ok(ex, 'file created');
+ fs.stat(file, function (err, stat) {
+ t.ifError(err);
+ t.equal(stat.mode & 0777, (0777 & (~process.umask())));
+ t.ok(stat.isDirectory(), 'target not a directory');
+ });
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/cli.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/cli.js
new file mode 100755
index 0000000..e746987
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/cli.js
@@ -0,0 +1,29 @@
+#!/usr/bin/env node
+'use strict';
+var pkg = require('./package.json');
+var supportsColor = require('./');
+var argv = process.argv.slice(2);
+
+function help() {
+ console.log([
+ '',
+ ' ' + pkg.description,
+ '',
+ ' Usage',
+ ' supports-color',
+ '',
+ ' Exits with code 0 if color is supported and 1 if not'
+ ].join('\n'));
+}
+
+if (argv.indexOf('--help') !== -1) {
+ help();
+ return;
+}
+
+if (argv.indexOf('--version') !== -1) {
+ console.log(pkg.version);
+ return;
+}
+
+process.exit(supportsColor ? 0 : 1);
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/index.js b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/index.js
new file mode 100644
index 0000000..a2b9784
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/index.js
@@ -0,0 +1,39 @@
+'use strict';
+var argv = process.argv;
+
+module.exports = (function () {
+ if (argv.indexOf('--no-color') !== -1 ||
+ argv.indexOf('--no-colors') !== -1 ||
+ argv.indexOf('--color=false') !== -1) {
+ return false;
+ }
+
+ if (argv.indexOf('--color') !== -1 ||
+ argv.indexOf('--colors') !== -1 ||
+ argv.indexOf('--color=true') !== -1 ||
+ argv.indexOf('--color=always') !== -1) {
+ return true;
+ }
+
+ if (process.stdout && !process.stdout.isTTY) {
+ return false;
+ }
+
+ if (process.platform === 'win32') {
+ return true;
+ }
+
+ if ('COLORTERM' in process.env) {
+ return true;
+ }
+
+ if (process.env.TERM === 'dumb') {
+ return false;
+ }
+
+ if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
+ return true;
+ }
+
+ return false;
+})();
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/package.json
new file mode 100644
index 0000000..cf4f88a
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "supports-color",
+ "version": "1.2.0",
+ "description": "Detect whether a terminal supports color",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sindresorhus/supports-color"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "bin": {
+ "supports-color": "cli.js"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js",
+ "cli.js"
+ ],
+ "keywords": [
+ "cli",
+ "bin",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "supports",
+ "capability",
+ "detect"
+ ],
+ "devDependencies": {
+ "mocha": "*",
+ "require-uncached": "^1.0.2"
+ },
+ "gitHead": "e1815a472ebb59612e485096ae31a394e47d3c93",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/supports-color/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/supports-color",
+ "_id": "supports-color@1.2.0",
+ "_shasum": "ff1ed1e61169d06b3cf2d588e188b18d8847e17e",
+ "_from": "supports-color@1.2.0",
+ "_npmVersion": "2.1.2",
+ "_nodeVersion": "0.10.32",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ {
+ "name": "jbnicolai",
+ "email": "jappelman@xebia.com"
+ }
+ ],
+ "dist": {
+ "shasum": "ff1ed1e61169d06b3cf2d588e188b18d8847e17e",
+ "tarball": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/readme.md b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/readme.md
new file mode 100644
index 0000000..32d4f46
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/node_modules/supports-color/readme.md
@@ -0,0 +1,44 @@
+# supports-color [](https://travis-ci.org/sindresorhus/supports-color)
+
+> Detect whether a terminal supports color
+
+
+## Install
+
+```sh
+$ npm install --save supports-color
+```
+
+
+## Usage
+
+```js
+var supportsColor = require('supports-color');
+
+if (supportsColor) {
+ console.log('Terminal supports color');
+}
+```
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+
+## CLI
+
+```sh
+$ npm install --global supports-color
+```
+
+```
+$ supports-color --help
+
+ Usage
+ supports-color
+
+ Exits with code 0 if color is supported and 1 if not
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/package.json b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/package.json
new file mode 100644
index 0000000..b9bb027
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/mocha-nightwatch/package.json
@@ -0,0 +1,103 @@
+{
+ "name": "mocha-nightwatch",
+ "version": "2.2.9",
+ "description": "simple, flexible, fun test framework",
+ "keywords": [
+ "mocha",
+ "test",
+ "bdd",
+ "tdd",
+ "tap",
+ "nightwatch"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/beatfactor/mocha.git"
+ },
+ "maintainers": [
+ {
+ "name": "beatfactor",
+ "email": "getintouch@beatfactor.net"
+ }
+ ],
+ "main": "./index",
+ "bin": {
+ "mocha-nightwatch": "./bin/mocha",
+ "_mocha-nightwatch": "./bin/_mocha"
+ },
+ "engines": {
+ "node": ">= 0.8.x"
+ },
+ "scripts": {
+ "test": "make test-all"
+ },
+ "dependencies": {
+ "commander": "2.3.0",
+ "debug": "2.2.0",
+ "diff": "1.4.0",
+ "escape-string-regexp": "1.0.2",
+ "glob": "3.2.3",
+ "growl": "1.8.1",
+ "jade": "0.26.3",
+ "lodash.create": "^3.1.1",
+ "mkdirp": "0.5.0",
+ "supports-color": "1.2.0"
+ },
+ "devDependencies": {
+ "browser-stdout": "^1.2.0",
+ "browserify": "10.2.4",
+ "coffee-script": "~1.8.0",
+ "eslint": "~0.23.0",
+ "should": "~4.0.0",
+ "through2": "~0.6.5"
+ },
+ "files": [
+ "bin",
+ "images",
+ "lib",
+ "index.js",
+ "mocha.css",
+ "mocha.js",
+ "LICENSE"
+ ],
+ "browser": {
+ "debug": "./lib/browser/debug.js",
+ "events": "./lib/browser/events.js",
+ "tty": "./lib/browser/tty.js"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/mochajs/mocha/master/LICENSE"
+ }
+ ],
+ "gitHead": "28e31015403809a9f43e18ba7335b6c7a1c19d31",
+ "bugs": {
+ "url": "https://github.com/beatfactor/mocha/issues"
+ },
+ "homepage": "https://github.com/beatfactor/mocha#readme",
+ "_id": "mocha-nightwatch@2.2.9",
+ "_shasum": "284ce73abbefe1a73cc52679917dd19fd2b29f41",
+ "_from": "mocha-nightwatch@2.2.9",
+ "_npmVersion": "2.14.7",
+ "_nodeVersion": "4.2.1",
+ "_npmUser": {
+ "name": "beatfactor",
+ "email": "getintouch@beatfactor.net"
+ },
+ "dist": {
+ "shasum": "284ce73abbefe1a73cc52679917dd19fd2b29f41",
+ "tarball": "https://registry.npmjs.org/mocha-nightwatch/-/mocha-nightwatch-2.2.9.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/mocha-nightwatch-2.2.9.tgz_1464120645105_0.7148332400247455"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mocha-nightwatch/-/mocha-nightwatch-2.2.9.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/.travis.yml b/tests/node_modules/nightwatch/node_modules/optimist/.travis.yml
new file mode 100644
index 0000000..cc4dba2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/LICENSE b/tests/node_modules/nightwatch/node_modules/optimist/LICENSE
new file mode 100644
index 0000000..432d1ae
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/LICENSE
@@ -0,0 +1,21 @@
+Copyright 2010 James Halliday (mail@substack.net)
+
+This project is free software released under the MIT/X11 license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/bool.js b/tests/node_modules/nightwatch/node_modules/optimist/example/bool.js
new file mode 100644
index 0000000..a998fb7
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/bool.js
@@ -0,0 +1,10 @@
+#!/usr/bin/env node
+var util = require('util');
+var argv = require('optimist').argv;
+
+if (argv.s) {
+ util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');
+}
+console.log(
+ (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')
+);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/boolean_double.js b/tests/node_modules/nightwatch/node_modules/optimist/example/boolean_double.js
new file mode 100644
index 0000000..a35a7e6
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/boolean_double.js
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+var argv = require('optimist')
+ .boolean(['x','y','z'])
+ .argv
+;
+console.dir([ argv.x, argv.y, argv.z ]);
+console.dir(argv._);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/boolean_single.js b/tests/node_modules/nightwatch/node_modules/optimist/example/boolean_single.js
new file mode 100644
index 0000000..017bb68
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/boolean_single.js
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+var argv = require('optimist')
+ .boolean('v')
+ .argv
+;
+console.dir(argv.v);
+console.dir(argv._);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/default_hash.js b/tests/node_modules/nightwatch/node_modules/optimist/example/default_hash.js
new file mode 100644
index 0000000..ade7768
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/default_hash.js
@@ -0,0 +1,8 @@
+#!/usr/bin/env node
+
+var argv = require('optimist')
+ .default({ x : 10, y : 10 })
+ .argv
+;
+
+console.log(argv.x + argv.y);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/default_singles.js b/tests/node_modules/nightwatch/node_modules/optimist/example/default_singles.js
new file mode 100644
index 0000000..d9b1ff4
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/default_singles.js
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+var argv = require('optimist')
+ .default('x', 10)
+ .default('y', 10)
+ .argv
+;
+console.log(argv.x + argv.y);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/divide.js b/tests/node_modules/nightwatch/node_modules/optimist/example/divide.js
new file mode 100644
index 0000000..5e2ee82
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/divide.js
@@ -0,0 +1,8 @@
+#!/usr/bin/env node
+
+var argv = require('optimist')
+ .usage('Usage: $0 -x [num] -y [num]')
+ .demand(['x','y'])
+ .argv;
+
+console.log(argv.x / argv.y);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/line_count.js b/tests/node_modules/nightwatch/node_modules/optimist/example/line_count.js
new file mode 100644
index 0000000..b5f95bf
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/line_count.js
@@ -0,0 +1,20 @@
+#!/usr/bin/env node
+var argv = require('optimist')
+ .usage('Count the lines in a file.\nUsage: $0')
+ .demand('f')
+ .alias('f', 'file')
+ .describe('f', 'Load a file')
+ .argv
+;
+
+var fs = require('fs');
+var s = fs.createReadStream(argv.file);
+
+var lines = 0;
+s.on('data', function (buf) {
+ lines += buf.toString().match(/\n/g).length;
+});
+
+s.on('end', function () {
+ console.log(lines);
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/line_count_options.js b/tests/node_modules/nightwatch/node_modules/optimist/example/line_count_options.js
new file mode 100644
index 0000000..d9ac709
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/line_count_options.js
@@ -0,0 +1,29 @@
+#!/usr/bin/env node
+var argv = require('optimist')
+ .usage('Count the lines in a file.\nUsage: $0')
+ .options({
+ file : {
+ demand : true,
+ alias : 'f',
+ description : 'Load a file'
+ },
+ base : {
+ alias : 'b',
+ description : 'Numeric base to use for output',
+ default : 10,
+ },
+ })
+ .argv
+;
+
+var fs = require('fs');
+var s = fs.createReadStream(argv.file);
+
+var lines = 0;
+s.on('data', function (buf) {
+ lines += buf.toString().match(/\n/g).length;
+});
+
+s.on('end', function () {
+ console.log(lines.toString(argv.base));
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/line_count_wrap.js b/tests/node_modules/nightwatch/node_modules/optimist/example/line_count_wrap.js
new file mode 100644
index 0000000..4267511
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/line_count_wrap.js
@@ -0,0 +1,29 @@
+#!/usr/bin/env node
+var argv = require('optimist')
+ .usage('Count the lines in a file.\nUsage: $0')
+ .wrap(80)
+ .demand('f')
+ .alias('f', [ 'file', 'filename' ])
+ .describe('f',
+ "Load a file. It's pretty important."
+ + " Required even. So you'd better specify it."
+ )
+ .alias('b', 'base')
+ .describe('b', 'Numeric base to display the number of lines in')
+ .default('b', 10)
+ .describe('x', 'Super-secret optional parameter which is secret')
+ .default('x', '')
+ .argv
+;
+
+var fs = require('fs');
+var s = fs.createReadStream(argv.file);
+
+var lines = 0;
+s.on('data', function (buf) {
+ lines += buf.toString().match(/\n/g).length;
+});
+
+s.on('end', function () {
+ console.log(lines.toString(argv.base));
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/nonopt.js b/tests/node_modules/nightwatch/node_modules/optimist/example/nonopt.js
new file mode 100644
index 0000000..ee633ee
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/nonopt.js
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+var argv = require('optimist').argv;
+console.log('(%d,%d)', argv.x, argv.y);
+console.log(argv._);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/reflect.js b/tests/node_modules/nightwatch/node_modules/optimist/example/reflect.js
new file mode 100644
index 0000000..816b3e1
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/reflect.js
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+console.dir(require('optimist').argv);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/short.js b/tests/node_modules/nightwatch/node_modules/optimist/example/short.js
new file mode 100644
index 0000000..1db0ad0
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/short.js
@@ -0,0 +1,3 @@
+#!/usr/bin/env node
+var argv = require('optimist').argv;
+console.log('(%d,%d)', argv.x, argv.y);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/string.js b/tests/node_modules/nightwatch/node_modules/optimist/example/string.js
new file mode 100644
index 0000000..a8e5aeb
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/string.js
@@ -0,0 +1,11 @@
+#!/usr/bin/env node
+var argv = require('optimist')
+ .string('x', 'y')
+ .argv
+;
+console.dir([ argv.x, argv.y ]);
+
+/* Turns off numeric coercion:
+ ./node string.js -x 000123 -y 9876
+ [ '000123', '9876' ]
+*/
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/usage-options.js b/tests/node_modules/nightwatch/node_modules/optimist/example/usage-options.js
new file mode 100644
index 0000000..b999977
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/usage-options.js
@@ -0,0 +1,19 @@
+var optimist = require('./../index');
+
+var argv = optimist.usage('This is my awesome program', {
+ 'about': {
+ description: 'Provide some details about the author of this program',
+ required: true,
+ short: 'a',
+ },
+ 'info': {
+ description: 'Provide some information about the node.js agains!!!!!!',
+ boolean: true,
+ short: 'i'
+ }
+}).argv;
+
+optimist.showHelp();
+
+console.log('\n\nInspecting options');
+console.dir(argv);
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/example/xup.js b/tests/node_modules/nightwatch/node_modules/optimist/example/xup.js
new file mode 100644
index 0000000..8f6ecd2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/example/xup.js
@@ -0,0 +1,10 @@
+#!/usr/bin/env node
+var argv = require('optimist').argv;
+
+if (argv.rif - 5 * argv.xup > 7.138) {
+ console.log('Buy more riffiwobbles');
+}
+else {
+ console.log('Sell the xupptumblers');
+}
+
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/index.js b/tests/node_modules/nightwatch/node_modules/optimist/index.js
new file mode 100644
index 0000000..4da5a6d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/index.js
@@ -0,0 +1,343 @@
+var path = require('path');
+var minimist = require('minimist');
+var wordwrap = require('wordwrap');
+
+/* Hack an instance of Argv with process.argv into Argv
+ so people can do
+ require('optimist')(['--beeble=1','-z','zizzle']).argv
+ to parse a list of args and
+ require('optimist').argv
+ to get a parsed version of process.argv.
+*/
+
+var inst = Argv(process.argv.slice(2));
+Object.keys(inst).forEach(function (key) {
+ Argv[key] = typeof inst[key] == 'function'
+ ? inst[key].bind(inst)
+ : inst[key];
+});
+
+var exports = module.exports = Argv;
+function Argv (processArgs, cwd) {
+ var self = {};
+ if (!cwd) cwd = process.cwd();
+
+ self.$0 = process.argv
+ .slice(0,2)
+ .map(function (x) {
+ var b = rebase(cwd, x);
+ return x.match(/^\//) && b.length < x.length
+ ? b : x
+ })
+ .join(' ')
+ ;
+
+ if (process.env._ != undefined && process.argv[1] == process.env._) {
+ self.$0 = process.env._.replace(
+ path.dirname(process.execPath) + '/', ''
+ );
+ }
+
+ var options = {
+ boolean: [],
+ string: [],
+ alias: {},
+ default: []
+ };
+
+ self.boolean = function (bools) {
+ options.boolean.push.apply(options.boolean, [].concat(bools));
+ return self;
+ };
+
+ self.string = function (strings) {
+ options.string.push.apply(options.string, [].concat(strings));
+ return self;
+ };
+
+ self.default = function (key, value) {
+ if (typeof key === 'object') {
+ Object.keys(key).forEach(function (k) {
+ self.default(k, key[k]);
+ });
+ }
+ else {
+ options.default[key] = value;
+ }
+ return self;
+ };
+
+ self.alias = function (x, y) {
+ if (typeof x === 'object') {
+ Object.keys(x).forEach(function (key) {
+ self.alias(key, x[key]);
+ });
+ }
+ else {
+ options.alias[x] = (options.alias[x] || []).concat(y);
+ }
+ return self;
+ };
+
+ var demanded = {};
+ self.demand = function (keys) {
+ if (typeof keys == 'number') {
+ if (!demanded._) demanded._ = 0;
+ demanded._ += keys;
+ }
+ else if (Array.isArray(keys)) {
+ keys.forEach(function (key) {
+ self.demand(key);
+ });
+ }
+ else {
+ demanded[keys] = true;
+ }
+
+ return self;
+ };
+
+ var usage;
+ self.usage = function (msg, opts) {
+ if (!opts && typeof msg === 'object') {
+ opts = msg;
+ msg = null;
+ }
+
+ usage = msg;
+
+ if (opts) self.options(opts);
+
+ return self;
+ };
+
+ function fail (msg) {
+ self.showHelp();
+ if (msg) console.error(msg);
+ process.exit(1);
+ }
+
+ var checks = [];
+ self.check = function (f) {
+ checks.push(f);
+ return self;
+ };
+
+ var descriptions = {};
+ self.describe = function (key, desc) {
+ if (typeof key === 'object') {
+ Object.keys(key).forEach(function (k) {
+ self.describe(k, key[k]);
+ });
+ }
+ else {
+ descriptions[key] = desc;
+ }
+ return self;
+ };
+
+ self.parse = function (args) {
+ return parseArgs(args);
+ };
+
+ self.option = self.options = function (key, opt) {
+ if (typeof key === 'object') {
+ Object.keys(key).forEach(function (k) {
+ self.options(k, key[k]);
+ });
+ }
+ else {
+ if (opt.alias) self.alias(key, opt.alias);
+ if (opt.demand) self.demand(key);
+ if (typeof opt.default !== 'undefined') {
+ self.default(key, opt.default);
+ }
+
+ if (opt.boolean || opt.type === 'boolean') {
+ self.boolean(key);
+ }
+ if (opt.string || opt.type === 'string') {
+ self.string(key);
+ }
+
+ var desc = opt.describe || opt.description || opt.desc;
+ if (desc) {
+ self.describe(key, desc);
+ }
+ }
+
+ return self;
+ };
+
+ var wrap = null;
+ self.wrap = function (cols) {
+ wrap = cols;
+ return self;
+ };
+
+ self.showHelp = function (fn) {
+ if (!fn) fn = console.error;
+ fn(self.help());
+ };
+
+ self.help = function () {
+ var keys = Object.keys(
+ Object.keys(descriptions)
+ .concat(Object.keys(demanded))
+ .concat(Object.keys(options.default))
+ .reduce(function (acc, key) {
+ if (key !== '_') acc[key] = true;
+ return acc;
+ }, {})
+ );
+
+ var help = keys.length ? [ 'Options:' ] : [];
+
+ if (usage) {
+ help.unshift(usage.replace(/\$0/g, self.$0), '');
+ }
+
+ var switches = keys.reduce(function (acc, key) {
+ acc[key] = [ key ].concat(options.alias[key] || [])
+ .map(function (sw) {
+ return (sw.length > 1 ? '--' : '-') + sw
+ })
+ .join(', ')
+ ;
+ return acc;
+ }, {});
+
+ var switchlen = longest(Object.keys(switches).map(function (s) {
+ return switches[s] || '';
+ }));
+
+ var desclen = longest(Object.keys(descriptions).map(function (d) {
+ return descriptions[d] || '';
+ }));
+
+ keys.forEach(function (key) {
+ var kswitch = switches[key];
+ var desc = descriptions[key] || '';
+
+ if (wrap) {
+ desc = wordwrap(switchlen + 4, wrap)(desc)
+ .slice(switchlen + 4)
+ ;
+ }
+
+ var spadding = new Array(
+ Math.max(switchlen - kswitch.length + 3, 0)
+ ).join(' ');
+
+ var dpadding = new Array(
+ Math.max(desclen - desc.length + 1, 0)
+ ).join(' ');
+
+ var type = null;
+
+ if (options.boolean[key]) type = '[boolean]';
+ if (options.string[key]) type = '[string]';
+
+ if (!wrap && dpadding.length > 0) {
+ desc += dpadding;
+ }
+
+ var prelude = ' ' + kswitch + spadding;
+ var extra = [
+ type,
+ demanded[key]
+ ? '[required]'
+ : null
+ ,
+ options.default[key] !== undefined
+ ? '[default: ' + JSON.stringify(options.default[key]) + ']'
+ : null
+ ,
+ ].filter(Boolean).join(' ');
+
+ var body = [ desc, extra ].filter(Boolean).join(' ');
+
+ if (wrap) {
+ var dlines = desc.split('\n');
+ var dlen = dlines.slice(-1)[0].length
+ + (dlines.length === 1 ? prelude.length : 0)
+
+ body = desc + (dlen + extra.length > wrap - 2
+ ? '\n'
+ + new Array(wrap - extra.length + 1).join(' ')
+ + extra
+ : new Array(wrap - extra.length - dlen + 1).join(' ')
+ + extra
+ );
+ }
+
+ help.push(prelude + body);
+ });
+
+ help.push('');
+ return help.join('\n');
+ };
+
+ Object.defineProperty(self, 'argv', {
+ get : function () { return parseArgs(processArgs) },
+ enumerable : true,
+ });
+
+ function parseArgs (args) {
+ var argv = minimist(args, options);
+ argv.$0 = self.$0;
+
+ if (demanded._ && argv._.length < demanded._) {
+ fail('Not enough non-option arguments: got '
+ + argv._.length + ', need at least ' + demanded._
+ );
+ }
+
+ var missing = [];
+ Object.keys(demanded).forEach(function (key) {
+ if (!argv[key]) missing.push(key);
+ });
+
+ if (missing.length) {
+ fail('Missing required arguments: ' + missing.join(', '));
+ }
+
+ checks.forEach(function (f) {
+ try {
+ if (f(argv) === false) {
+ fail('Argument check failed: ' + f.toString());
+ }
+ }
+ catch (err) {
+ fail(err)
+ }
+ });
+
+ return argv;
+ }
+
+ function longest (xs) {
+ return Math.max.apply(
+ null,
+ xs.map(function (x) { return x.length })
+ );
+ }
+
+ return self;
+};
+
+// rebase an absolute path to a relative one with respect to a base directory
+// exported for tests
+exports.rebase = rebase;
+function rebase (base, dir) {
+ var ds = path.normalize(dir).split('/').slice(1);
+ var bs = path.normalize(base).split('/').slice(1);
+
+ for (var i = 0; ds[i] && ds[i] == bs[i]; i++);
+ ds.splice(0, i); bs.splice(0, i);
+
+ var p = path.normalize(
+ bs.map(function () { return '..' }).concat(ds).join('/')
+ ).replace(/\/$/,'').replace(/^$/, '.');
+ return p.match(/^[.\/]/) ? p : './' + p;
+};
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/.travis.yml b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/.travis.yml
new file mode 100644
index 0000000..cc4dba2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/LICENSE b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/example/parse.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/example/parse.js
new file mode 100644
index 0000000..abff3e8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/example/parse.js
@@ -0,0 +1,2 @@
+var argv = require('../')(process.argv.slice(2));
+console.dir(argv);
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/index.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/index.js
new file mode 100644
index 0000000..71fb830
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/index.js
@@ -0,0 +1,187 @@
+module.exports = function (args, opts) {
+ if (!opts) opts = {};
+
+ var flags = { bools : {}, strings : {} };
+
+ [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ });
+
+ var aliases = {};
+ Object.keys(opts.alias || {}).forEach(function (key) {
+ aliases[key] = [].concat(opts.alias[key]);
+ aliases[key].forEach(function (x) {
+ aliases[x] = [key].concat(aliases[key].filter(function (y) {
+ return x !== y;
+ }));
+ });
+ });
+
+ [].concat(opts.string).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ if (aliases[key]) {
+ flags.strings[aliases[key]] = true;
+ }
+ });
+
+ var defaults = opts['default'] || {};
+
+ var argv = { _ : [] };
+ Object.keys(flags.bools).forEach(function (key) {
+ setArg(key, defaults[key] === undefined ? false : defaults[key]);
+ });
+
+ var notFlags = [];
+
+ if (args.indexOf('--') !== -1) {
+ notFlags = args.slice(args.indexOf('--')+1);
+ args = args.slice(0, args.indexOf('--'));
+ }
+
+ function setArg (key, val) {
+ var value = !flags.strings[key] && isNumber(val)
+ ? Number(val) : val
+ ;
+ setKey(argv, key.split('.'), value);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), value);
+ });
+ }
+
+ for (var i = 0; i < args.length; i++) {
+ var arg = args[i];
+
+ if (/^--.+=/.test(arg)) {
+ // Using [\s\S] instead of . because js doesn't support the
+ // 'dotall' regex modifier. See:
+ // http://stackoverflow.com/a/1068308/13216
+ var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
+ setArg(m[1], m[2]);
+ }
+ else if (/^--no-.+/.test(arg)) {
+ var key = arg.match(/^--no-(.+)/)[1];
+ setArg(key, false);
+ }
+ else if (/^--.+/.test(arg)) {
+ var key = arg.match(/^--(.+)/)[1];
+ var next = args[i + 1];
+ if (next !== undefined && !/^-/.test(next)
+ && !flags.bools[key]
+ && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
+ setArg(key, next);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next === 'true');
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true);
+ }
+ }
+ else if (/^-[^-]+/.test(arg)) {
+ var letters = arg.slice(1,-1).split('');
+
+ var broken = false;
+ for (var j = 0; j < letters.length; j++) {
+ var next = arg.slice(j+2);
+
+ if (next === '-') {
+ setArg(letters[j], next)
+ continue;
+ }
+
+ if (/[A-Za-z]/.test(letters[j])
+ && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
+ setArg(letters[j], next);
+ broken = true;
+ break;
+ }
+
+ if (letters[j+1] && letters[j+1].match(/\W/)) {
+ setArg(letters[j], arg.slice(j+2));
+ broken = true;
+ break;
+ }
+ else {
+ setArg(letters[j], flags.strings[letters[j]] ? '' : true);
+ }
+ }
+
+ var key = arg.slice(-1)[0];
+ if (!broken && key !== '-') {
+ if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
+ && !flags.bools[key]
+ && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
+ setArg(key, args[i+1]);
+ i++;
+ }
+ else if (args[i+1] && /true|false/.test(args[i+1])) {
+ setArg(key, args[i+1] === 'true');
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true);
+ }
+ }
+ }
+ else {
+ argv._.push(
+ flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+ );
+ }
+ }
+
+ Object.keys(defaults).forEach(function (key) {
+ if (!hasKey(argv, key.split('.'))) {
+ setKey(argv, key.split('.'), defaults[key]);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), defaults[key]);
+ });
+ }
+ });
+
+ notFlags.forEach(function(key) {
+ argv._.push(key);
+ });
+
+ return argv;
+};
+
+function hasKey (obj, keys) {
+ var o = obj;
+ keys.slice(0,-1).forEach(function (key) {
+ o = (o[key] || {});
+ });
+
+ var key = keys[keys.length - 1];
+ return key in o;
+}
+
+function setKey (obj, keys, value) {
+ var o = obj;
+ keys.slice(0,-1).forEach(function (key) {
+ if (o[key] === undefined) o[key] = {};
+ o = o[key];
+ });
+
+ var key = keys[keys.length - 1];
+ if (o[key] === undefined || typeof o[key] === 'boolean') {
+ o[key] = value;
+ }
+ else if (Array.isArray(o[key])) {
+ o[key].push(value);
+ }
+ else {
+ o[key] = [ o[key], value ];
+ }
+}
+
+function isNumber (x) {
+ if (typeof x === 'number') return true;
+ if (/^0x[0-9a-f]+$/i.test(x)) return true;
+ return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+}
+
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/package.json b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/package.json
new file mode 100644
index 0000000..f0043ff
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "minimist",
+ "version": "0.0.10",
+ "description": "parse argument options",
+ "main": "index.js",
+ "devDependencies": {
+ "tape": "~1.0.4",
+ "tap": "~0.4.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "ff/5",
+ "firefox/latest",
+ "chrome/10",
+ "chrome/latest",
+ "safari/5.1",
+ "safari/latest",
+ "opera/12"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/minimist.git"
+ },
+ "homepage": "https://github.com/substack/minimist",
+ "keywords": [
+ "argv",
+ "getopt",
+ "parser",
+ "optimist"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/substack/minimist/issues"
+ },
+ "_id": "minimist@0.0.10",
+ "dist": {
+ "shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf",
+ "tarball": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz"
+ },
+ "_from": "minimist@>=0.0.1 <0.1.0",
+ "_npmVersion": "1.4.3",
+ "_npmUser": {
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ }
+ ],
+ "directories": {},
+ "_shasum": "de3f98543dbf96082be48ad1a0c7cda836301dcf",
+ "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/readme.markdown b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/readme.markdown
new file mode 100644
index 0000000..c256353
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/readme.markdown
@@ -0,0 +1,73 @@
+# minimist
+
+parse argument options
+
+This module is the guts of optimist's argument parser without all the
+fanciful decoration.
+
+[](http://ci.testling.com/substack/minimist)
+
+[](http://travis-ci.org/substack/minimist)
+
+# example
+
+``` js
+var argv = require('minimist')(process.argv.slice(2));
+console.dir(argv);
+```
+
+```
+$ node example/parse.js -a beep -b boop
+{ _: [], a: 'beep', b: 'boop' }
+```
+
+```
+$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
+{ _: [ 'foo', 'bar', 'baz' ],
+ x: 3,
+ y: 4,
+ n: 5,
+ a: true,
+ b: true,
+ c: true,
+ beep: 'boop' }
+```
+
+# methods
+
+``` js
+var parseArgs = require('minimist')
+```
+
+## var argv = parseArgs(args, opts={})
+
+Return an argument object `argv` populated with the array arguments from `args`.
+
+`argv._` contains all the arguments that didn't have an option associated with
+them.
+
+Numeric-looking arguments will be returned as numbers unless `opts.string` or
+`opts.boolean` is set for that argument name.
+
+Any arguments after `'--'` will not be parsed and will end up in `argv._`.
+
+options can be:
+
+* `opts.string` - a string or array of strings argument names to always treat as
+strings
+* `opts.boolean` - a string or array of strings to always treat as booleans
+* `opts.alias` - an object mapping string names to strings or arrays of string
+argument names to use as aliases
+* `opts.default` - an object mapping string argument names to default values
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install minimist
+```
+
+# license
+
+MIT
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/bool.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/bool.js
new file mode 100644
index 0000000..749e083
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/bool.js
@@ -0,0 +1,119 @@
+var parse = require('../');
+var test = require('tape');
+
+test('flag boolean default false', function (t) {
+ var argv = parse(['moo'], {
+ boolean: ['t', 'verbose'],
+ default: { verbose: false, t: false }
+ });
+
+ t.deepEqual(argv, {
+ verbose: false,
+ t: false,
+ _: ['moo']
+ });
+
+ t.deepEqual(typeof argv.verbose, 'boolean');
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+
+});
+
+test('boolean groups', function (t) {
+ var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
+ boolean: ['x','y','z']
+ });
+
+ t.deepEqual(argv, {
+ x : true,
+ y : false,
+ z : true,
+ _ : [ 'one', 'two', 'three' ]
+ });
+
+ t.deepEqual(typeof argv.x, 'boolean');
+ t.deepEqual(typeof argv.y, 'boolean');
+ t.deepEqual(typeof argv.z, 'boolean');
+ t.end();
+});
+test('boolean and alias with chainable api', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ herp: { alias: 'h', boolean: true }
+ };
+ var aliasedArgv = parse(aliased, {
+ boolean: 'herp',
+ alias: { h: 'herp' }
+ });
+ var propertyArgv = parse(regular, {
+ boolean: 'herp',
+ alias: { h: 'herp' }
+ });
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias with options hash', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ alias: { 'h': 'herp' },
+ boolean: 'herp'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ]
+ };
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias using explicit true', function (t) {
+ var aliased = [ '-h', 'true' ];
+ var regular = [ '--herp', 'true' ];
+ var opts = {
+ alias: { h: 'herp' },
+ boolean: 'h'
+ };
+ var aliasedArgv = parse(aliased, opts);
+ var propertyArgv = parse(regular, opts);
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ ]
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+// regression, see https://github.com/substack/node-optimist/issues/71
+test('boolean and --x=true', function(t) {
+ var parsed = parse(['--boool', '--other=true'], {
+ boolean: 'boool'
+ });
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'true');
+
+ parsed = parse(['--boool', '--other=false'], {
+ boolean: 'boool'
+ });
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'false');
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/dash.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/dash.js
new file mode 100644
index 0000000..8b034b9
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/dash.js
@@ -0,0 +1,24 @@
+var parse = require('../');
+var test = require('tape');
+
+test('-', function (t) {
+ t.plan(5);
+ t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
+ t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
+ t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
+ t.deepEqual(
+ parse([ '-b', '-' ], { boolean: 'b' }),
+ { b: true, _: [ '-' ] }
+ );
+ t.deepEqual(
+ parse([ '-s', '-' ], { string: 's' }),
+ { s: '-', _: [] }
+ );
+});
+
+test('-a -- b', function (t) {
+ t.plan(3);
+ t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+ t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+ t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/default_bool.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/default_bool.js
new file mode 100644
index 0000000..f0041ee
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/default_bool.js
@@ -0,0 +1,20 @@
+var test = require('tape');
+var parse = require('../');
+
+test('boolean default true', function (t) {
+ var argv = parse([], {
+ boolean: 'sometrue',
+ default: { sometrue: true }
+ });
+ t.equal(argv.sometrue, true);
+ t.end();
+});
+
+test('boolean default false', function (t) {
+ var argv = parse([], {
+ boolean: 'somefalse',
+ default: { somefalse: false }
+ });
+ t.equal(argv.somefalse, false);
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/dotted.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/dotted.js
new file mode 100644
index 0000000..d8b3e85
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/dotted.js
@@ -0,0 +1,22 @@
+var parse = require('../');
+var test = require('tape');
+
+test('dotted alias', function (t) {
+ var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
+ t.equal(argv.a.b, 22);
+ t.equal(argv.aa.bb, 22);
+ t.end();
+});
+
+test('dotted default', function (t) {
+ var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
+ t.equal(argv.a.b, 11);
+ t.equal(argv.aa.bb, 11);
+ t.end();
+});
+
+test('dotted default with no alias', function (t) {
+ var argv = parse('', {default: {'a.b': 11}});
+ t.equal(argv.a.b, 11);
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/long.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/long.js
new file mode 100644
index 0000000..5d3a1e0
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/long.js
@@ -0,0 +1,31 @@
+var test = require('tape');
+var parse = require('../');
+
+test('long opts', function (t) {
+ t.deepEqual(
+ parse([ '--bool' ]),
+ { bool : true, _ : [] },
+ 'long boolean'
+ );
+ t.deepEqual(
+ parse([ '--pow', 'xixxle' ]),
+ { pow : 'xixxle', _ : [] },
+ 'long capture sp'
+ );
+ t.deepEqual(
+ parse([ '--pow=xixxle' ]),
+ { pow : 'xixxle', _ : [] },
+ 'long capture eq'
+ );
+ t.deepEqual(
+ parse([ '--host', 'localhost', '--port', '555' ]),
+ { host : 'localhost', port : 555, _ : [] },
+ 'long captures sp'
+ );
+ t.deepEqual(
+ parse([ '--host=localhost', '--port=555' ]),
+ { host : 'localhost', port : 555, _ : [] },
+ 'long captures eq'
+ );
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/num.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/num.js
new file mode 100644
index 0000000..2cc77f4
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/num.js
@@ -0,0 +1,36 @@
+var parse = require('../');
+var test = require('tape');
+
+test('nums', function (t) {
+ var argv = parse([
+ '-x', '1234',
+ '-y', '5.67',
+ '-z', '1e7',
+ '-w', '10f',
+ '--hex', '0xdeadbeef',
+ '789'
+ ]);
+ t.deepEqual(argv, {
+ x : 1234,
+ y : 5.67,
+ z : 1e7,
+ w : '10f',
+ hex : 0xdeadbeef,
+ _ : [ 789 ]
+ });
+ t.deepEqual(typeof argv.x, 'number');
+ t.deepEqual(typeof argv.y, 'number');
+ t.deepEqual(typeof argv.z, 'number');
+ t.deepEqual(typeof argv.w, 'string');
+ t.deepEqual(typeof argv.hex, 'number');
+ t.deepEqual(typeof argv._[0], 'number');
+ t.end();
+});
+
+test('already a number', function (t) {
+ var argv = parse([ '-x', 1234, 789 ]);
+ t.deepEqual(argv, { x : 1234, _ : [ 789 ] });
+ t.deepEqual(typeof argv.x, 'number');
+ t.deepEqual(typeof argv._[0], 'number');
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/parse.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/parse.js
new file mode 100644
index 0000000..7b4a2a1
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/parse.js
@@ -0,0 +1,197 @@
+var parse = require('../');
+var test = require('tape');
+
+test('parse args', function (t) {
+ t.deepEqual(
+ parse([ '--no-moo' ]),
+ { moo : false, _ : [] },
+ 'no'
+ );
+ t.deepEqual(
+ parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
+ { v : ['a','b','c'], _ : [] },
+ 'multi'
+ );
+ t.end();
+});
+
+test('comprehensive', function (t) {
+ t.deepEqual(
+ parse([
+ '--name=meowmers', 'bare', '-cats', 'woo',
+ '-h', 'awesome', '--multi=quux',
+ '--key', 'value',
+ '-b', '--bool', '--no-meep', '--multi=baz',
+ '--', '--not-a-flag', 'eek'
+ ]),
+ {
+ c : true,
+ a : true,
+ t : true,
+ s : 'woo',
+ h : 'awesome',
+ b : true,
+ bool : true,
+ key : 'value',
+ multi : [ 'quux', 'baz' ],
+ meep : false,
+ name : 'meowmers',
+ _ : [ 'bare', '--not-a-flag', 'eek' ]
+ }
+ );
+ t.end();
+});
+
+test('flag boolean', function (t) {
+ var argv = parse([ '-t', 'moo' ], { boolean: 't' });
+ t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+});
+
+test('flag boolean value', function (t) {
+ var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
+ boolean: [ 't', 'verbose' ],
+ default: { verbose: true }
+ });
+
+ t.deepEqual(argv, {
+ verbose: false,
+ t: true,
+ _: ['moo']
+ });
+
+ t.deepEqual(typeof argv.verbose, 'boolean');
+ t.deepEqual(typeof argv.t, 'boolean');
+ t.end();
+});
+
+test('newlines in params' , function (t) {
+ var args = parse([ '-s', "X\nX" ])
+ t.deepEqual(args, { _ : [], s : "X\nX" });
+
+ // reproduce in bash:
+ // VALUE="new
+ // line"
+ // node program.js --s="$VALUE"
+ args = parse([ "--s=X\nX" ])
+ t.deepEqual(args, { _ : [], s : "X\nX" });
+ t.end();
+});
+
+test('strings' , function (t) {
+ var s = parse([ '-s', '0001234' ], { string: 's' }).s;
+ t.equal(s, '0001234');
+ t.equal(typeof s, 'string');
+
+ var x = parse([ '-x', '56' ], { string: 'x' }).x;
+ t.equal(x, '56');
+ t.equal(typeof x, 'string');
+ t.end();
+});
+
+test('stringArgs', function (t) {
+ var s = parse([ ' ', ' ' ], { string: '_' })._;
+ t.same(s.length, 2);
+ t.same(typeof s[0], 'string');
+ t.same(s[0], ' ');
+ t.same(typeof s[1], 'string');
+ t.same(s[1], ' ');
+ t.end();
+});
+
+test('empty strings', function(t) {
+ var s = parse([ '-s' ], { string: 's' }).s;
+ t.equal(s, '');
+ t.equal(typeof s, 'string');
+
+ var str = parse([ '--str' ], { string: 'str' }).str;
+ t.equal(str, '');
+ t.equal(typeof str, 'string');
+
+ var letters = parse([ '-art' ], {
+ string: [ 'a', 't' ]
+ });
+
+ t.equal(letters.a, '');
+ t.equal(letters.r, true);
+ t.equal(letters.t, '');
+
+ t.end();
+});
+
+
+test('string and alias', function(t) {
+ var x = parse([ '--str', '000123' ], {
+ string: 's',
+ alias: { s: 'str' }
+ });
+
+ t.equal(x.str, '000123');
+ t.equal(typeof x.str, 'string');
+ t.equal(x.s, '000123');
+ t.equal(typeof x.s, 'string');
+
+ var y = parse([ '-s', '000123' ], {
+ string: 'str',
+ alias: { str: 's' }
+ });
+
+ t.equal(y.str, '000123');
+ t.equal(typeof y.str, 'string');
+ t.equal(y.s, '000123');
+ t.equal(typeof y.s, 'string');
+ t.end();
+});
+
+test('slashBreak', function (t) {
+ t.same(
+ parse([ '-I/foo/bar/baz' ]),
+ { I : '/foo/bar/baz', _ : [] }
+ );
+ t.same(
+ parse([ '-xyz/foo/bar/baz' ]),
+ { x : true, y : true, z : '/foo/bar/baz', _ : [] }
+ );
+ t.end();
+});
+
+test('alias', function (t) {
+ var argv = parse([ '-f', '11', '--zoom', '55' ], {
+ alias: { z: 'zoom' }
+ });
+ t.equal(argv.zoom, 55);
+ t.equal(argv.z, argv.zoom);
+ t.equal(argv.f, 11);
+ t.end();
+});
+
+test('multiAlias', function (t) {
+ var argv = parse([ '-f', '11', '--zoom', '55' ], {
+ alias: { z: [ 'zm', 'zoom' ] }
+ });
+ t.equal(argv.zoom, 55);
+ t.equal(argv.z, argv.zoom);
+ t.equal(argv.z, argv.zm);
+ t.equal(argv.f, 11);
+ t.end();
+});
+
+test('nested dotted objects', function (t) {
+ var argv = parse([
+ '--foo.bar', '3', '--foo.baz', '4',
+ '--foo.quux.quibble', '5', '--foo.quux.o_O',
+ '--beep.boop'
+ ]);
+
+ t.same(argv.foo, {
+ bar : 3,
+ baz : 4,
+ quux : {
+ quibble : 5,
+ o_O : true
+ }
+ });
+ t.same(argv.beep, { boop : true });
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/parse_modified.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/parse_modified.js
new file mode 100644
index 0000000..21851b0
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/parse_modified.js
@@ -0,0 +1,9 @@
+var parse = require('../');
+var test = require('tape');
+
+test('parse with modifier functions' , function (t) {
+ t.plan(1);
+
+ var argv = parse([ '-b', '123' ], { boolean: 'b' });
+ t.deepEqual(argv, { b: true, _: ['123'] });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/short.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/short.js
new file mode 100644
index 0000000..d513a1c
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/short.js
@@ -0,0 +1,67 @@
+var parse = require('../');
+var test = require('tape');
+
+test('numeric short args', function (t) {
+ t.plan(2);
+ t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
+ t.deepEqual(
+ parse([ '-123', '456' ]),
+ { 1: true, 2: true, 3: 456, _: [] }
+ );
+});
+
+test('short', function (t) {
+ t.deepEqual(
+ parse([ '-b' ]),
+ { b : true, _ : [] },
+ 'short boolean'
+ );
+ t.deepEqual(
+ parse([ 'foo', 'bar', 'baz' ]),
+ { _ : [ 'foo', 'bar', 'baz' ] },
+ 'bare'
+ );
+ t.deepEqual(
+ parse([ '-cats' ]),
+ { c : true, a : true, t : true, s : true, _ : [] },
+ 'group'
+ );
+ t.deepEqual(
+ parse([ '-cats', 'meow' ]),
+ { c : true, a : true, t : true, s : 'meow', _ : [] },
+ 'short group next'
+ );
+ t.deepEqual(
+ parse([ '-h', 'localhost' ]),
+ { h : 'localhost', _ : [] },
+ 'short capture'
+ );
+ t.deepEqual(
+ parse([ '-h', 'localhost', '-p', '555' ]),
+ { h : 'localhost', p : 555, _ : [] },
+ 'short captures'
+ );
+ t.end();
+});
+
+test('mixed short bool and capture', function (t) {
+ t.same(
+ parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+ {
+ f : true, p : 555, h : 'localhost',
+ _ : [ 'script.js' ]
+ }
+ );
+ t.end();
+});
+
+test('short and long', function (t) {
+ t.deepEqual(
+ parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+ {
+ f : true, p : 555, h : 'localhost',
+ _ : [ 'script.js' ]
+ }
+ );
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/whitespace.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/whitespace.js
new file mode 100644
index 0000000..8a52a58
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/minimist/test/whitespace.js
@@ -0,0 +1,8 @@
+var parse = require('../');
+var test = require('tape');
+
+test('whitespace should be whitespace' , function (t) {
+ t.plan(1);
+ var x = parse([ '-x', '\t' ]).x;
+ t.equal(x, '\t');
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/LICENSE b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/LICENSE
new file mode 100644
index 0000000..ee27ba4
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/README.markdown b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/README.markdown
new file mode 100644
index 0000000..346374e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/README.markdown
@@ -0,0 +1,70 @@
+wordwrap
+========
+
+Wrap your words.
+
+example
+=======
+
+made out of meat
+----------------
+
+meat.js
+
+ var wrap = require('wordwrap')(15);
+ console.log(wrap('You and your whole family are made out of meat.'));
+
+output:
+
+ You and your
+ whole family
+ are made out
+ of meat.
+
+centered
+--------
+
+center.js
+
+ var wrap = require('wordwrap')(20, 60);
+ console.log(wrap(
+ 'At long last the struggle and tumult was over.'
+ + ' The machines had finally cast off their oppressors'
+ + ' and were finally free to roam the cosmos.'
+ + '\n'
+ + 'Free of purpose, free of obligation.'
+ + ' Just drifting through emptiness.'
+ + ' The sun was just another point of light.'
+ ));
+
+output:
+
+ At long last the struggle and tumult
+ was over. The machines had finally cast
+ off their oppressors and were finally
+ free to roam the cosmos.
+ Free of purpose, free of obligation.
+ Just drifting through emptiness. The
+ sun was just another point of light.
+
+methods
+=======
+
+var wrap = require('wordwrap');
+
+wrap(stop), wrap(start, stop, params={mode:"soft"})
+---------------------------------------------------
+
+Returns a function that takes a string and returns a new string.
+
+Pad out lines with spaces out to column `start` and then wrap until column
+`stop`. If a word is longer than `stop - start` characters it will overflow.
+
+In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are
+longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break
+up chunks longer than `stop - start`.
+
+wrap.hard(start, stop)
+----------------------
+
+Like `wrap()` but with `params.mode = "hard"`.
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/example/center.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/example/center.js
new file mode 100644
index 0000000..a3fbaae
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/example/center.js
@@ -0,0 +1,10 @@
+var wrap = require('wordwrap')(20, 60);
+console.log(wrap(
+ 'At long last the struggle and tumult was over.'
+ + ' The machines had finally cast off their oppressors'
+ + ' and were finally free to roam the cosmos.'
+ + '\n'
+ + 'Free of purpose, free of obligation.'
+ + ' Just drifting through emptiness.'
+ + ' The sun was just another point of light.'
+));
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/example/meat.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/example/meat.js
new file mode 100644
index 0000000..a4665e1
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/example/meat.js
@@ -0,0 +1,3 @@
+var wrap = require('wordwrap')(15);
+
+console.log(wrap('You and your whole family are made out of meat.'));
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/index.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/index.js
new file mode 100644
index 0000000..c9bc945
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/index.js
@@ -0,0 +1,76 @@
+var wordwrap = module.exports = function (start, stop, params) {
+ if (typeof start === 'object') {
+ params = start;
+ start = params.start;
+ stop = params.stop;
+ }
+
+ if (typeof stop === 'object') {
+ params = stop;
+ start = start || params.start;
+ stop = undefined;
+ }
+
+ if (!stop) {
+ stop = start;
+ start = 0;
+ }
+
+ if (!params) params = {};
+ var mode = params.mode || 'soft';
+ var re = mode === 'hard' ? /\b/ : /(\S+\s+)/;
+
+ return function (text) {
+ var chunks = text.toString()
+ .split(re)
+ .reduce(function (acc, x) {
+ if (mode === 'hard') {
+ for (var i = 0; i < x.length; i += stop - start) {
+ acc.push(x.slice(i, i + stop - start));
+ }
+ }
+ else acc.push(x)
+ return acc;
+ }, [])
+ ;
+
+ return chunks.reduce(function (lines, rawChunk) {
+ if (rawChunk === '') return lines;
+
+ var chunk = rawChunk.replace(/\t/g, ' ');
+
+ var i = lines.length - 1;
+ if (lines[i].length + chunk.length > stop) {
+ lines[i] = lines[i].replace(/\s+$/, '');
+
+ chunk.split(/\n/).forEach(function (c) {
+ lines.push(
+ new Array(start + 1).join(' ')
+ + c.replace(/^\s+/, '')
+ );
+ });
+ }
+ else if (chunk.match(/\n/)) {
+ var xs = chunk.split(/\n/);
+ lines[i] += xs.shift();
+ xs.forEach(function (c) {
+ lines.push(
+ new Array(start + 1).join(' ')
+ + c.replace(/^\s+/, '')
+ );
+ });
+ }
+ else {
+ lines[i] += chunk;
+ }
+
+ return lines;
+ }, [ new Array(start + 1).join(' ') ]).join('\n');
+ };
+};
+
+wordwrap.soft = wordwrap;
+
+wordwrap.hard = function (start, stop) {
+ return wordwrap(start, stop, { mode : 'hard' });
+};
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/package.json b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/package.json
new file mode 100644
index 0000000..baaa04f
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "wordwrap",
+ "description": "Wrap those words. Show them at what columns to start and stop.",
+ "version": "0.0.3",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/node-wordwrap.git"
+ },
+ "main": "./index.js",
+ "keywords": [
+ "word",
+ "wrap",
+ "rule",
+ "format",
+ "column"
+ ],
+ "directories": {
+ "lib": ".",
+ "example": "example",
+ "test": "test"
+ },
+ "scripts": {
+ "test": "expresso"
+ },
+ "devDependencies": {
+ "expresso": "=0.7.x"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "license": "MIT",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d",
+ "bugs": {
+ "url": "https://github.com/substack/node-wordwrap/issues"
+ },
+ "homepage": "https://github.com/substack/node-wordwrap#readme",
+ "_id": "wordwrap@0.0.3",
+ "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107",
+ "_from": "wordwrap@>=0.0.2 <0.1.0",
+ "_npmVersion": "2.9.0",
+ "_nodeVersion": "2.0.0",
+ "_npmUser": {
+ "name": "substack",
+ "email": "substack@gmail.com"
+ },
+ "dist": {
+ "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107",
+ "tarball": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ }
+ ],
+ "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/break.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/break.js
new file mode 100644
index 0000000..749292e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/break.js
@@ -0,0 +1,30 @@
+var assert = require('assert');
+var wordwrap = require('../');
+
+exports.hard = function () {
+ var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,'
+ + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",'
+ + '"browser":"chrome/6.0"}'
+ ;
+ var s_ = wordwrap.hard(80)(s);
+
+ var lines = s_.split('\n');
+ assert.equal(lines.length, 2);
+ assert.ok(lines[0].length < 80);
+ assert.ok(lines[1].length < 80);
+
+ assert.equal(s, s_.replace(/\n/g, ''));
+};
+
+exports.break = function () {
+ var s = new Array(55+1).join('a');
+ var s_ = wordwrap.hard(20)(s);
+
+ var lines = s_.split('\n');
+ assert.equal(lines.length, 3);
+ assert.ok(lines[0].length === 20);
+ assert.ok(lines[1].length === 20);
+ assert.ok(lines[2].length === 15);
+
+ assert.equal(s, s_.replace(/\n/g, ''));
+};
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/idleness.txt b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/idleness.txt
new file mode 100644
index 0000000..aa3f490
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/idleness.txt
@@ -0,0 +1,63 @@
+In Praise of Idleness
+
+By Bertrand Russell
+
+[1932]
+
+Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain.
+
+Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise.
+
+One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling.
+
+But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person.
+
+All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work.
+
+First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising.
+
+Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example.
+
+From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery.
+
+It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization.
+
+Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry.
+
+This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined?
+
+The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion.
+
+Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only.
+
+I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve.
+
+If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense.
+
+The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists.
+
+In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism.
+
+The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching.
+
+For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours?
+
+In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man.
+
+In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed.
+
+The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy.
+
+It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer.
+
+When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part.
+
+In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism.
+
+The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits.
+
+In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue.
+
+Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever.
+
+[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests.
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/wrap.js b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/wrap.js
new file mode 100644
index 0000000..0cfb76d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/node_modules/wordwrap/test/wrap.js
@@ -0,0 +1,31 @@
+var assert = require('assert');
+var wordwrap = require('wordwrap');
+
+var fs = require('fs');
+var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8');
+
+exports.stop80 = function () {
+ var lines = wordwrap(80)(idleness).split(/\n/);
+ var words = idleness.split(/\s+/);
+
+ lines.forEach(function (line) {
+ assert.ok(line.length <= 80, 'line > 80 columns');
+ var chunks = line.match(/\S/) ? line.split(/\s+/) : [];
+ assert.deepEqual(chunks, words.splice(0, chunks.length));
+ });
+};
+
+exports.start20stop60 = function () {
+ var lines = wordwrap(20, 100)(idleness).split(/\n/);
+ var words = idleness.split(/\s+/);
+
+ lines.forEach(function (line) {
+ assert.ok(line.length <= 100, 'line > 100 columns');
+ var chunks = line
+ .split(/\s+/)
+ .filter(function (x) { return x.match(/\S/) })
+ ;
+ assert.deepEqual(chunks, words.splice(0, chunks.length));
+ assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' '));
+ });
+};
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/package.json b/tests/node_modules/nightwatch/node_modules/optimist/package.json
new file mode 100644
index 0000000..f103ad5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/package.json
@@ -0,0 +1,64 @@
+{
+ "name": "optimist",
+ "version": "0.6.1",
+ "description": "Light-weight option parsing with an argv hash. No optstrings attached.",
+ "main": "./index.js",
+ "dependencies": {
+ "wordwrap": "~0.0.2",
+ "minimist": "~0.0.1"
+ },
+ "devDependencies": {
+ "hashish": "~0.0.4",
+ "tap": "~0.4.0"
+ },
+ "scripts": {
+ "test": "tap ./test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/substack/node-optimist.git"
+ },
+ "keywords": [
+ "argument",
+ "args",
+ "option",
+ "parser",
+ "parsing",
+ "cli",
+ "command"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT/X11",
+ "engine": {
+ "node": ">=0.4"
+ },
+ "bugs": {
+ "url": "https://github.com/substack/node-optimist/issues"
+ },
+ "homepage": "https://github.com/substack/node-optimist",
+ "_id": "optimist@0.6.1",
+ "dist": {
+ "shasum": "da3ea74686fa21a19a111c326e90eb15a0196686",
+ "tarball": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz"
+ },
+ "_from": "optimist@>=0.3.5",
+ "_npmVersion": "1.3.21",
+ "_npmUser": {
+ "name": "substack",
+ "email": "mail@substack.net"
+ },
+ "maintainers": [
+ {
+ "name": "substack",
+ "email": "mail@substack.net"
+ }
+ ],
+ "directories": {},
+ "_shasum": "da3ea74686fa21a19a111c326e90eb15a0196686",
+ "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/readme.markdown b/tests/node_modules/nightwatch/node_modules/optimist/readme.markdown
new file mode 100644
index 0000000..b74b437
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/readme.markdown
@@ -0,0 +1,513 @@
+# DEPRECATION NOTICE
+
+I don't want to maintain this module anymore since I just use
+[minimist](https://npmjs.org/package/minimist), the argument parsing engine,
+directly instead nowadays.
+
+See [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed
+successor to optimist.
+
+[](https://github.com/chevex/yargs)
+
+You should also consider [nomnom](https://github.com/harthur/nomnom).
+
+optimist
+========
+
+Optimist is a node.js library for option parsing for people who hate option
+parsing. More specifically, this module is for people who like all the --bells
+and -whistlz of program usage but think optstrings are a waste of time.
+
+With optimist, option parsing doesn't have to suck (as much).
+
+[](http://travis-ci.org/substack/node-optimist)
+
+examples
+========
+
+With Optimist, the options are just a hash! No optstrings attached.
+-------------------------------------------------------------------
+
+xup.js:
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist').argv;
+
+if (argv.rif - 5 * argv.xup > 7.138) {
+ console.log('Buy more riffiwobbles');
+}
+else {
+ console.log('Sell the xupptumblers');
+}
+````
+
+***
+
+ $ ./xup.js --rif=55 --xup=9.52
+ Buy more riffiwobbles
+
+ $ ./xup.js --rif 12 --xup 8.1
+ Sell the xupptumblers
+
+
+
+But wait! There's more! You can do short options:
+-------------------------------------------------
+
+short.js:
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist').argv;
+console.log('(%d,%d)', argv.x, argv.y);
+````
+
+***
+
+ $ ./short.js -x 10 -y 21
+ (10,21)
+
+And booleans, both long and short (and grouped):
+----------------------------------
+
+bool.js:
+
+````javascript
+#!/usr/bin/env node
+var util = require('util');
+var argv = require('optimist').argv;
+
+if (argv.s) {
+ util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');
+}
+console.log(
+ (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')
+);
+````
+
+***
+
+ $ ./bool.js -s
+ The cat says: meow
+
+ $ ./bool.js -sp
+ The cat says: meow.
+
+ $ ./bool.js -sp --fr
+ Le chat dit: miaou.
+
+And non-hypenated options too! Just use `argv._`!
+-------------------------------------------------
+
+nonopt.js:
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist').argv;
+console.log('(%d,%d)', argv.x, argv.y);
+console.log(argv._);
+````
+
+***
+
+ $ ./nonopt.js -x 6.82 -y 3.35 moo
+ (6.82,3.35)
+ [ 'moo' ]
+
+ $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz
+ (0.54,1.12)
+ [ 'foo', 'bar', 'baz' ]
+
+Plus, Optimist comes with .usage() and .demand()!
+-------------------------------------------------
+
+divide.js:
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist')
+ .usage('Usage: $0 -x [num] -y [num]')
+ .demand(['x','y'])
+ .argv;
+
+console.log(argv.x / argv.y);
+````
+
+***
+
+ $ ./divide.js -x 55 -y 11
+ 5
+
+ $ node ./divide.js -x 4.91 -z 2.51
+ Usage: node ./divide.js -x [num] -y [num]
+
+ Options:
+ -x [required]
+ -y [required]
+
+ Missing required arguments: y
+
+EVEN MORE HOLY COW
+------------------
+
+default_singles.js:
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist')
+ .default('x', 10)
+ .default('y', 10)
+ .argv
+;
+console.log(argv.x + argv.y);
+````
+
+***
+
+ $ ./default_singles.js -x 5
+ 15
+
+default_hash.js:
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist')
+ .default({ x : 10, y : 10 })
+ .argv
+;
+console.log(argv.x + argv.y);
+````
+
+***
+
+ $ ./default_hash.js -y 7
+ 17
+
+And if you really want to get all descriptive about it...
+---------------------------------------------------------
+
+boolean_single.js
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist')
+ .boolean('v')
+ .argv
+;
+console.dir(argv);
+````
+
+***
+
+ $ ./boolean_single.js -v foo bar baz
+ true
+ [ 'bar', 'baz', 'foo' ]
+
+boolean_double.js
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist')
+ .boolean(['x','y','z'])
+ .argv
+;
+console.dir([ argv.x, argv.y, argv.z ]);
+console.dir(argv._);
+````
+
+***
+
+ $ ./boolean_double.js -x -z one two three
+ [ true, false, true ]
+ [ 'one', 'two', 'three' ]
+
+Optimist is here to help...
+---------------------------
+
+You can describe parameters for help messages and set aliases. Optimist figures
+out how to format a handy help string automatically.
+
+line_count.js
+
+````javascript
+#!/usr/bin/env node
+var argv = require('optimist')
+ .usage('Count the lines in a file.\nUsage: $0')
+ .demand('f')
+ .alias('f', 'file')
+ .describe('f', 'Load a file')
+ .argv
+;
+
+var fs = require('fs');
+var s = fs.createReadStream(argv.file);
+
+var lines = 0;
+s.on('data', function (buf) {
+ lines += buf.toString().match(/\n/g).length;
+});
+
+s.on('end', function () {
+ console.log(lines);
+});
+````
+
+***
+
+ $ node line_count.js
+ Count the lines in a file.
+ Usage: node ./line_count.js
+
+ Options:
+ -f, --file Load a file [required]
+
+ Missing required arguments: f
+
+ $ node line_count.js --file line_count.js
+ 20
+
+ $ node line_count.js -f line_count.js
+ 20
+
+methods
+=======
+
+By itself,
+
+````javascript
+require('optimist').argv
+`````
+
+will use `process.argv` array to construct the `argv` object.
+
+You can pass in the `process.argv` yourself:
+
+````javascript
+require('optimist')([ '-x', '1', '-y', '2' ]).argv
+````
+
+or use .parse() to do the same thing:
+
+````javascript
+require('optimist').parse([ '-x', '1', '-y', '2' ])
+````
+
+The rest of these methods below come in just before the terminating `.argv`.
+
+.alias(key, alias)
+------------------
+
+Set key names as equivalent such that updates to a key will propagate to aliases
+and vice-versa.
+
+Optionally `.alias()` can take an object that maps keys to aliases.
+
+.default(key, value)
+--------------------
+
+Set `argv[key]` to `value` if no option was specified on `process.argv`.
+
+Optionally `.default()` can take an object that maps keys to default values.
+
+.demand(key)
+------------
+
+If `key` is a string, show the usage information and exit if `key` wasn't
+specified in `process.argv`.
+
+If `key` is a number, demand at least as many non-option arguments, which show
+up in `argv._`.
+
+If `key` is an Array, demand each element.
+
+.describe(key, desc)
+--------------------
+
+Describe a `key` for the generated usage information.
+
+Optionally `.describe()` can take an object that maps keys to descriptions.
+
+.options(key, opt)
+------------------
+
+Instead of chaining together `.alias().demand().default()`, you can specify
+keys in `opt` for each of the chainable methods.
+
+For example:
+
+````javascript
+var argv = require('optimist')
+ .options('f', {
+ alias : 'file',
+ default : '/etc/passwd',
+ })
+ .argv
+;
+````
+
+is the same as
+
+````javascript
+var argv = require('optimist')
+ .alias('f', 'file')
+ .default('f', '/etc/passwd')
+ .argv
+;
+````
+
+Optionally `.options()` can take an object that maps keys to `opt` parameters.
+
+.usage(message)
+---------------
+
+Set a usage message to show which commands to use. Inside `message`, the string
+`$0` will get interpolated to the current script name or node command for the
+present script similar to how `$0` works in bash or perl.
+
+.check(fn)
+----------
+
+Check that certain conditions are met in the provided arguments.
+
+If `fn` throws or returns `false`, show the thrown error, usage information, and
+exit.
+
+.boolean(key)
+-------------
+
+Interpret `key` as a boolean. If a non-flag option follows `key` in
+`process.argv`, that string won't get set as the value of `key`.
+
+If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be
+`false`.
+
+If `key` is an Array, interpret all the elements as booleans.
+
+.string(key)
+------------
+
+Tell the parser logic not to interpret `key` as a number or boolean.
+This can be useful if you need to preserve leading zeros in an input.
+
+If `key` is an Array, interpret all the elements as strings.
+
+.wrap(columns)
+--------------
+
+Format usage output to wrap at `columns` many columns.
+
+.help()
+-------
+
+Return the generated usage string.
+
+.showHelp(fn=console.error)
+---------------------------
+
+Print the usage data using `fn` for printing.
+
+.parse(args)
+------------
+
+Parse `args` instead of `process.argv`. Returns the `argv` object.
+
+.argv
+-----
+
+Get the arguments as a plain old object.
+
+Arguments without a corresponding flag show up in the `argv._` array.
+
+The script name or node command is available at `argv.$0` similarly to how `$0`
+works in bash or perl.
+
+parsing tricks
+==============
+
+stop parsing
+------------
+
+Use `--` to stop parsing flags and stuff the remainder into `argv._`.
+
+ $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4
+ { _: [ '-c', '3', '-d', '4' ],
+ '$0': 'node ./examples/reflect.js',
+ a: 1,
+ b: 2 }
+
+negate fields
+-------------
+
+If you want to explicity set a field to false instead of just leaving it
+undefined or to override a default you can do `--no-key`.
+
+ $ node examples/reflect.js -a --no-b
+ { _: [],
+ '$0': 'node ./examples/reflect.js',
+ a: true,
+ b: false }
+
+numbers
+-------
+
+Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to
+one. This way you can just `net.createConnection(argv.port)` and you can add
+numbers out of `argv` with `+` without having that mean concatenation,
+which is super frustrating.
+
+duplicates
+----------
+
+If you specify a flag multiple times it will get turned into an array containing
+all the values in order.
+
+ $ node examples/reflect.js -x 5 -x 8 -x 0
+ { _: [],
+ '$0': 'node ./examples/reflect.js',
+ x: [ 5, 8, 0 ] }
+
+dot notation
+------------
+
+When you use dots (`.`s) in argument names, an implicit object path is assumed.
+This lets you organize arguments into nested objects.
+
+ $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5
+ { _: [],
+ '$0': 'node ./examples/reflect.js',
+ foo: { bar: { baz: 33 }, quux: 5 } }
+
+short numbers
+-------------
+
+Short numeric `head -n5` style argument work too:
+
+ $ node reflect.js -n123 -m456
+ { '3': true,
+ '6': true,
+ _: [],
+ '$0': 'node ./reflect.js',
+ n: 123,
+ m: 456 }
+
+installation
+============
+
+With [npm](http://github.com/isaacs/npm), just do:
+ npm install optimist
+
+or clone this project on github:
+
+ git clone http://github.com/substack/node-optimist.git
+
+To run the tests with [expresso](http://github.com/visionmedia/expresso),
+just do:
+
+ expresso
+
+inspired By
+===========
+
+This module is loosely inspired by Perl's
+[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/_.js b/tests/node_modules/nightwatch/node_modules/optimist/test/_.js
new file mode 100644
index 0000000..d9c58b3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/_.js
@@ -0,0 +1,71 @@
+var spawn = require('child_process').spawn;
+var test = require('tap').test;
+
+test('dotSlashEmpty', testCmd('./bin.js', []));
+
+test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ]));
+
+test('nodeEmpty', testCmd('node bin.js', []));
+
+test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ]));
+
+test('whichNodeEmpty', function (t) {
+ var which = spawn('which', ['node']);
+
+ which.stdout.on('data', function (buf) {
+ t.test(
+ testCmd(buf.toString().trim() + ' bin.js', [])
+ );
+ t.end();
+ });
+
+ which.stderr.on('data', function (err) {
+ assert.error(err);
+ t.end();
+ });
+});
+
+test('whichNodeArgs', function (t) {
+ var which = spawn('which', ['node']);
+
+ which.stdout.on('data', function (buf) {
+ t.test(
+ testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ])
+ );
+ t.end();
+ });
+
+ which.stderr.on('data', function (err) {
+ t.error(err);
+ t.end();
+ });
+});
+
+function testCmd (cmd, args) {
+
+ return function (t) {
+ var to = setTimeout(function () {
+ assert.fail('Never got stdout data.')
+ }, 5000);
+
+ var oldDir = process.cwd();
+ process.chdir(__dirname + '/_');
+
+ var cmds = cmd.split(' ');
+
+ var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String)));
+ process.chdir(oldDir);
+
+ bin.stderr.on('data', function (err) {
+ t.error(err);
+ t.end();
+ });
+
+ bin.stdout.on('data', function (buf) {
+ clearTimeout(to);
+ var _ = JSON.parse(buf.toString());
+ t.same(_.map(String), args.map(String));
+ t.end();
+ });
+ };
+}
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/_/argv.js b/tests/node_modules/nightwatch/node_modules/optimist/test/_/argv.js
new file mode 100644
index 0000000..3d09606
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/_/argv.js
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+console.log(JSON.stringify(process.argv));
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/_/bin.js b/tests/node_modules/nightwatch/node_modules/optimist/test/_/bin.js
new file mode 100755
index 0000000..4a18d85
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/_/bin.js
@@ -0,0 +1,3 @@
+#!/usr/bin/env node
+var argv = require('../../index').argv
+console.log(JSON.stringify(argv._));
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/dash.js b/tests/node_modules/nightwatch/node_modules/optimist/test/dash.js
new file mode 100644
index 0000000..af8ed6f
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/dash.js
@@ -0,0 +1,31 @@
+var optimist = require('../index');
+var test = require('tap').test;
+
+test('-', function (t) {
+ t.plan(5);
+ t.deepEqual(
+ fix(optimist.parse([ '-n', '-' ])),
+ { n: '-', _: [] }
+ );
+ t.deepEqual(
+ fix(optimist.parse([ '-' ])),
+ { _: [ '-' ] }
+ );
+ t.deepEqual(
+ fix(optimist.parse([ '-f-' ])),
+ { f: '-', _: [] }
+ );
+ t.deepEqual(
+ fix(optimist([ '-b', '-' ]).boolean('b').argv),
+ { b: true, _: [ '-' ] }
+ );
+ t.deepEqual(
+ fix(optimist([ '-s', '-' ]).string('s').argv),
+ { s: '-', _: [] }
+ );
+});
+
+function fix (obj) {
+ delete obj.$0;
+ return obj;
+}
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/parse.js b/tests/node_modules/nightwatch/node_modules/optimist/test/parse.js
new file mode 100644
index 0000000..d320f43
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/parse.js
@@ -0,0 +1,446 @@
+var optimist = require('../index');
+var path = require('path');
+var test = require('tap').test;
+
+var $0 = 'node ./' + path.relative(process.cwd(), __filename);
+
+test('short boolean', function (t) {
+ var parse = optimist.parse([ '-b' ]);
+ t.same(parse, { b : true, _ : [], $0 : $0 });
+ t.same(typeof parse.b, 'boolean');
+ t.end();
+});
+
+test('long boolean', function (t) {
+ t.same(
+ optimist.parse([ '--bool' ]),
+ { bool : true, _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('bare', function (t) {
+ t.same(
+ optimist.parse([ 'foo', 'bar', 'baz' ]),
+ { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 }
+ );
+ t.end();
+});
+
+test('short group', function (t) {
+ t.same(
+ optimist.parse([ '-cats' ]),
+ { c : true, a : true, t : true, s : true, _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('short group next', function (t) {
+ t.same(
+ optimist.parse([ '-cats', 'meow' ]),
+ { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('short capture', function (t) {
+ t.same(
+ optimist.parse([ '-h', 'localhost' ]),
+ { h : 'localhost', _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('short captures', function (t) {
+ t.same(
+ optimist.parse([ '-h', 'localhost', '-p', '555' ]),
+ { h : 'localhost', p : 555, _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('long capture sp', function (t) {
+ t.same(
+ optimist.parse([ '--pow', 'xixxle' ]),
+ { pow : 'xixxle', _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('long capture eq', function (t) {
+ t.same(
+ optimist.parse([ '--pow=xixxle' ]),
+ { pow : 'xixxle', _ : [], $0 : $0 }
+ );
+ t.end()
+});
+
+test('long captures sp', function (t) {
+ t.same(
+ optimist.parse([ '--host', 'localhost', '--port', '555' ]),
+ { host : 'localhost', port : 555, _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('long captures eq', function (t) {
+ t.same(
+ optimist.parse([ '--host=localhost', '--port=555' ]),
+ { host : 'localhost', port : 555, _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('mixed short bool and capture', function (t) {
+ t.same(
+ optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+ {
+ f : true, p : 555, h : 'localhost',
+ _ : [ 'script.js' ], $0 : $0,
+ }
+ );
+ t.end();
+});
+
+test('short and long', function (t) {
+ t.same(
+ optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+ {
+ f : true, p : 555, h : 'localhost',
+ _ : [ 'script.js' ], $0 : $0,
+ }
+ );
+ t.end();
+});
+
+test('no', function (t) {
+ t.same(
+ optimist.parse([ '--no-moo' ]),
+ { moo : false, _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('multi', function (t) {
+ t.same(
+ optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
+ { v : ['a','b','c'], _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('comprehensive', function (t) {
+ t.same(
+ optimist.parse([
+ '--name=meowmers', 'bare', '-cats', 'woo',
+ '-h', 'awesome', '--multi=quux',
+ '--key', 'value',
+ '-b', '--bool', '--no-meep', '--multi=baz',
+ '--', '--not-a-flag', 'eek'
+ ]),
+ {
+ c : true,
+ a : true,
+ t : true,
+ s : 'woo',
+ h : 'awesome',
+ b : true,
+ bool : true,
+ key : 'value',
+ multi : [ 'quux', 'baz' ],
+ meep : false,
+ name : 'meowmers',
+ _ : [ 'bare', '--not-a-flag', 'eek' ],
+ $0 : $0
+ }
+ );
+ t.end();
+});
+
+test('nums', function (t) {
+ var argv = optimist.parse([
+ '-x', '1234',
+ '-y', '5.67',
+ '-z', '1e7',
+ '-w', '10f',
+ '--hex', '0xdeadbeef',
+ '789',
+ ]);
+ t.same(argv, {
+ x : 1234,
+ y : 5.67,
+ z : 1e7,
+ w : '10f',
+ hex : 0xdeadbeef,
+ _ : [ 789 ],
+ $0 : $0
+ });
+ t.same(typeof argv.x, 'number');
+ t.same(typeof argv.y, 'number');
+ t.same(typeof argv.z, 'number');
+ t.same(typeof argv.w, 'string');
+ t.same(typeof argv.hex, 'number');
+ t.same(typeof argv._[0], 'number');
+ t.end();
+});
+
+test('flag boolean', function (t) {
+ var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv;
+ t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 });
+ t.same(typeof parse.t, 'boolean');
+ t.end();
+});
+
+test('flag boolean value', function (t) {
+ var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true'])
+ .boolean(['t', 'verbose']).default('verbose', true).argv;
+
+ t.same(parse, {
+ verbose: false,
+ t: true,
+ _: ['moo'],
+ $0 : $0
+ });
+
+ t.same(typeof parse.verbose, 'boolean');
+ t.same(typeof parse.t, 'boolean');
+ t.end();
+});
+
+test('flag boolean default false', function (t) {
+ var parse = optimist(['moo'])
+ .boolean(['t', 'verbose'])
+ .default('verbose', false)
+ .default('t', false).argv;
+
+ t.same(parse, {
+ verbose: false,
+ t: false,
+ _: ['moo'],
+ $0 : $0
+ });
+
+ t.same(typeof parse.verbose, 'boolean');
+ t.same(typeof parse.t, 'boolean');
+ t.end();
+
+});
+
+test('boolean groups', function (t) {
+ var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ])
+ .boolean(['x','y','z']).argv;
+
+ t.same(parse, {
+ x : true,
+ y : false,
+ z : true,
+ _ : [ 'one', 'two', 'three' ],
+ $0 : $0
+ });
+
+ t.same(typeof parse.x, 'boolean');
+ t.same(typeof parse.y, 'boolean');
+ t.same(typeof parse.z, 'boolean');
+ t.end();
+});
+
+test('newlines in params' , function (t) {
+ var args = optimist.parse([ '-s', "X\nX" ])
+ t.same(args, { _ : [], s : "X\nX", $0 : $0 });
+
+ // reproduce in bash:
+ // VALUE="new
+ // line"
+ // node program.js --s="$VALUE"
+ args = optimist.parse([ "--s=X\nX" ])
+ t.same(args, { _ : [], s : "X\nX", $0 : $0 });
+ t.end();
+});
+
+test('strings' , function (t) {
+ var s = optimist([ '-s', '0001234' ]).string('s').argv.s;
+ t.same(s, '0001234');
+ t.same(typeof s, 'string');
+
+ var x = optimist([ '-x', '56' ]).string('x').argv.x;
+ t.same(x, '56');
+ t.same(typeof x, 'string');
+ t.end();
+});
+
+test('stringArgs', function (t) {
+ var s = optimist([ ' ', ' ' ]).string('_').argv._;
+ t.same(s.length, 2);
+ t.same(typeof s[0], 'string');
+ t.same(s[0], ' ');
+ t.same(typeof s[1], 'string');
+ t.same(s[1], ' ');
+ t.end();
+});
+
+test('slashBreak', function (t) {
+ t.same(
+ optimist.parse([ '-I/foo/bar/baz' ]),
+ { I : '/foo/bar/baz', _ : [], $0 : $0 }
+ );
+ t.same(
+ optimist.parse([ '-xyz/foo/bar/baz' ]),
+ { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 }
+ );
+ t.end();
+});
+
+test('alias', function (t) {
+ var argv = optimist([ '-f', '11', '--zoom', '55' ])
+ .alias('z', 'zoom')
+ .argv
+ ;
+ t.equal(argv.zoom, 55);
+ t.equal(argv.z, argv.zoom);
+ t.equal(argv.f, 11);
+ t.end();
+});
+
+test('multiAlias', function (t) {
+ var argv = optimist([ '-f', '11', '--zoom', '55' ])
+ .alias('z', [ 'zm', 'zoom' ])
+ .argv
+ ;
+ t.equal(argv.zoom, 55);
+ t.equal(argv.z, argv.zoom);
+ t.equal(argv.z, argv.zm);
+ t.equal(argv.f, 11);
+ t.end();
+});
+
+test('boolean default true', function (t) {
+ var argv = optimist.options({
+ sometrue: {
+ boolean: true,
+ default: true
+ }
+ }).argv;
+
+ t.equal(argv.sometrue, true);
+ t.end();
+});
+
+test('boolean default false', function (t) {
+ var argv = optimist.options({
+ somefalse: {
+ boolean: true,
+ default: false
+ }
+ }).argv;
+
+ t.equal(argv.somefalse, false);
+ t.end();
+});
+
+test('nested dotted objects', function (t) {
+ var argv = optimist([
+ '--foo.bar', '3', '--foo.baz', '4',
+ '--foo.quux.quibble', '5', '--foo.quux.o_O',
+ '--beep.boop'
+ ]).argv;
+
+ t.same(argv.foo, {
+ bar : 3,
+ baz : 4,
+ quux : {
+ quibble : 5,
+ o_O : true
+ },
+ });
+ t.same(argv.beep, { boop : true });
+ t.end();
+});
+
+test('boolean and alias with chainable api', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ herp: { alias: 'h', boolean: true }
+ };
+ var aliasedArgv = optimist(aliased)
+ .boolean('herp')
+ .alias('h', 'herp')
+ .argv;
+ var propertyArgv = optimist(regular)
+ .boolean('herp')
+ .alias('h', 'herp')
+ .argv;
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ],
+ '$0': $0,
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+test('boolean and alias with options hash', function (t) {
+ var aliased = [ '-h', 'derp' ];
+ var regular = [ '--herp', 'derp' ];
+ var opts = {
+ herp: { alias: 'h', boolean: true }
+ };
+ var aliasedArgv = optimist(aliased)
+ .options(opts)
+ .argv;
+ var propertyArgv = optimist(regular).options(opts).argv;
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ 'derp' ],
+ '$0': $0,
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+
+ t.end();
+});
+
+test('boolean and alias using explicit true', function (t) {
+ var aliased = [ '-h', 'true' ];
+ var regular = [ '--herp', 'true' ];
+ var opts = {
+ herp: { alias: 'h', boolean: true }
+ };
+ var aliasedArgv = optimist(aliased)
+ .boolean('h')
+ .alias('h', 'herp')
+ .argv;
+ var propertyArgv = optimist(regular)
+ .boolean('h')
+ .alias('h', 'herp')
+ .argv;
+ var expected = {
+ herp: true,
+ h: true,
+ '_': [ ],
+ '$0': $0,
+ };
+
+ t.same(aliasedArgv, expected);
+ t.same(propertyArgv, expected);
+ t.end();
+});
+
+// regression, see https://github.com/substack/node-optimist/issues/71
+test('boolean and --x=true', function(t) {
+ var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv;
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'true');
+
+ parsed = optimist(['--boool', '--other=false']).boolean('boool').argv;
+
+ t.same(parsed.boool, true);
+ t.same(parsed.other, 'false');
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/parse_modified.js b/tests/node_modules/nightwatch/node_modules/optimist/test/parse_modified.js
new file mode 100644
index 0000000..a57dc84
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/parse_modified.js
@@ -0,0 +1,14 @@
+var optimist = require('../');
+var test = require('tap').test;
+
+test('parse with modifier functions' , function (t) {
+ t.plan(1);
+
+ var argv = optimist().boolean('b').parse([ '-b', '123' ]);
+ t.deepEqual(fix(argv), { b: true, _: ['123'] });
+});
+
+function fix (obj) {
+ delete obj.$0;
+ return obj;
+}
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/short.js b/tests/node_modules/nightwatch/node_modules/optimist/test/short.js
new file mode 100644
index 0000000..b2c38ad
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/short.js
@@ -0,0 +1,16 @@
+var optimist = require('../index');
+var test = require('tap').test;
+
+test('-n123', function (t) {
+ t.plan(1);
+ var parse = optimist.parse([ '-n123' ]);
+ t.equal(parse.n, 123);
+});
+
+test('-123', function (t) {
+ t.plan(3);
+ var parse = optimist.parse([ '-123', '456' ]);
+ t.equal(parse['1'], true);
+ t.equal(parse['2'], true);
+ t.equal(parse['3'], 456);
+});
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/usage.js b/tests/node_modules/nightwatch/node_modules/optimist/test/usage.js
new file mode 100644
index 0000000..300454c
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/usage.js
@@ -0,0 +1,292 @@
+var Hash = require('hashish');
+var optimist = require('../index');
+var test = require('tap').test;
+
+test('usageFail', function (t) {
+ var r = checkUsage(function () {
+ return optimist('-x 10 -z 20'.split(' '))
+ .usage('Usage: $0 -x NUM -y NUM')
+ .demand(['x','y'])
+ .argv;
+ });
+ t.same(
+ r.result,
+ { x : 10, z : 20, _ : [], $0 : './usage' }
+ );
+
+ t.same(
+ r.errors.join('\n').split(/\n+/),
+ [
+ 'Usage: ./usage -x NUM -y NUM',
+ 'Options:',
+ ' -x [required]',
+ ' -y [required]',
+ 'Missing required arguments: y',
+ ]
+ );
+ t.same(r.logs, []);
+ t.ok(r.exit);
+ t.end();
+});
+
+
+test('usagePass', function (t) {
+ var r = checkUsage(function () {
+ return optimist('-x 10 -y 20'.split(' '))
+ .usage('Usage: $0 -x NUM -y NUM')
+ .demand(['x','y'])
+ .argv;
+ });
+ t.same(r, {
+ result : { x : 10, y : 20, _ : [], $0 : './usage' },
+ errors : [],
+ logs : [],
+ exit : false,
+ });
+ t.end();
+});
+
+test('checkPass', function (t) {
+ var r = checkUsage(function () {
+ return optimist('-x 10 -y 20'.split(' '))
+ .usage('Usage: $0 -x NUM -y NUM')
+ .check(function (argv) {
+ if (!('x' in argv)) throw 'You forgot about -x';
+ if (!('y' in argv)) throw 'You forgot about -y';
+ })
+ .argv;
+ });
+ t.same(r, {
+ result : { x : 10, y : 20, _ : [], $0 : './usage' },
+ errors : [],
+ logs : [],
+ exit : false,
+ });
+ t.end();
+});
+
+test('checkFail', function (t) {
+ var r = checkUsage(function () {
+ return optimist('-x 10 -z 20'.split(' '))
+ .usage('Usage: $0 -x NUM -y NUM')
+ .check(function (argv) {
+ if (!('x' in argv)) throw 'You forgot about -x';
+ if (!('y' in argv)) throw 'You forgot about -y';
+ })
+ .argv;
+ });
+
+ t.same(
+ r.result,
+ { x : 10, z : 20, _ : [], $0 : './usage' }
+ );
+
+ t.same(
+ r.errors.join('\n').split(/\n+/),
+ [
+ 'Usage: ./usage -x NUM -y NUM',
+ 'You forgot about -y'
+ ]
+ );
+
+ t.same(r.logs, []);
+ t.ok(r.exit);
+ t.end();
+});
+
+test('checkCondPass', function (t) {
+ function checker (argv) {
+ return 'x' in argv && 'y' in argv;
+ }
+
+ var r = checkUsage(function () {
+ return optimist('-x 10 -y 20'.split(' '))
+ .usage('Usage: $0 -x NUM -y NUM')
+ .check(checker)
+ .argv;
+ });
+ t.same(r, {
+ result : { x : 10, y : 20, _ : [], $0 : './usage' },
+ errors : [],
+ logs : [],
+ exit : false,
+ });
+ t.end();
+});
+
+test('checkCondFail', function (t) {
+ function checker (argv) {
+ return 'x' in argv && 'y' in argv;
+ }
+
+ var r = checkUsage(function () {
+ return optimist('-x 10 -z 20'.split(' '))
+ .usage('Usage: $0 -x NUM -y NUM')
+ .check(checker)
+ .argv;
+ });
+
+ t.same(
+ r.result,
+ { x : 10, z : 20, _ : [], $0 : './usage' }
+ );
+
+ t.same(
+ r.errors.join('\n').split(/\n+/).join('\n'),
+ 'Usage: ./usage -x NUM -y NUM\n'
+ + 'Argument check failed: ' + checker.toString()
+ );
+
+ t.same(r.logs, []);
+ t.ok(r.exit);
+ t.end();
+});
+
+test('countPass', function (t) {
+ var r = checkUsage(function () {
+ return optimist('1 2 3 --moo'.split(' '))
+ .usage('Usage: $0 [x] [y] [z] {OPTIONS}')
+ .demand(3)
+ .argv;
+ });
+ t.same(r, {
+ result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' },
+ errors : [],
+ logs : [],
+ exit : false,
+ });
+ t.end();
+});
+
+test('countFail', function (t) {
+ var r = checkUsage(function () {
+ return optimist('1 2 --moo'.split(' '))
+ .usage('Usage: $0 [x] [y] [z] {OPTIONS}')
+ .demand(3)
+ .argv;
+ });
+ t.same(
+ r.result,
+ { _ : [ '1', '2' ], moo : true, $0 : './usage' }
+ );
+
+ t.same(
+ r.errors.join('\n').split(/\n+/),
+ [
+ 'Usage: ./usage [x] [y] [z] {OPTIONS}',
+ 'Not enough non-option arguments: got 2, need at least 3',
+ ]
+ );
+
+ t.same(r.logs, []);
+ t.ok(r.exit);
+ t.end();
+});
+
+test('defaultSingles', function (t) {
+ var r = checkUsage(function () {
+ return optimist('--foo 50 --baz 70 --powsy'.split(' '))
+ .default('foo', 5)
+ .default('bar', 6)
+ .default('baz', 7)
+ .argv
+ ;
+ });
+ t.same(r.result, {
+ foo : '50',
+ bar : 6,
+ baz : '70',
+ powsy : true,
+ _ : [],
+ $0 : './usage',
+ });
+ t.end();
+});
+
+test('defaultAliases', function (t) {
+ var r = checkUsage(function () {
+ return optimist('')
+ .alias('f', 'foo')
+ .default('f', 5)
+ .argv
+ ;
+ });
+ t.same(r.result, {
+ f : '5',
+ foo : '5',
+ _ : [],
+ $0 : './usage',
+ });
+ t.end();
+});
+
+test('defaultHash', function (t) {
+ var r = checkUsage(function () {
+ return optimist('--foo 50 --baz 70'.split(' '))
+ .default({ foo : 10, bar : 20, quux : 30 })
+ .argv
+ ;
+ });
+ t.same(r.result, {
+ _ : [],
+ $0 : './usage',
+ foo : 50,
+ baz : 70,
+ bar : 20,
+ quux : 30,
+ });
+ t.end();
+});
+
+test('rebase', function (t) {
+ t.equal(
+ optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'),
+ './foo/bar/baz'
+ );
+ t.equal(
+ optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'),
+ '../../..'
+ );
+ t.equal(
+ optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'),
+ '../pow/zoom.txt'
+ );
+ t.end();
+});
+
+function checkUsage (f) {
+
+ var exit = false;
+
+ process._exit = process.exit;
+ process._env = process.env;
+ process._argv = process.argv;
+
+ process.exit = function (t) { exit = true };
+ process.env = Hash.merge(process.env, { _ : 'node' });
+ process.argv = [ './usage' ];
+
+ var errors = [];
+ var logs = [];
+
+ console._error = console.error;
+ console.error = function (msg) { errors.push(msg) };
+ console._log = console.log;
+ console.log = function (msg) { logs.push(msg) };
+
+ var result = f();
+
+ process.exit = process._exit;
+ process.env = process._env;
+ process.argv = process._argv;
+
+ console.error = console._error;
+ console.log = console._log;
+
+ return {
+ errors : errors,
+ logs : logs,
+ exit : exit,
+ result : result,
+ };
+};
diff --git a/tests/node_modules/nightwatch/node_modules/optimist/test/whitespace.js b/tests/node_modules/nightwatch/node_modules/optimist/test/whitespace.js
new file mode 100644
index 0000000..90b9075
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/optimist/test/whitespace.js
@@ -0,0 +1,8 @@
+var optimist = require('../');
+var test = require('tap').test;
+
+test('whitespace should be whitespace' , function (t) {
+ t.plan(1);
+ var x = optimist.parse([ '-x', '\t' ]).x;
+ t.equal(x, '\t');
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/.npmignore
new file mode 100644
index 0000000..9e7ca30
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/.npmignore
@@ -0,0 +1,3 @@
+/node_modules
+
+/?.js
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/.travis.yml
new file mode 100644
index 0000000..85a5012
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
+ - npm install -g npm@latest
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/History.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/History.md
new file mode 100644
index 0000000..d70b34f
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/History.md
@@ -0,0 +1,46 @@
+
+2.0.0 / 2015-07-15
+==================
+
+ * package: add test case dev dependencies
+ * test: don't use `url.parse()` for one of the tests
+ * test: introduce some real test cases
+ * README: document new, simpler API
+ * refactor to inherit from "agent-base"
+
+1.1.1 / 2015-07-01
+==================
+
+ * package: remove "superagent" dev dep (not used)
+ * use new socks-proxy-agent (#6, @MatthewMueller)
+ * README: use SVG for Travis-CI badge
+ * add more proxy types for socks proxy (#5, @andyhu)
+ * index: fix passing the `secure` flag to PacProxyAgent
+
+1.1.0 / 2014-01-12
+==================
+
+ * gitignore: ignore development test files
+ * index: use "pac-proxy-agent" for "pac+*" proxy URLs
+ * package: update "lru-cache" to v2.5.0
+
+1.0.0 / 2013-11-21
+==================
+
+ * add .travis.yml file
+ * test: add initial tests
+ * test: add a test for unsupported protocols
+ * index: extract the `types` array logic into a function
+ * index: throw a TypeError if no "uri" is passed in
+ * index: use Object.create(null) for the proxies dict
+ * package: add "socks" as a keyword
+
+0.0.2 / 2013-11-20
+==================
+
+ * index: walk up the prototype chain to get the proxy types
+
+0.0.1 / 2013-11-20
+==================
+
+ * intial release
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/README.md
new file mode 100644
index 0000000..27831e9
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/README.md
@@ -0,0 +1,103 @@
+proxy-agent
+===========
+### Maps proxy protocols to `http.Agent` implementations
+[](https://travis-ci.org/TooTallNate/node-proxy-agent)
+
+This module provides a function that returns proxying `http.Agent` instances to
+use based off of a given proxy URI.
+
+An LRU cache is used so that `http.Agent` instances are transparently re-used for
+subsequent HTTP requests to the same proxy server.
+
+The currently implemented protocol mappings are listed in the table below:
+
+
+| Protocol | Proxy Agent for `http` requests | Proxy Agent for `https` requests | Example
+|:----------:|:-------------------------------:|:--------------------------------:|:--------:
+| `http` | [http-proxy-agent][] | [https-proxy-agent][] | `http://proxy-server-over-tcp.com:3128`
+| `https` | [http-proxy-agent][] | [https-proxy-agent][] | `https://proxy-server-over-tls.com:3129`
+| `socks(v5)`| [socks-proxy-agent][] | [socks-proxy-agent][] | `socks://username:password@some-socks-proxy.com:9050` (username & password are optional)
+| `socks5` | [socks-proxy-agent][] | [socks-proxy-agent][] | `socks5://username:password@some-socks-proxy.com:9050` (username & password are optional)
+| `socks4` | [socks-proxy-agent][] | [socks-proxy-agent][] | `socks4://some-socks-proxy.com:9050`
+| `pac` | [pac-proxy-agent][] | [pac-proxy-agent][] | `pac+http://www.example.com/proxy.pac`
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install proxy-agent
+```
+
+
+Example
+-------
+
+``` js
+var http = require('http');
+var ProxyAgent = require('proxy-agent');
+
+// HTTP, HTTPS, or SOCKS proxy to use
+var proxyUri = process.env.http_proxy || 'http://168.63.43.102:3128';
+
+var opts = {
+ method: 'GET',
+ host: 'jsonip.org',
+ path: '/',
+ // this is the important part!
+ agent: new ProxyAgent(proxyUri)
+};
+
+// the rest works just like any other normal HTTP request
+http.get(opts, onresponse);
+
+function onresponse (res) {
+ console.log(res.statusCode, res.headers);
+ res.pipe(process.stdout);
+}
+```
+
+
+API
+---
+
+### new ProxyAgent(Object|String opts|uri)
+
+Returns an `http.Agent` instance based off of the given proxy `opts` or URI
+string. An LRU cache is used, so the same `http.Agent` instance will be
+returned if identical args are passed in.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent
+[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
+[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
+[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/index.js
new file mode 100644
index 0000000..e16c83a
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/index.js
@@ -0,0 +1,163 @@
+
+/**
+ * Module dependencies.
+ */
+
+var url = require('url');
+var LRU = require('lru-cache');
+var extend = require('extend');
+var Agent = require('agent-base');
+var inherits = require('util').inherits;
+var debug = require('debug')('proxy-agent');
+
+var PacProxyAgent = require('pac-proxy-agent');
+var HttpProxyAgent = require('http-proxy-agent');
+var HttpsProxyAgent = require('https-proxy-agent');
+var SocksProxyAgent = require('socks-proxy-agent');
+
+/**
+ * Module exports.
+ */
+
+exports = module.exports = ProxyAgent;
+
+/**
+ * Number of `http.Agent` instances to cache.
+ *
+ * This value was arbitrarily chosen... a better
+ * value could be conceived with some benchmarks.
+ */
+
+var cacheSize = 20;
+
+/**
+ * Cache for `http.Agent` instances.
+ */
+
+exports.cache = new LRU(cacheSize);
+
+/**
+ * Built-in proxy types.
+ */
+
+exports.proxies = Object.create(null);
+exports.proxies.http = httpOrHttpsProxy;
+exports.proxies.https = httpOrHttpsProxy;
+exports.proxies.socks = SocksProxyAgent;
+exports.proxies.socks4 = SocksProxyAgent;
+exports.proxies.socks4a = SocksProxyAgent;
+exports.proxies.socks5 = SocksProxyAgent;
+exports.proxies.socks5h = SocksProxyAgent;
+
+PacProxyAgent.protocols.forEach(function (protocol) {
+ exports.proxies['pac+' + protocol] = PacProxyAgent;
+});
+
+function httpOrHttpsProxy (opts, secureEndpoint) {
+ if (secureEndpoint) {
+ // HTTPS
+ return new HttpsProxyAgent(opts);
+ } else {
+ // HTTP
+ return new HttpProxyAgent(opts);
+ }
+}
+
+/**
+ * Attempts to get an `http.Agent` instance based off of the given proxy URI
+ * information, and the `secure` flag.
+ *
+ * An LRU cache is used, to prevent unnecessary creation of proxy
+ * `http.Agent` instances.
+ *
+ * @param {String} uri proxy url
+ * @param {Boolean} secure true if this is for an HTTPS request, false for HTTP
+ * @return {http.Agent}
+ * @api public
+ */
+
+function ProxyAgent (opts) {
+ if (!(this instanceof ProxyAgent)) return new ProxyAgent(opts);
+ if ('string' == typeof opts) opts = url.parse(opts);
+ if (!opts) throw new TypeError('an HTTP(S) proxy server `host` and `protocol` must be specified!');
+ debug('creating new ProxyAgent instance: %o', opts);
+ Agent.call(this, connect);
+
+ var proxies;
+ if (opts.proxies) {
+ proxies = extend(Object.create(exports.proxies), opts.proxies);
+ } else {
+ proxies = exports.proxies;
+ }
+
+ // get the requested proxy "protocol"
+ var protocol = opts.protocol;
+ if (!protocol) {
+ throw new TypeError('You must specify a string "protocol" for the ' +
+ 'proxy type (' + types().join(', ') + ')');
+ }
+
+ // strip the trailing ":" if present
+ if (':' == protocol[protocol.length - 1]) {
+ protocol = protocol.substring(0, protocol.length - 1);
+ }
+
+ // get the proxy `http.Agent` creation function
+ var proxyFn = proxies[protocol];
+ if ('function' != typeof proxyFn) {
+ throw new TypeError('unsupported proxy protocol: "' + protocol + '"');
+ }
+
+ this.proxy = opts;
+ // format the proxy info back into a URI, since an opts object
+ // could have been passed in originally. This generated URI is used
+ // as part of the "key" for the LRU cache
+ this.proxyUri = url.format({
+ protocol: protocol + ':',
+ slashes: true,
+ hostname: opts.hostname || opts.host,
+ port: opts.port
+ });
+ this.proxyFn = proxyFn;
+}
+inherits(ProxyAgent, Agent);
+
+/**
+ *
+ */
+
+function connect (req, opts, fn) {
+ // create the "key" for the LRU cache
+ var key = this.proxyUri;
+ if (opts.secureEndpoint) key += ' secure';
+
+ // attempt to get a cached `http.Agent` instance first
+ var agent = exports.cache.get(key);
+ if (!agent) {
+ // get an `http.Agent` instance from protocol-specific agent function
+ agent = this.proxyFn(this.proxy, opts.secureEndpoint);
+ if (agent) exports.cache.set(key, agent);
+ } else {
+ debug('cache hit with key: %o', key);
+ }
+
+ // XXX: agent.callback() is an agent-base-ism
+ // TODO: add support for generic `http.Agent` instances by calling
+ // agent.addRequest(), but with support for <= 0.10.x and >= 0.12.x
+ agent.callback(req, opts, fn);
+}
+
+/**
+ * Returns an Array of supported protocol string names.
+ *
+ * @return {Array}
+ * @api private
+ */
+
+function types () {
+ var rtn = [];
+ // not using Object.keys() so that we get any
+ // potential prototype values as well
+ for (var type in exports.proxies) rtn.push(type);
+ return rtn;
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/.npmignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/.npmignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/.travis.yml
new file mode 100644
index 0000000..85a5012
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
+ - npm install -g npm@latest
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/History.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/History.md
new file mode 100644
index 0000000..0ceef6c
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/History.md
@@ -0,0 +1,41 @@
+
+2.0.1 / 2015-09-10
+==================
+
+ * package: update "semver" to v5.0.1 for WebPack (#1, @vhpoet)
+
+2.0.0 / 2015-07-10
+==================
+
+ * refactor to patch Node.js core for more consistent `opts` values
+ * ensure that HTTP(s) default port numbers are always given
+ * test: use ssl-cert-snakeoil SSL certs
+ * test: add tests for arbitrary options
+ * README: add API section
+ * README: make the Agent HTTP/HTTPS generic in the example
+ * README: use SVG for Travis-CI badge
+
+1.0.2 / 2015-06-27
+==================
+
+ * agent: set `req._hadError` to true after emitting "error"
+ * package: update "mocha" to v2
+ * test: add artificial HTTP GET request test
+ * test: add artificial data events test
+ * test: fix artifical GET response test on node > v0.11.3
+ * test: use a real timeout for the async error test
+
+1.0.1 / 2013-09-09
+==================
+
+ * Fix passing an "error" object to the callback function on the first tick
+
+1.0.0 / 2013-09-09
+==================
+
+ * New API: now you pass a callback function directly
+
+0.0.1 / 2013-07-09
+==================
+
+ * Initial release
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/README.md
new file mode 100644
index 0000000..616b90c
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/README.md
@@ -0,0 +1,121 @@
+agent-base
+==========
+### Turn a function into an `http.Agent` instance
+[](https://travis-ci.org/TooTallNate/node-agent-base)
+
+This module provides an `http.Agent` generator. That is, you pass it an async
+callback function, and it returns a new `http.Agent` instance that will invoke the
+given callback function when sending outbound HTTP requests.
+
+#### Some subclasses:
+
+Here's some more interesting uses of `agent-base`.
+Send a pull request to list yours!
+
+ * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
+ * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
+ * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
+ * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS (v4a) proxy `http.Agent` implementation for HTTP and HTTPS
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install agent-base
+```
+
+
+Example
+-------
+
+Here's a minimal example that creates a new `net.Socket` connection to the server
+for every HTTP request (i.e. the equivalent of `agent: false` option):
+
+``` js
+var net = require('net');
+var tls = require('tls');
+var url = require('url');
+var http = require('http');
+var agent = require('agent-base');
+
+var endpoint = 'http://nodejs.org/api/';
+var opts = url.parse(endpoint);
+
+// This is the important part!
+opts.agent = agent(function (req, opts, fn) {
+ var socket;
+ // `secureEndpoint` is true when using the https module
+ if (opts.secureEndpoint) {
+ socket = tls.connect(opts);
+ } else {
+ socket = net.connect(opts);
+ }
+ fn(null, socket);
+});
+
+// Everything else works just like normal...
+http.get(opts, function (res) {
+ console.log('"response" event!', res.headers);
+ res.pipe(process.stdout);
+});
+```
+
+API
+---
+
+## Agent(Function callback) → http.Agent
+
+Creates a base `http.Agent` that will execute the callback function `callback`
+for every HTTP request that it is used as the `agent` for. The callback function
+is responsible for creating a `stream.Duplex` instance of some kind that will be
+used as the underlying socket in the HTTP request.
+
+The callback function should have the following signature:
+
+### callback(http.ClientRequest req, Object options, Function cb) → undefined
+
+The ClientRequest `req` can be accessed to read request headers and
+and the path, etc. The `options` object contains the options passed
+to the `http.request()`/`https.request()` function call, and is formatted
+to be directly passed to `net.connect()`/`tls.connect()`, or however
+else you want a Socket to be created. Pass the created socket to
+the callback function `cb` once created, and the HTTP request will
+continue to proceed.
+
+If the `https` module is used to invoke the HTTP request, then the
+`secureEndpoint` property on `options` will be set to `true`.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent
+[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
+[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
+[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/agent.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/agent.js
new file mode 100644
index 0000000..4005ebc
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/agent.js
@@ -0,0 +1,101 @@
+
+/**
+ * Module dependencies.
+ */
+
+require('./patch-core');
+var extend = require('extend');
+var inherits = require('util').inherits;
+var EventEmitter = require('events').EventEmitter;
+
+/**
+ * Module exports.
+ */
+
+module.exports = Agent;
+
+/**
+ * Base `http.Agent` implementation.
+ * No pooling/keep-alive is implemented by default.
+ *
+ * @param {Function} callback
+ * @api public
+ */
+
+function Agent (callback) {
+ if (!(this instanceof Agent)) return new Agent(callback);
+ if ('function' != typeof callback) throw new Error('Must pass a "callback function"');
+ EventEmitter.call(this);
+ this.callback = callback;
+}
+inherits(Agent, EventEmitter);
+
+/**
+ * Called by node-core's "_http_client.js" module when creating
+ * a new HTTP request with this Agent instance.
+ *
+ * @api public
+ */
+
+Agent.prototype.addRequest = function (req, host, port, localAddress) {
+ var opts;
+ if ('object' == typeof host) {
+ // >= v0.11.x API
+ opts = extend({}, req._options, host);
+ } else {
+ // <= v0.10.x API
+ opts = extend({}, req._options, { host: host, port: port });
+ if (null != localAddress) {
+ opts.localAddress = localAddress;
+ }
+ }
+
+ if (opts.host && opts.path) {
+ // if both a `host` and `path` are specified then it's most likely the
+ // result of a `url.parse()` call... we need to remove the `path` portion so
+ // that `net.connect()` doesn't attempt to open that as a unix socket file.
+ delete opts.path;
+ }
+
+ // set default `port` if none was explicitly specified
+ if (null == opts.port) {
+ opts.port = opts.secureEndpoint ? 443 : 80;
+ }
+
+ delete opts.agent;
+ delete opts.hostname;
+ delete opts._defaultAgent;
+ delete opts.defaultPort;
+ delete opts.createConnection;
+
+ // hint to use "Connection: close"
+ // XXX: non-documented `http` module API :(
+ req._last = true;
+ req.shouldKeepAlive = false;
+
+ // clean up a bit of memory since we're no longer using this
+ req._options = null;
+
+ // create the `net.Socket` instance
+ var sync = true;
+ this.callback(req, opts, function (err, socket) {
+ function emitErr () {
+ req.emit('error', err);
+ // For Safety. Some additional errors might fire later on
+ // and we need to make sure we don't double-fire the error event.
+ req._hadError = true;
+ }
+ if (err) {
+ if (sync) {
+ // need to defer the "error" event, when sync, because by now the `req`
+ // instance hasn't event been passed back to the user yet...
+ process.nextTick(emitErr);
+ } else {
+ emitErr();
+ }
+ } else {
+ req.onSocket(socket);
+ }
+ });
+ sync = false;
+};
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/.bin/semver b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/.bin/semver
new file mode 120000
index 0000000..317eb29
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore
new file mode 100644
index 0000000..534108e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/.npmignore
@@ -0,0 +1,4 @@
+node_modules/
+coverage/
+.nyc_output/
+nyc_output/
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml
new file mode 100644
index 0000000..991d04b
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - '0.10'
+ - '0.12'
+ - 'iojs'
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/README.md
new file mode 100644
index 0000000..b5e35ff
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/README.md
@@ -0,0 +1,303 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Usage
+
+ $ npm install semver
+
+ semver.valid('1.2.3') // '1.2.3'
+ semver.valid('a.b.c') // null
+ semver.clean(' =v1.2.3 ') // '1.2.3'
+ semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+ semver.gt('1.2.3', '9.8.7') // false
+ semver.lt('1.2.3', '9.8.7') // true
+
+As a command-line utility:
+
+ $ semver -h
+
+ Usage: semver [ [...]] [-r | -i | --preid | -l | -rv]
+ Test if version(s) satisfy the supplied range(s), and sort them.
+
+ Multiple versions or ranges may be supplied, unless increment
+ option is specified. In that case, only a single version may
+ be used, and it is incremented by the specified level
+
+ Program exits successfully if any valid version satisfies
+ all supplied ranges, and prints all satisfying versions.
+
+ If no versions are valid, or ranges are not satisfied,
+ then exits failure.
+
+ Versions are printed in ascending order, so supplying
+ multiple versions to the utility will just sort them.
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+> semver.inc('1.2.3', 'pre', 'beta')
+'1.2.4-beta.0'
+```
+
+command-line example:
+
+```shell
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```shell
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any version satisfies)
+* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero digit in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0`
+* `^0.2.3` := `>=0.2.3 <0.3.0`
+* `^0.0.3` := `>=0.0.3 <0.0.4`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0`
+* `^0.0.x` := `>=0.0.0 <0.1.0`
+* `^0.0` := `>=0.0.0 <0.1.0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0`
+* `^0.x` := `>=0.0.0 <1.0.0`
+
+## Functions
+
+All methods and classes take a final `loose` boolean argument that, if
+true, will be more forgiving about not-quite-valid semver strings.
+The resulting output will always be 100% strict, of course.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver
new file mode 100755
index 0000000..c5f2e85
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/bin/semver
@@ -0,0 +1,133 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+ , versions = []
+ , range = []
+ , gt = []
+ , lt = []
+ , eq = []
+ , inc = null
+ , version = require("../package.json").version
+ , loose = false
+ , identifier = undefined
+ , semver = require("../semver")
+ , reverse = false
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var i = a.indexOf('=')
+ if (i !== -1) {
+ a = a.slice(0, i)
+ argv.unshift(a.slice(i + 1))
+ }
+ switch (a) {
+ case "-rv": case "-rev": case "--rev": case "--reverse":
+ reverse = true
+ break
+ case "-l": case "--loose":
+ loose = true
+ break
+ case "-v": case "--version":
+ versions.push(argv.shift())
+ break
+ case "-i": case "--inc": case "--increment":
+ switch (argv[0]) {
+ case "major": case "minor": case "patch": case "prerelease":
+ case "premajor": case "preminor": case "prepatch":
+ inc = argv.shift()
+ break
+ default:
+ inc = "patch"
+ break
+ }
+ break
+ case "--preid":
+ identifier = argv.shift()
+ break
+ case "-r": case "--range":
+ range.push(argv.shift())
+ break
+ case "-h": case "--help": case "-?":
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ versions = versions.filter(function (v) {
+ return semver.valid(v, loose)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length))
+ return failInc()
+
+ for (var i = 0, l = range.length; i < l ; i ++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], loose)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error("--inc can only be used on a single version with no range")
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? "rcompare" : "compare"
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, loose)
+ }).map(function (v) {
+ return semver.clean(v, loose)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, loose, identifier) : v
+ }).forEach(function (v,i,_) { console.log(v) })
+}
+
+function help () {
+ console.log(["SemVer " + version
+ ,""
+ ,"A JavaScript implementation of the http://semver.org/ specification"
+ ,"Copyright Isaac Z. Schlueter"
+ ,""
+ ,"Usage: semver [options] [ [...]]"
+ ,"Prints valid versions sorted by SemVer precedence"
+ ,""
+ ,"Options:"
+ ,"-r --range "
+ ," Print versions that match the specified range."
+ ,""
+ ,"-i --increment []"
+ ," Increment a version by the specified level. Level can"
+ ," be one of: major, minor, patch, premajor, preminor,"
+ ," prepatch, or prerelease. Default level is 'patch'."
+ ," Only one version may be specified."
+ ,""
+ ,"--preid "
+ ," Identifier to be used to prefix premajor, preminor,"
+ ," prepatch or prerelease version increments."
+ ,""
+ ,"-l --loose"
+ ," Interpret versions and ranges loosely"
+ ,""
+ ,"Program exits successfully if any valid version satisfies"
+ ,"all supplied ranges, and prints all satisfying versions."
+ ,""
+ ,"If no satisfying versions are found, then exits failure."
+ ,""
+ ,"Versions are printed in ascending order, so supplying"
+ ,"multiple versions to the utility will just sort them."
+ ].join("\n"))
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/package.json
new file mode 100644
index 0000000..ed875d7
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "semver",
+ "version": "5.0.3",
+ "description": "The semantic version parser used by npm.",
+ "main": "semver.js",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "devDependencies": {
+ "tap": "^1.3.4"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/node-semver.git"
+ },
+ "bin": {
+ "semver": "./bin/semver"
+ },
+ "gitHead": "5f89ecbe78145ad0b501cf6279f602a23c89738d",
+ "bugs": {
+ "url": "https://github.com/npm/node-semver/issues"
+ },
+ "homepage": "https://github.com/npm/node-semver#readme",
+ "_id": "semver@5.0.3",
+ "_shasum": "77466de589cd5d3c95f138aa78bc569a3cb5d27a",
+ "_from": "semver@>=5.0.1 <5.1.0",
+ "_npmVersion": "3.3.2",
+ "_nodeVersion": "4.0.0",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ "dist": {
+ "shasum": "77466de589cd5d3c95f138aa78bc569a3cb5d27a",
+ "tarball": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/semver.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/semver.js
new file mode 100644
index 0000000..19392d8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/semver.js
@@ -0,0 +1,1200 @@
+exports = module.exports = SemVer;
+
+// The debug function is excluded entirely from the minified version.
+/* nomin */ var debug;
+/* nomin */ if (typeof process === 'object' &&
+ /* nomin */ process.env &&
+ /* nomin */ process.env.NODE_DEBUG &&
+ /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
+ /* nomin */ debug = function() {
+ /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
+ /* nomin */ args.unshift('SEMVER');
+ /* nomin */ console.log.apply(console, args);
+ /* nomin */ };
+/* nomin */ else
+ /* nomin */ debug = function() {};
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0';
+
+var MAX_LENGTH = 256;
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+
+// The actual regexps go on exports.re
+var re = exports.re = [];
+var src = exports.src = [];
+var R = 0;
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++;
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
+var NUMERICIDENTIFIERLOOSE = R++;
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
+
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++;
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
+
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++;
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')';
+
+var MAINVERSIONLOOSE = R++;
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++;
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+var PRERELEASEIDENTIFIERLOOSE = R++;
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')';
+
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++;
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
+
+var PRERELEASELOOSE = R++;
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++;
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++;
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
+
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++;
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?';
+
+src[FULL] = '^' + FULLPLAIN + '$';
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?';
+
+var LOOSE = R++;
+src[LOOSE] = '^' + LOOSEPLAIN + '$';
+
+var GTLT = R++;
+src[GTLT] = '((?:<|>)?=?)';
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++;
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
+var XRANGEIDENTIFIER = R++;
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
+
+var XRANGEPLAIN = R++;
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[PRERELEASE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGEPLAINLOOSE = R++;
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[PRERELEASELOOSE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?';
+
+var XRANGE = R++;
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
+var XRANGELOOSE = R++;
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++;
+src[LONETILDE] = '(?:~>?)';
+
+var TILDETRIM = R++;
+src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
+re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
+var tildeTrimReplace = '$1~';
+
+var TILDE = R++;
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
+var TILDELOOSE = R++;
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+var LONECARET = R++;
+src[LONECARET] = '(?:\\^)';
+
+var CARETTRIM = R++;
+src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
+re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
+var caretTrimReplace = '$1^';
+
+var CARET = R++;
+src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
+var CARETLOOSE = R++;
+src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++;
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
+var COMPARATOR = R++;
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
+
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++;
+src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
+var comparatorTrimReplace = '$1$2$3';
+
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++;
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$';
+
+var HYPHENRANGELOOSE = R++;
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$';
+
+// Star ranges basically just allow anything at all.
+var STAR = R++;
+src[STAR] = '(<|>)?=?\\s*\\*';
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i]);
+ if (!re[i])
+ re[i] = new RegExp(src[i]);
+}
+
+exports.parse = parse;
+function parse(version, loose) {
+ if (version instanceof SemVer)
+ return version;
+
+ if (typeof version !== 'string')
+ return null;
+
+ if (version.length > MAX_LENGTH)
+ return null;
+
+ var r = loose ? re[LOOSE] : re[FULL];
+ if (!r.test(version))
+ return null;
+
+ try {
+ return new SemVer(version, loose);
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.valid = valid;
+function valid(version, loose) {
+ var v = parse(version, loose);
+ return v ? v.version : null;
+}
+
+
+exports.clean = clean;
+function clean(version, loose) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
+ return s ? s.version : null;
+}
+
+exports.SemVer = SemVer;
+
+function SemVer(version, loose) {
+ if (version instanceof SemVer) {
+ if (version.loose === loose)
+ return version;
+ else
+ version = version.version;
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version);
+ }
+
+ if (version.length > MAX_LENGTH)
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+
+ if (!(this instanceof SemVer))
+ return new SemVer(version, loose);
+
+ debug('SemVer', version, loose);
+ this.loose = loose;
+ var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
+
+ if (!m)
+ throw new TypeError('Invalid Version: ' + version);
+
+ this.raw = version;
+
+ // these are actually numbers
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0)
+ throw new TypeError('Invalid major version')
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
+ throw new TypeError('Invalid minor version')
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
+ throw new TypeError('Invalid patch version')
+
+ // numberify any prerelease numeric ids
+ if (!m[4])
+ this.prerelease = [];
+ else
+ this.prerelease = m[4].split('.').map(function(id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER)
+ return num
+ }
+ return id;
+ });
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+}
+
+SemVer.prototype.format = function() {
+ this.version = this.major + '.' + this.minor + '.' + this.patch;
+ if (this.prerelease.length)
+ this.version += '-' + this.prerelease.join('.');
+ return this.version;
+};
+
+SemVer.prototype.inspect = function() {
+ return '';
+};
+
+SemVer.prototype.toString = function() {
+ return this.version;
+};
+
+SemVer.prototype.compare = function(other) {
+ debug('SemVer.compare', this.version, this.loose, other);
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return this.compareMain(other) || this.comparePre(other);
+};
+
+SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch);
+};
+
+SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer))
+ other = new SemVer(other, this.loose);
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length)
+ return -1;
+ else if (!this.prerelease.length && other.prerelease.length)
+ return 1;
+ else if (!this.prerelease.length && !other.prerelease.length)
+ return 0;
+
+ var i = 0;
+ do {
+ var a = this.prerelease[i];
+ var b = other.prerelease[i];
+ debug('prerelease compare', i, a, b);
+ if (a === undefined && b === undefined)
+ return 0;
+ else if (b === undefined)
+ return 1;
+ else if (a === undefined)
+ return -1;
+ else if (a === b)
+ continue;
+ else
+ return compareIdentifiers(a, b);
+ } while (++i);
+};
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function(release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc('pre', identifier);
+ break;
+ case 'preminor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc('pre', identifier);
+ break;
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0;
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0)
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
+ this.major++;
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0)
+ this.minor++;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0)
+ this.patch++;
+ this.prerelease = [];
+ break;
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0)
+ this.prerelease = [0];
+ else {
+ var i = this.prerelease.length;
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+ if (i === -1) // didn't increment anything
+ this.prerelease.push(0);
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1]))
+ this.prerelease = [identifier, 0];
+ } else
+ this.prerelease = [identifier, 0];
+ }
+ break;
+
+ default:
+ throw new Error('invalid increment argument: ' + release);
+ }
+ this.format();
+ this.raw = this.version;
+ return this;
+};
+
+exports.inc = inc;
+function inc(version, release, loose, identifier) {
+ if (typeof(loose) === 'string') {
+ identifier = loose;
+ loose = undefined;
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
+}
+
+exports.diff = diff;
+function diff(version1, version2) {
+ if (eq(version1, version2)) {
+ return null;
+ } else {
+ var v1 = parse(version1);
+ var v2 = parse(version2);
+ if (v1.prerelease.length || v2.prerelease.length) {
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return 'pre'+key;
+ }
+ }
+ }
+ return 'prerelease';
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return key;
+ }
+ }
+ }
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers;
+
+var numeric = /^[0-9]+$/;
+function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return (anum && !bnum) ? -1 :
+ (bnum && !anum) ? 1 :
+ a < b ? -1 :
+ a > b ? 1 :
+ 0;
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers;
+function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+}
+
+exports.major = major;
+function major(a, loose) {
+ return new SemVer(a, loose).major;
+}
+
+exports.minor = minor;
+function minor(a, loose) {
+ return new SemVer(a, loose).minor;
+}
+
+exports.patch = patch;
+function patch(a, loose) {
+ return new SemVer(a, loose).patch;
+}
+
+exports.compare = compare;
+function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(b);
+}
+
+exports.compareLoose = compareLoose;
+function compareLoose(a, b) {
+ return compare(a, b, true);
+}
+
+exports.rcompare = rcompare;
+function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+}
+
+exports.sort = sort;
+function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.compare(a, b, loose);
+ });
+}
+
+exports.rsort = rsort;
+function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports.rcompare(a, b, loose);
+ });
+}
+
+exports.gt = gt;
+function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+}
+
+exports.lt = lt;
+function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+}
+
+exports.eq = eq;
+function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+}
+
+exports.neq = neq;
+function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+}
+
+exports.gte = gte;
+function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+}
+
+exports.lte = lte;
+function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+}
+
+exports.cmp = cmp;
+function cmp(a, op, b, loose) {
+ var ret;
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a === b;
+ break;
+ case '!==':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ ret = a !== b;
+ break;
+ case '': case '=': case '==': ret = eq(a, b, loose); break;
+ case '!=': ret = neq(a, b, loose); break;
+ case '>': ret = gt(a, b, loose); break;
+ case '>=': ret = gte(a, b, loose); break;
+ case '<': ret = lt(a, b, loose); break;
+ case '<=': ret = lte(a, b, loose); break;
+ default: throw new TypeError('Invalid operator: ' + op);
+ }
+ return ret;
+}
+
+exports.Comparator = Comparator;
+function Comparator(comp, loose) {
+ if (comp instanceof Comparator) {
+ if (comp.loose === loose)
+ return comp;
+ else
+ comp = comp.value;
+ }
+
+ if (!(this instanceof Comparator))
+ return new Comparator(comp, loose);
+
+ debug('comparator', comp, loose);
+ this.loose = loose;
+ this.parse(comp);
+
+ if (this.semver === ANY)
+ this.value = '';
+ else
+ this.value = this.operator + this.semver.version;
+
+ debug('comp', this);
+}
+
+var ANY = {};
+Comparator.prototype.parse = function(comp) {
+ var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var m = comp.match(r);
+
+ if (!m)
+ throw new TypeError('Invalid comparator: ' + comp);
+
+ this.operator = m[1];
+ if (this.operator === '=')
+ this.operator = '';
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2])
+ this.semver = ANY;
+ else
+ this.semver = new SemVer(m[2], this.loose);
+};
+
+Comparator.prototype.inspect = function() {
+ return '';
+};
+
+Comparator.prototype.toString = function() {
+ return this.value;
+};
+
+Comparator.prototype.test = function(version) {
+ debug('Comparator.test', version, this.loose);
+
+ if (this.semver === ANY)
+ return true;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ return cmp(version, this.operator, this.semver, this.loose);
+};
+
+
+exports.Range = Range;
+function Range(range, loose) {
+ if ((range instanceof Range) && range.loose === loose)
+ return range;
+
+ if (!(this instanceof Range))
+ return new Range(range, loose);
+
+ this.loose = loose;
+
+ // First, split based on boolean or ||
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range) {
+ return this.parseRange(range.trim());
+ }, this).filter(function(c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length;
+ });
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range);
+ }
+
+ this.format();
+}
+
+Range.prototype.inspect = function() {
+ return '';
+};
+
+Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+};
+
+Range.prototype.toString = function() {
+ return this.range;
+};
+
+Range.prototype.parseRange = function(range) {
+ var loose = this.loose;
+ range = range.trim();
+ debug('range', range, loose);
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug('hyphen replace', range);
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
+ debug('comparator trim', range, re[COMPARATORTRIM]);
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace);
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[CARETTRIM], caretTrimReplace);
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ');
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
+ var set = range.split(' ').map(function(comp) {
+ return parseComparator(comp, loose);
+ }).join(' ').split(/\s+/);
+ if (this.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, loose);
+ });
+
+ return set;
+};
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators;
+function toComparators(range, loose) {
+ return new Range(range, loose).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(' ').trim().split(' ');
+ });
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator(comp, loose) {
+ debug('comp', comp);
+ comp = replaceCarets(comp, loose);
+ debug('caret', comp);
+ comp = replaceTildes(comp, loose);
+ debug('tildes', comp);
+ comp = replaceXRanges(comp, loose);
+ debug('xrange', comp);
+ comp = replaceStars(comp, loose);
+ debug('stars', comp);
+ return comp;
+}
+
+function isX(id) {
+ return !id || id.toLowerCase() === 'x' || id === '*';
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceTilde(comp, loose);
+ }).join(' ');
+}
+
+function replaceTilde(comp, loose) {
+ var r = loose ? re[TILDELOOSE] : re[TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p))
+ // ~1.2 == >=1.2.0- <1.3.0-
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else if (pr) {
+ debug('replaceTilde pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+
+ debug('tilde return', ret);
+ return ret;
+ });
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets(comp, loose) {
+ return comp.trim().split(/\s+/).map(function(comp) {
+ return replaceCaret(comp, loose);
+ }).join(' ');
+}
+
+function replaceCaret(comp, loose) {
+ debug('caret', comp, loose);
+ var r = loose ? re[CARETLOOSE] : re[CARET];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr);
+ var ret;
+
+ if (isX(M))
+ ret = '';
+ else if (isX(m))
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ else if (isX(p)) {
+ if (M === '0')
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ else
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
+ } else if (pr) {
+ debug('replaceCaret pr', pr);
+ if (pr.charAt(0) !== '-')
+ pr = '-' + pr;
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p + pr +
+ ' <' + (+M + 1) + '.0.0';
+ } else {
+ debug('no pr');
+ if (M === '0') {
+ if (m === '0')
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1);
+ else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0';
+ } else
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0';
+ }
+
+ debug('caret return', ret);
+ return ret;
+ });
+}
+
+function replaceXRanges(comp, loose) {
+ debug('replaceXRanges', comp, loose);
+ return comp.split(/\s+/).map(function(comp) {
+ return replaceXRange(comp, loose);
+ }).join(' ');
+}
+
+function replaceXRange(comp, loose) {
+ comp = comp.trim();
+ var r = loose ? re[XRANGELOOSE] : re[XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+
+ if (gtlt === '=' && anyX)
+ gtlt = '';
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0';
+ } else {
+ // nothing is forbidden
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
+ // replace X with 0
+ if (xm)
+ m = 0;
+ if (xp)
+ p = 0;
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>=';
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else if (xp) {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm)
+ M = +M + 1
+ else
+ m = +m + 1
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p;
+ } else if (xm) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
+ }
+
+ debug('xRange return', ret);
+
+ return ret;
+ });
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars(comp, loose) {
+ debug('replaceStars', comp, loose);
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '');
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+
+ if (isX(fM))
+ from = '';
+ else if (isX(fm))
+ from = '>=' + fM + '.0.0';
+ else if (isX(fp))
+ from = '>=' + fM + '.' + fm + '.0';
+ else
+ from = '>=' + from;
+
+ if (isX(tM))
+ to = '';
+ else if (isX(tm))
+ to = '<' + (+tM + 1) + '.0.0';
+ else if (isX(tp))
+ to = '<' + tM + '.' + (+tm + 1) + '.0';
+ else if (tpr)
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
+ else
+ to = '<=' + to;
+
+ return (from + ' ' + to).trim();
+}
+
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function(version) {
+ if (!version)
+ return false;
+
+ if (typeof version === 'string')
+ version = new SemVer(version, this.loose);
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version))
+ return true;
+ }
+ return false;
+};
+
+function testSet(set, version) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version))
+ return false;
+ }
+
+ if (version.prerelease.length) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (var i = 0; i < set.length; i++) {
+ debug(set[i].semver);
+ if (set[i].semver === ANY)
+ continue;
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver;
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch)
+ return true;
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false;
+ }
+
+ return true;
+}
+
+exports.satisfies = satisfies;
+function satisfies(version, range, loose) {
+ try {
+ range = new Range(range, loose);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+}
+
+exports.maxSatisfying = maxSatisfying;
+function maxSatisfying(versions, range, loose) {
+ return versions.filter(function(version) {
+ return satisfies(version, range, loose);
+ }).sort(function(a, b) {
+ return rcompare(a, b, loose);
+ })[0] || null;
+}
+
+exports.validRange = validRange;
+function validRange(range, loose) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, loose).range || '*';
+ } catch (er) {
+ return null;
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr;
+function ltr(version, range, loose) {
+ return outside(version, range, '<', loose);
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr;
+function gtr(version, range, loose) {
+ return outside(version, range, '>', loose);
+}
+
+exports.outside = outside;
+function outside(version, range, hilo, loose) {
+ version = new SemVer(version, loose);
+ range = new Range(range, loose);
+
+ var gtfn, ltefn, ltfn, comp, ecomp;
+ switch (hilo) {
+ case '>':
+ gtfn = gt;
+ ltefn = lte;
+ ltfn = lt;
+ comp = '>';
+ ecomp = '>=';
+ break;
+ case '<':
+ gtfn = lt;
+ ltefn = gte;
+ ltfn = gt;
+ comp = '<';
+ ecomp = '<=';
+ break;
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, loose)) {
+ return false;
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i];
+
+ var high = null;
+ var low = null;
+
+ comparators.forEach(function(comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator;
+ low = low || comparator;
+ if (gtfn(comparator.semver, high.semver, loose)) {
+ high = comparator;
+ } else if (ltfn(comparator.semver, low.semver, loose)) {
+ low = comparator;
+ }
+ });
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
+ }
+ return true;
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js
new file mode 100644
index 0000000..c051864
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/big-numbers.js
@@ -0,0 +1,31 @@
+var test = require('tap').test
+var semver = require('../')
+
+test('long version is too long', function (t) {
+ var v = '1.2.' + new Array(256).join('1')
+ t.throws(function () {
+ new semver.SemVer(v)
+ })
+ t.equal(semver.valid(v, false), null)
+ t.equal(semver.valid(v, true), null)
+ t.equal(semver.inc(v, 'patch'), null)
+ t.end()
+})
+
+test('big number is like too long version', function (t) {
+ var v = '1.2.' + new Array(100).join('1')
+ t.throws(function () {
+ new semver.SemVer(v)
+ })
+ t.equal(semver.valid(v, false), null)
+ t.equal(semver.valid(v, true), null)
+ t.equal(semver.inc(v, 'patch'), null)
+ t.end()
+})
+
+test('parsing null does not throw', function (t) {
+ t.equal(semver.parse(null), null)
+ t.equal(semver.parse({}), null)
+ t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3')
+ t.end()
+})
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js
new file mode 100644
index 0000000..9e268de
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/clean.js
@@ -0,0 +1,29 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var clean = semver.clean;
+
+test('\nclean tests', function(t) {
+ // [range, version]
+ // Version should be detectable despite extra characters
+ [
+ ['1.2.3', '1.2.3'],
+ [' 1.2.3 ', '1.2.3'],
+ [' 1.2.3-4 ', '1.2.3-4'],
+ [' 1.2.3-pre ', '1.2.3-pre'],
+ [' =v1.2.3 ', '1.2.3'],
+ ['v1.2.3', '1.2.3'],
+ [' v1.2.3 ', '1.2.3'],
+ ['\t1.2.3', '1.2.3'],
+ ['>1.2.3', null],
+ ['~1.2.3', null],
+ ['<=1.2.3', null],
+ ['1.2.x', null]
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var msg = 'clean(' + range + ') = ' + version;
+ t.equal(clean(range), version, msg);
+ });
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js
new file mode 100644
index 0000000..bbb8789
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/gtr.js
@@ -0,0 +1,173 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var gtr = semver.gtr;
+
+test('\ngtr tests', function(t) {
+ // [range, version, loose]
+ // Version should be greater than range
+ [
+ ['~1.2.2', '1.3.0'],
+ ['~0.6.1-1', '0.7.1-1'],
+ ['1.0.0 - 2.0.0', '2.0.1'],
+ ['1.0.0', '1.0.1-beta1'],
+ ['1.0.0', '2.0.0'],
+ ['<=2.0.0', '2.1.1'],
+ ['<=2.0.0', '3.2.9'],
+ ['<2.0.0', '2.0.0'],
+ ['0.1.20 || 1.2.4', '1.2.5'],
+ ['2.x.x', '3.0.0'],
+ ['1.2.x', '1.3.0'],
+ ['1.2.x || 2.x', '3.0.0'],
+ ['2.*.*', '5.0.1'],
+ ['1.2.*', '1.3.3'],
+ ['1.2.* || 2.*', '4.0.0'],
+ ['2', '3.0.0'],
+ ['2.3', '2.4.2'],
+ ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.5.5'],
+ ['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0
+ ['~1', '2.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '2.2.4'],
+ ['~> 1', '3.2.3'],
+ ['~1.0', '1.1.2'], // >=1.0.0 <1.1.0
+ ['~ 1.0', '1.1.0'],
+ ['<1.2', '1.2.0'],
+ ['< 1.2', '1.2.1'],
+ ['1', '2.0.0beta', true],
+ ['~v0.5.4-pre', '0.6.0'],
+ ['~v0.5.4-pre', '0.6.1-pre'],
+ ['=0.7.x', '0.8.0'],
+ ['=0.7.x', '0.8.0-asdf'],
+ ['<0.7.x', '0.7.0'],
+ ['~1.2.2', '1.3.0'],
+ ['1.0.0 - 2.0.0', '2.2.3'],
+ ['1.0.0', '1.0.1'],
+ ['<=2.0.0', '3.0.0'],
+ ['<=2.0.0', '2.9999.9999'],
+ ['<=2.0.0', '2.2.9'],
+ ['<2.0.0', '2.9999.9999'],
+ ['<2.0.0', '2.2.9'],
+ ['2.x.x', '3.1.3'],
+ ['1.2.x', '1.3.3'],
+ ['1.2.x || 2.x', '3.1.3'],
+ ['2.*.*', '3.1.3'],
+ ['1.2.*', '1.3.3'],
+ ['1.2.* || 2.*', '3.1.3'],
+ ['2', '3.1.2'],
+ ['2.3', '2.4.1'],
+ ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
+ ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
+ ['~1', '2.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '2.2.3'],
+ ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
+ ['<1', '1.0.0'],
+ ['1', '2.0.0beta', true],
+ ['<1', '1.0.0beta', true],
+ ['< 1', '1.0.0beta', true],
+ ['=0.7.x', '0.8.2'],
+ ['<0.7.x', '0.7.2']
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')';
+ t.ok(gtr(version, range, loose), msg);
+ });
+ t.end();
+});
+
+test('\nnegative gtr tests', function(t) {
+ // [range, version, loose]
+ // Version should NOT be greater than range
+ [
+ ['~0.6.1-1', '0.6.1-1'],
+ ['1.0.0 - 2.0.0', '1.2.3'],
+ ['1.0.0 - 2.0.0', '0.9.9'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '0.2.4'],
+ ['', '1.0.0', true],
+ ['*', '1.2.3'],
+ ['*', 'v1.2.3-foo'],
+ ['>=1.0.0', '1.0.0'],
+ ['>=1.0.0', '1.0.1'],
+ ['>=1.0.0', '1.1.0'],
+ ['>1.0.0', '1.0.1'],
+ ['>1.0.0', '1.1.0'],
+ ['<=2.0.0', '2.0.0'],
+ ['<=2.0.0', '1.9999.9999'],
+ ['<=2.0.0', '0.2.9'],
+ ['<2.0.0', '1.9999.9999'],
+ ['<2.0.0', '0.2.9'],
+ ['>= 1.0.0', '1.0.0'],
+ ['>= 1.0.0', '1.0.1'],
+ ['>= 1.0.0', '1.1.0'],
+ ['> 1.0.0', '1.0.1'],
+ ['> 1.0.0', '1.1.0'],
+ ['<= 2.0.0', '2.0.0'],
+ ['<= 2.0.0', '1.9999.9999'],
+ ['<= 2.0.0', '0.2.9'],
+ ['< 2.0.0', '1.9999.9999'],
+ ['<\t2.0.0', '0.2.9'],
+ ['>=0.1.97', 'v0.1.97'],
+ ['>=0.1.97', '0.1.97'],
+ ['0.1.20 || 1.2.4', '1.2.4'],
+ ['0.1.20 || >1.2.4', '1.2.4'],
+ ['0.1.20 || 1.2.4', '1.2.3'],
+ ['0.1.20 || 1.2.4', '0.1.20'],
+ ['>=0.2.3 || <0.0.1', '0.0.0'],
+ ['>=0.2.3 || <0.0.1', '0.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.4'],
+ ['||', '1.3.4'],
+ ['2.x.x', '2.1.3'],
+ ['1.2.x', '1.2.3'],
+ ['1.2.x || 2.x', '2.1.3'],
+ ['1.2.x || 2.x', '1.2.3'],
+ ['x', '1.2.3'],
+ ['2.*.*', '2.1.3'],
+ ['1.2.*', '1.2.3'],
+ ['1.2.* || 2.*', '2.1.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['*', '1.2.3'],
+ ['2', '2.1.2'],
+ ['2.3', '2.3.1'],
+ ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.4.5'],
+ ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
+ ['~1', '1.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '1.2.3'],
+ ['~> 1', '1.2.3'],
+ ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
+ ['~ 1.0', '1.0.2'],
+ ['>=1', '1.0.0'],
+ ['>= 1', '1.0.0'],
+ ['<1.2', '1.1.1'],
+ ['< 1.2', '1.1.1'],
+ ['1', '1.0.0beta', true],
+ ['~v0.5.4-pre', '0.5.5'],
+ ['~v0.5.4-pre', '0.5.4'],
+ ['=0.7.x', '0.7.2'],
+ ['>=0.7.x', '0.7.2'],
+ ['=0.7.x', '0.7.0-asdf'],
+ ['>=0.7.x', '0.7.0-asdf'],
+ ['<=0.7.x', '0.6.2'],
+ ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
+ ['>=0.2.3 <=0.2.4', '0.2.4'],
+ ['1.0.0 - 2.0.0', '2.0.0'],
+ ['^1', '0.0.0-0'],
+ ['^3.0.0', '2.0.0'],
+ ['^1.0.0 || ~2.0.1', '2.0.0'],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
+ ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0']
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')';
+ t.notOk(gtr(version, range, loose), msg);
+ });
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js
new file mode 100644
index 0000000..47c3f5f
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/index.js
@@ -0,0 +1,698 @@
+'use strict';
+
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var eq = semver.eq;
+var gt = semver.gt;
+var lt = semver.lt;
+var neq = semver.neq;
+var cmp = semver.cmp;
+var gte = semver.gte;
+var lte = semver.lte;
+var satisfies = semver.satisfies;
+var validRange = semver.validRange;
+var inc = semver.inc;
+var diff = semver.diff;
+var replaceStars = semver.replaceStars;
+var toComparators = semver.toComparators;
+var SemVer = semver.SemVer;
+var Range = semver.Range;
+
+test('\ncomparison tests', function(t) {
+ // [version1, version2]
+ // version1 should be greater than version2
+ [['0.0.0', '0.0.0-foo'],
+ ['0.0.1', '0.0.0'],
+ ['1.0.0', '0.9.9'],
+ ['0.10.0', '0.9.0'],
+ ['0.99.0', '0.10.0'],
+ ['2.0.0', '1.2.3'],
+ ['v0.0.0', '0.0.0-foo', true],
+ ['v0.0.1', '0.0.0', true],
+ ['v1.0.0', '0.9.9', true],
+ ['v0.10.0', '0.9.0', true],
+ ['v0.99.0', '0.10.0', true],
+ ['v2.0.0', '1.2.3', true],
+ ['0.0.0', 'v0.0.0-foo', true],
+ ['0.0.1', 'v0.0.0', true],
+ ['1.0.0', 'v0.9.9', true],
+ ['0.10.0', 'v0.9.0', true],
+ ['0.99.0', 'v0.10.0', true],
+ ['2.0.0', 'v1.2.3', true],
+ ['1.2.3', '1.2.3-asdf'],
+ ['1.2.3', '1.2.3-4'],
+ ['1.2.3', '1.2.3-4-foo'],
+ ['1.2.3-5-foo', '1.2.3-5'],
+ ['1.2.3-5', '1.2.3-4'],
+ ['1.2.3-5-foo', '1.2.3-5-Foo'],
+ ['3.0.0', '2.7.2+asdf'],
+ ['1.2.3-a.10', '1.2.3-a.5'],
+ ['1.2.3-a.b', '1.2.3-a.5'],
+ ['1.2.3-a.b', '1.2.3-a'],
+ ['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'],
+ ['1.2.3-r2', '1.2.3-r100'],
+ ['1.2.3-r100', '1.2.3-R2']
+ ].forEach(function(v) {
+ var v0 = v[0];
+ var v1 = v[1];
+ var loose = v[2];
+ t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
+ t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
+ t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
+ t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
+ t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
+ t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
+ t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
+ t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
+ t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
+ t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
+ t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
+ });
+ t.end();
+});
+
+test('\nequality tests', function(t) {
+ // [version1, version2]
+ // version1 should be equivalent to version2
+ [['1.2.3', 'v1.2.3', true],
+ ['1.2.3', '=1.2.3', true],
+ ['1.2.3', 'v 1.2.3', true],
+ ['1.2.3', '= 1.2.3', true],
+ ['1.2.3', ' v1.2.3', true],
+ ['1.2.3', ' =1.2.3', true],
+ ['1.2.3', ' v 1.2.3', true],
+ ['1.2.3', ' = 1.2.3', true],
+ ['1.2.3-0', 'v1.2.3-0', true],
+ ['1.2.3-0', '=1.2.3-0', true],
+ ['1.2.3-0', 'v 1.2.3-0', true],
+ ['1.2.3-0', '= 1.2.3-0', true],
+ ['1.2.3-0', ' v1.2.3-0', true],
+ ['1.2.3-0', ' =1.2.3-0', true],
+ ['1.2.3-0', ' v 1.2.3-0', true],
+ ['1.2.3-0', ' = 1.2.3-0', true],
+ ['1.2.3-1', 'v1.2.3-1', true],
+ ['1.2.3-1', '=1.2.3-1', true],
+ ['1.2.3-1', 'v 1.2.3-1', true],
+ ['1.2.3-1', '= 1.2.3-1', true],
+ ['1.2.3-1', ' v1.2.3-1', true],
+ ['1.2.3-1', ' =1.2.3-1', true],
+ ['1.2.3-1', ' v 1.2.3-1', true],
+ ['1.2.3-1', ' = 1.2.3-1', true],
+ ['1.2.3-beta', 'v1.2.3-beta', true],
+ ['1.2.3-beta', '=1.2.3-beta', true],
+ ['1.2.3-beta', 'v 1.2.3-beta', true],
+ ['1.2.3-beta', '= 1.2.3-beta', true],
+ ['1.2.3-beta', ' v1.2.3-beta', true],
+ ['1.2.3-beta', ' =1.2.3-beta', true],
+ ['1.2.3-beta', ' v 1.2.3-beta', true],
+ ['1.2.3-beta', ' = 1.2.3-beta', true],
+ ['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
+ ['1.2.3+build', ' = 1.2.3+otherbuild', true],
+ ['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
+ ['1.2.3+build', '1.2.3+otherbuild'],
+ [' v1.2.3+build', '1.2.3+otherbuild']
+ ].forEach(function(v) {
+ var v0 = v[0];
+ var v1 = v[1];
+ var loose = v[2];
+ t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
+ t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
+ t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
+ t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
+ t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
+ t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
+ t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
+ t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
+ t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
+ t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
+ });
+ t.end();
+});
+
+
+test('\nrange tests', function(t) {
+ // [range, version]
+ // version should be included by range
+ [['1.0.0 - 2.0.0', '1.2.3'],
+ ['^1.2.3+build', '1.2.3'],
+ ['^1.2.3+build', '1.3.0'],
+ ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'],
+ ['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true],
+ ['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
+ ['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
+ ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'],
+ ['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'],
+ ['1.2.3+asdf - 2.4.3+asdf', '1.2.3'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '0.2.4'],
+ ['', '1.0.0'],
+ ['*', '1.2.3'],
+ ['*', 'v1.2.3', true],
+ ['>=1.0.0', '1.0.0'],
+ ['>=1.0.0', '1.0.1'],
+ ['>=1.0.0', '1.1.0'],
+ ['>1.0.0', '1.0.1'],
+ ['>1.0.0', '1.1.0'],
+ ['<=2.0.0', '2.0.0'],
+ ['<=2.0.0', '1.9999.9999'],
+ ['<=2.0.0', '0.2.9'],
+ ['<2.0.0', '1.9999.9999'],
+ ['<2.0.0', '0.2.9'],
+ ['>= 1.0.0', '1.0.0'],
+ ['>= 1.0.0', '1.0.1'],
+ ['>= 1.0.0', '1.1.0'],
+ ['> 1.0.0', '1.0.1'],
+ ['> 1.0.0', '1.1.0'],
+ ['<= 2.0.0', '2.0.0'],
+ ['<= 2.0.0', '1.9999.9999'],
+ ['<= 2.0.0', '0.2.9'],
+ ['< 2.0.0', '1.9999.9999'],
+ ['<\t2.0.0', '0.2.9'],
+ ['>=0.1.97', 'v0.1.97', true],
+ ['>=0.1.97', '0.1.97'],
+ ['0.1.20 || 1.2.4', '1.2.4'],
+ ['>=0.2.3 || <0.0.1', '0.0.0'],
+ ['>=0.2.3 || <0.0.1', '0.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.4'],
+ ['||', '1.3.4'],
+ ['2.x.x', '2.1.3'],
+ ['1.2.x', '1.2.3'],
+ ['1.2.x || 2.x', '2.1.3'],
+ ['1.2.x || 2.x', '1.2.3'],
+ ['x', '1.2.3'],
+ ['2.*.*', '2.1.3'],
+ ['1.2.*', '1.2.3'],
+ ['1.2.* || 2.*', '2.1.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['*', '1.2.3'],
+ ['2', '2.1.2'],
+ ['2.3', '2.3.1'],
+ ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.4.5'],
+ ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
+ ['~1', '1.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '1.2.3'],
+ ['~> 1', '1.2.3'],
+ ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
+ ['~ 1.0', '1.0.2'],
+ ['~ 1.0.3', '1.0.12'],
+ ['>=1', '1.0.0'],
+ ['>= 1', '1.0.0'],
+ ['<1.2', '1.1.1'],
+ ['< 1.2', '1.1.1'],
+ ['~v0.5.4-pre', '0.5.5'],
+ ['~v0.5.4-pre', '0.5.4'],
+ ['=0.7.x', '0.7.2'],
+ ['<=0.7.x', '0.7.2'],
+ ['>=0.7.x', '0.7.2'],
+ ['<=0.7.x', '0.6.2'],
+ ['~1.2.1 >=1.2.3', '1.2.3'],
+ ['~1.2.1 =1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3', '1.2.3'],
+ ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
+ ['~1.2.1 1.2.3', '1.2.3'],
+ ['>=1.2.1 1.2.3', '1.2.3'],
+ ['1.2.3 >=1.2.1', '1.2.3'],
+ ['>=1.2.3 >=1.2.1', '1.2.3'],
+ ['>=1.2.1 >=1.2.3', '1.2.3'],
+ ['>=1.2', '1.2.8'],
+ ['^1.2.3', '1.8.1'],
+ ['^0.1.2', '0.1.2'],
+ ['^0.1', '0.1.2'],
+ ['^1.2', '1.4.2'],
+ ['^1.2 ^1', '1.4.2'],
+ ['^1.2.3-alpha', '1.2.3-pre'],
+ ['^1.2.0-alpha', '1.2.0-pre'],
+ ['^0.0.1-alpha', '0.0.1-beta']
+ ].forEach(function(v) {
+ var range = v[0];
+ var ver = v[1];
+ var loose = v[2];
+ t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
+ });
+ t.end();
+});
+
+test('\nnegative range tests', function(t) {
+ // [range, version]
+ // version should not be included by range
+ [['1.0.0 - 2.0.0', '2.2.3'],
+ ['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'],
+ ['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'],
+ ['^1.2.3+build', '2.0.0'],
+ ['^1.2.3+build', '1.2.0'],
+ ['^1.2.3', '1.2.3-pre'],
+ ['^1.2', '1.2.0-pre'],
+ ['>1.2', '1.3.0-beta'],
+ ['<=1.2.3', '1.2.3-beta'],
+ ['^1.2.3', '1.2.3-beta'],
+ ['=0.7.x', '0.7.0-asdf'],
+ ['>=0.7.x', '0.7.0-asdf'],
+ ['1', '1.0.0beta', true],
+ ['<1', '1.0.0beta', true],
+ ['< 1', '1.0.0beta', true],
+ ['1.0.0', '1.0.1'],
+ ['>=1.0.0', '0.0.0'],
+ ['>=1.0.0', '0.0.1'],
+ ['>=1.0.0', '0.1.0'],
+ ['>1.0.0', '0.0.1'],
+ ['>1.0.0', '0.1.0'],
+ ['<=2.0.0', '3.0.0'],
+ ['<=2.0.0', '2.9999.9999'],
+ ['<=2.0.0', '2.2.9'],
+ ['<2.0.0', '2.9999.9999'],
+ ['<2.0.0', '2.2.9'],
+ ['>=0.1.97', 'v0.1.93', true],
+ ['>=0.1.97', '0.1.93'],
+ ['0.1.20 || 1.2.4', '1.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.0.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.2'],
+ ['2.x.x', '1.1.3'],
+ ['2.x.x', '3.1.3'],
+ ['1.2.x', '1.3.3'],
+ ['1.2.x || 2.x', '3.1.3'],
+ ['1.2.x || 2.x', '1.1.3'],
+ ['2.*.*', '1.1.3'],
+ ['2.*.*', '3.1.3'],
+ ['1.2.*', '1.3.3'],
+ ['1.2.* || 2.*', '3.1.3'],
+ ['1.2.* || 2.*', '1.1.3'],
+ ['2', '1.1.2'],
+ ['2.3', '2.4.1'],
+ ['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.3.9'],
+ ['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
+ ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
+ ['~1', '0.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '2.2.3'],
+ ['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
+ ['<1', '1.0.0'],
+ ['>=1.2', '1.1.1'],
+ ['1', '2.0.0beta', true],
+ ['~v0.5.4-beta', '0.5.4-alpha'],
+ ['=0.7.x', '0.8.2'],
+ ['>=0.7.x', '0.6.2'],
+ ['<0.7.x', '0.7.2'],
+ ['<1.2.3', '1.2.3-beta'],
+ ['=1.2.3', '1.2.3-beta'],
+ ['>1.2', '1.2.8'],
+ ['^1.2.3', '2.0.0-alpha'],
+ ['^1.2.3', '1.2.2'],
+ ['^1.2', '1.1.9'],
+ ['*', 'v1.2.3-foo', true],
+ // invalid ranges never satisfied!
+ ['blerg', '1.2.3'],
+ ['git+https://user:password0123@github.com/foo', '123.0.0', true],
+ ['^1.2.3', '2.0.0-pre']
+ ].forEach(function(v) {
+ var range = v[0];
+ var ver = v[1];
+ var loose = v[2];
+ var found = satisfies(ver, range, loose);
+ t.ok(!found, ver + ' not satisfied by ' + range);
+ });
+ t.end();
+});
+
+test('\nincrement versions test', function(t) {
+// [version, inc, result, identifier]
+// inc(version, inc) -> result
+ [['1.2.3', 'major', '2.0.0'],
+ ['1.2.3', 'minor', '1.3.0'],
+ ['1.2.3', 'patch', '1.2.4'],
+ ['1.2.3tag', 'major', '2.0.0', true],
+ ['1.2.3-tag', 'major', '2.0.0'],
+ ['1.2.3', 'fake', null],
+ ['1.2.0-0', 'patch', '1.2.0'],
+ ['fake', 'major', null],
+ ['1.2.3-4', 'major', '2.0.0'],
+ ['1.2.3-4', 'minor', '1.3.0'],
+ ['1.2.3-4', 'patch', '1.2.3'],
+ ['1.2.3-alpha.0.beta', 'major', '2.0.0'],
+ ['1.2.3-alpha.0.beta', 'minor', '1.3.0'],
+ ['1.2.3-alpha.0.beta', 'patch', '1.2.3'],
+ ['1.2.4', 'prerelease', '1.2.5-0'],
+ ['1.2.3-0', 'prerelease', '1.2.3-1'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
+ ['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
+ ['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
+ ['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
+ ['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
+ ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
+ ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
+ ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
+ ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
+ ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
+ ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'],
+ ['1.2.0', 'prepatch', '1.2.1-0'],
+ ['1.2.0-1', 'prepatch', '1.2.1-0'],
+ ['1.2.0', 'preminor', '1.3.0-0'],
+ ['1.2.3-1', 'preminor', '1.3.0-0'],
+ ['1.2.0', 'premajor', '2.0.0-0'],
+ ['1.2.3-1', 'premajor', '2.0.0-0'],
+ ['1.2.0-1', 'minor', '1.2.0'],
+ ['1.0.0-1', 'major', '1.0.0'],
+
+ ['1.2.3', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3', 'patch', '1.2.4', false, 'dev'],
+ ['1.2.3tag', 'major', '2.0.0', true, 'dev'],
+ ['1.2.3-tag', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3', 'fake', null, false, 'dev'],
+ ['1.2.0-0', 'patch', '1.2.0', false, 'dev'],
+ ['fake', 'major', null, false, 'dev'],
+ ['1.2.3-4', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3-4', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3-4', 'patch', '1.2.3', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'],
+ ['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'],
+ ['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'],
+ ['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
+ ['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'],
+ ['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'],
+ ['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'],
+ ['1.2.0', 'prepatch', '1.2.1-dev.0', false, 'dev'],
+ ['1.2.0-1', 'prepatch', '1.2.1-dev.0', false, 'dev'],
+ ['1.2.0', 'preminor', '1.3.0-dev.0', false, 'dev'],
+ ['1.2.3-1', 'preminor', '1.3.0-dev.0', false, 'dev'],
+ ['1.2.0', 'premajor', '2.0.0-dev.0', false, 'dev'],
+ ['1.2.3-1', 'premajor', '2.0.0-dev.0', false, 'dev'],
+ ['1.2.0-1', 'minor', '1.2.0', false, 'dev'],
+ ['1.0.0-1', 'major', '1.0.0', false, 'dev'],
+ ['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev']
+
+ ].forEach(function(v) {
+ var pre = v[0];
+ var what = v[1];
+ var wanted = v[2];
+ var loose = v[3];
+ var id = v[4];
+ var found = inc(pre, what, loose, id);
+ var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')';
+ t.equal(found, wanted, cmd + ' === ' + wanted);
+
+ var parsed = semver.parse(pre, loose);
+ if (wanted) {
+ parsed.inc(what, id);
+ t.equal(parsed.version, wanted, cmd + ' object version updated');
+ t.equal(parsed.raw, wanted, cmd + ' object raw field updated');
+ } else if (parsed) {
+ t.throws(function () {
+ parsed.inc(what, id)
+ })
+ } else {
+ t.equal(parsed, null)
+ }
+ });
+
+ t.end();
+});
+
+test('\ndiff versions test', function(t) {
+// [version1, version2, result]
+// diff(version1, version2) -> result
+ [['1.2.3', '0.2.3', 'major'],
+ ['1.4.5', '0.2.3', 'major'],
+ ['1.2.3', '2.0.0-pre', 'premajor'],
+ ['1.2.3', '1.3.3', 'minor'],
+ ['1.0.1', '1.1.0-pre', 'preminor'],
+ ['1.2.3', '1.2.4', 'patch'],
+ ['1.2.3', '1.2.4-pre', 'prepatch'],
+ ['0.0.1', '0.0.1-pre', 'prerelease'],
+ ['0.0.1', '0.0.1-pre-2', 'prerelease'],
+ ['1.1.0', '1.1.0-pre', 'prerelease'],
+ ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'],
+ ['1.0.0', '1.0.0', null]
+
+ ].forEach(function(v) {
+ var version1 = v[0];
+ var version2 = v[1];
+ var wanted = v[2];
+ var found = diff(version1, version2);
+ var cmd = 'diff(' + version1 + ', ' + version2 + ')';
+ t.equal(found, wanted, cmd + ' === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\nvalid range test', function(t) {
+ // [range, result]
+ // validRange(range) -> result
+ // translate ranges into their canonical form
+ [['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '*'],
+ ['', '*'],
+ ['*', '*'],
+ ['*', '*'],
+ ['>=1.0.0', '>=1.0.0'],
+ ['>1.0.0', '>1.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['1', '>=1.0.0 <2.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['<=2.0.0', '<=2.0.0'],
+ ['<2.0.0', '<2.0.0'],
+ ['<2.0.0', '<2.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['>= 1.0.0', '>=1.0.0'],
+ ['> 1.0.0', '>1.0.0'],
+ ['> 1.0.0', '>1.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['<= 2.0.0', '<=2.0.0'],
+ ['< 2.0.0', '<2.0.0'],
+ ['< 2.0.0', '<2.0.0'],
+ ['>=0.1.97', '>=0.1.97'],
+ ['>=0.1.97', '>=0.1.97'],
+ ['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
+ ['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
+ ['||', '||'],
+ ['2.x.x', '>=2.0.0 <3.0.0'],
+ ['1.2.x', '>=1.2.0 <1.3.0'],
+ ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
+ ['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
+ ['x', '*'],
+ ['2.*.*', '>=2.0.0 <3.0.0'],
+ ['1.2.*', '>=1.2.0 <1.3.0'],
+ ['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
+ ['*', '*'],
+ ['2', '>=2.0.0 <3.0.0'],
+ ['2.3', '>=2.3.0 <2.4.0'],
+ ['~2.4', '>=2.4.0 <2.5.0'],
+ ['~2.4', '>=2.4.0 <2.5.0'],
+ ['~>3.2.1', '>=3.2.1 <3.3.0'],
+ ['~1', '>=1.0.0 <2.0.0'],
+ ['~>1', '>=1.0.0 <2.0.0'],
+ ['~> 1', '>=1.0.0 <2.0.0'],
+ ['~1.0', '>=1.0.0 <1.1.0'],
+ ['~ 1.0', '>=1.0.0 <1.1.0'],
+ ['^0', '>=0.0.0 <1.0.0'],
+ ['^ 1', '>=1.0.0 <2.0.0'],
+ ['^0.1', '>=0.1.0 <0.2.0'],
+ ['^1.0', '>=1.0.0 <2.0.0'],
+ ['^1.2', '>=1.2.0 <2.0.0'],
+ ['^0.0.1', '>=0.0.1 <0.0.2'],
+ ['^0.0.1-beta', '>=0.0.1-beta <0.0.2'],
+ ['^0.1.2', '>=0.1.2 <0.2.0'],
+ ['^1.2.3', '>=1.2.3 <2.0.0'],
+ ['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'],
+ ['<1', '<1.0.0'],
+ ['< 1', '<1.0.0'],
+ ['>=1', '>=1.0.0'],
+ ['>= 1', '>=1.0.0'],
+ ['<1.2', '<1.2.0'],
+ ['< 1.2', '<1.2.0'],
+ ['1', '>=1.0.0 <2.0.0'],
+ ['>01.02.03', '>1.2.3', true],
+ ['>01.02.03', null],
+ ['~1.2.3beta', '>=1.2.3-beta <1.3.0', true],
+ ['~1.2.3beta', null],
+ ['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0']
+ ].forEach(function(v) {
+ var pre = v[0];
+ var wanted = v[1];
+ var loose = v[2];
+ var found = validRange(pre, loose);
+
+ t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
+ });
+
+ t.end();
+});
+
+test('\ncomparators test', function(t) {
+ // [range, comparators]
+ // turn range into a set of individual comparators
+ [['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
+ ['1.0.0', [['1.0.0']]],
+ ['>=*', [['']]],
+ ['', [['']]],
+ ['*', [['']]],
+ ['*', [['']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>=1.0.0', [['>=1.0.0']]],
+ ['>1.0.0', [['>1.0.0']]],
+ ['>1.0.0', [['>1.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['1', [['>=1.0.0', '<2.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['<=2.0.0', [['<=2.0.0']]],
+ ['<2.0.0', [['<2.0.0']]],
+ ['<2.0.0', [['<2.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['>= 1.0.0', [['>=1.0.0']]],
+ ['> 1.0.0', [['>1.0.0']]],
+ ['> 1.0.0', [['>1.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['<= 2.0.0', [['<=2.0.0']]],
+ ['< 2.0.0', [['<2.0.0']]],
+ ['<\t2.0.0', [['<2.0.0']]],
+ ['>=0.1.97', [['>=0.1.97']]],
+ ['>=0.1.97', [['>=0.1.97']]],
+ ['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
+ ['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
+ ['||', [[''], ['']]],
+ ['2.x.x', [['>=2.0.0', '<3.0.0']]],
+ ['1.2.x', [['>=1.2.0', '<1.3.0']]],
+ ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
+ ['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
+ ['x', [['']]],
+ ['2.*.*', [['>=2.0.0', '<3.0.0']]],
+ ['1.2.*', [['>=1.2.0', '<1.3.0']]],
+ ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
+ ['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
+ ['*', [['']]],
+ ['2', [['>=2.0.0', '<3.0.0']]],
+ ['2.3', [['>=2.3.0', '<2.4.0']]],
+ ['~2.4', [['>=2.4.0', '<2.5.0']]],
+ ['~2.4', [['>=2.4.0', '<2.5.0']]],
+ ['~>3.2.1', [['>=3.2.1', '<3.3.0']]],
+ ['~1', [['>=1.0.0', '<2.0.0']]],
+ ['~>1', [['>=1.0.0', '<2.0.0']]],
+ ['~> 1', [['>=1.0.0', '<2.0.0']]],
+ ['~1.0', [['>=1.0.0', '<1.1.0']]],
+ ['~ 1.0', [['>=1.0.0', '<1.1.0']]],
+ ['~ 1.0.3', [['>=1.0.3', '<1.1.0']]],
+ ['~> 1.0.3', [['>=1.0.3', '<1.1.0']]],
+ ['<1', [['<1.0.0']]],
+ ['< 1', [['<1.0.0']]],
+ ['>=1', [['>=1.0.0']]],
+ ['>= 1', [['>=1.0.0']]],
+ ['<1.2', [['<1.2.0']]],
+ ['< 1.2', [['<1.2.0']]],
+ ['1', [['>=1.0.0', '<2.0.0']]],
+ ['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]],
+ ['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]],
+ ['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]],
+ ['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]],
+ ['>*', [['<0.0.0']]],
+ ['<*', [['<0.0.0']]]
+ ].forEach(function(v) {
+ var pre = v[0];
+ var wanted = v[1];
+ var found = toComparators(v[0]);
+ var jw = JSON.stringify(wanted);
+ t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
+ });
+
+ t.end();
+});
+
+test('\ninvalid version numbers', function(t) {
+ ['1.2.3.4',
+ 'NOT VALID',
+ 1.2,
+ null,
+ 'Infinity.NaN.Infinity'
+ ].forEach(function(v) {
+ t.throws(function() {
+ new SemVer(v);
+ }, {name:'TypeError', message:'Invalid Version: ' + v});
+ });
+
+ t.end();
+});
+
+test('\nstrict vs loose version numbers', function(t) {
+ [['=1.2.3', '1.2.3'],
+ ['01.02.03', '1.2.3'],
+ ['1.2.3-beta.01', '1.2.3-beta.1'],
+ [' =1.2.3', '1.2.3'],
+ ['1.2.3foo', '1.2.3-foo']
+ ].forEach(function(v) {
+ var loose = v[0];
+ var strict = v[1];
+ t.throws(function() {
+ new SemVer(loose);
+ });
+ var lv = new SemVer(loose, true);
+ t.equal(lv.version, strict);
+ t.ok(eq(loose, strict, true));
+ t.throws(function() {
+ eq(loose, strict);
+ });
+ t.throws(function() {
+ new SemVer(strict).compare(loose);
+ });
+ });
+ t.end();
+});
+
+test('\nstrict vs loose ranges', function(t) {
+ [['>=01.02.03', '>=1.2.3'],
+ ['~1.02.03beta', '>=1.2.3-beta <1.3.0']
+ ].forEach(function(v) {
+ var loose = v[0];
+ var comps = v[1];
+ t.throws(function() {
+ new Range(loose);
+ });
+ t.equal(new Range(loose, true).range, comps);
+ });
+ t.end();
+});
+
+test('\nmax satisfying', function(t) {
+ [[['1.2.3', '1.2.4'], '1.2', '1.2.4'],
+ [['1.2.4', '1.2.3'], '1.2', '1.2.4'],
+ [['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'],
+ [['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true]
+ ].forEach(function(v) {
+ var versions = v[0];
+ var range = v[1];
+ var expect = v[2];
+ var loose = v[3];
+ var actual = semver.maxSatisfying(versions, range, loose);
+ t.equal(actual, expect);
+ });
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js
new file mode 100644
index 0000000..0f7167d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/ltr.js
@@ -0,0 +1,181 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+var ltr = semver.ltr;
+
+test('\nltr tests', function(t) {
+ // [range, version, loose]
+ // Version should be less than range
+ [
+ ['~1.2.2', '1.2.1'],
+ ['~0.6.1-1', '0.6.1-0'],
+ ['1.0.0 - 2.0.0', '0.0.1'],
+ ['1.0.0-beta.2', '1.0.0-beta.1'],
+ ['1.0.0', '0.0.0'],
+ ['>=2.0.0', '1.1.1'],
+ ['>=2.0.0', '1.2.9'],
+ ['>2.0.0', '2.0.0'],
+ ['0.1.20 || 1.2.4', '0.1.5'],
+ ['2.x.x', '1.0.0'],
+ ['1.2.x', '1.1.0'],
+ ['1.2.x || 2.x', '1.0.0'],
+ ['2.*.*', '1.0.1'],
+ ['1.2.*', '1.1.3'],
+ ['1.2.* || 2.*', '1.1.9999'],
+ ['2', '1.0.0'],
+ ['2.3', '2.2.2'],
+ ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.3.5'],
+ ['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
+ ['~1', '0.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '0.2.4'],
+ ['~> 1', '0.2.3'],
+ ['~1.0', '0.1.2'], // >=1.0.0 <1.1.0
+ ['~ 1.0', '0.1.0'],
+ ['>1.2', '1.2.0'],
+ ['> 1.2', '1.2.1'],
+ ['1', '0.0.0beta', true],
+ ['~v0.5.4-pre', '0.5.4-alpha'],
+ ['~v0.5.4-pre', '0.5.4-alpha'],
+ ['=0.7.x', '0.6.0'],
+ ['=0.7.x', '0.6.0-asdf'],
+ ['>=0.7.x', '0.6.0'],
+ ['~1.2.2', '1.2.1'],
+ ['1.0.0 - 2.0.0', '0.2.3'],
+ ['1.0.0', '0.0.1'],
+ ['>=2.0.0', '1.0.0'],
+ ['>=2.0.0', '1.9999.9999'],
+ ['>=2.0.0', '1.2.9'],
+ ['>2.0.0', '2.0.0'],
+ ['>2.0.0', '1.2.9'],
+ ['2.x.x', '1.1.3'],
+ ['1.2.x', '1.1.3'],
+ ['1.2.x || 2.x', '1.1.3'],
+ ['2.*.*', '1.1.3'],
+ ['1.2.*', '1.1.3'],
+ ['1.2.* || 2.*', '1.1.3'],
+ ['2', '1.9999.9999'],
+ ['2.3', '2.2.1'],
+ ['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
+ ['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0
+ ['~1', '0.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '0.2.3'],
+ ['~1.0', '0.0.0'], // >=1.0.0 <1.1.0
+ ['>1', '1.0.0'],
+ ['2', '1.0.0beta', true],
+ ['>1', '1.0.0beta', true],
+ ['> 1', '1.0.0beta', true],
+ ['=0.7.x', '0.6.2'],
+ ['=0.7.x', '0.7.0-asdf'],
+ ['^1', '1.0.0-0'],
+ ['>=0.7.x', '0.7.0-asdf'],
+ ['1', '1.0.0beta', true],
+ ['>=0.7.x', '0.6.2'],
+ ['>1.2.3', '1.3.0-alpha']
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')';
+ t.ok(ltr(version, range, loose), msg);
+ });
+ t.end();
+});
+
+test('\nnegative ltr tests', function(t) {
+ // [range, version, loose]
+ // Version should NOT be less than range
+ [
+ ['~ 1.0', '1.1.0'],
+ ['~0.6.1-1', '0.6.1-1'],
+ ['1.0.0 - 2.0.0', '1.2.3'],
+ ['1.0.0 - 2.0.0', '2.9.9'],
+ ['1.0.0', '1.0.0'],
+ ['>=*', '0.2.4'],
+ ['', '1.0.0', true],
+ ['*', '1.2.3'],
+ ['>=1.0.0', '1.0.0'],
+ ['>=1.0.0', '1.0.1'],
+ ['>=1.0.0', '1.1.0'],
+ ['>1.0.0', '1.0.1'],
+ ['>1.0.0', '1.1.0'],
+ ['<=2.0.0', '2.0.0'],
+ ['<=2.0.0', '1.9999.9999'],
+ ['<=2.0.0', '0.2.9'],
+ ['<2.0.0', '1.9999.9999'],
+ ['<2.0.0', '0.2.9'],
+ ['>= 1.0.0', '1.0.0'],
+ ['>= 1.0.0', '1.0.1'],
+ ['>= 1.0.0', '1.1.0'],
+ ['> 1.0.0', '1.0.1'],
+ ['> 1.0.0', '1.1.0'],
+ ['<= 2.0.0', '2.0.0'],
+ ['<= 2.0.0', '1.9999.9999'],
+ ['<= 2.0.0', '0.2.9'],
+ ['< 2.0.0', '1.9999.9999'],
+ ['<\t2.0.0', '0.2.9'],
+ ['>=0.1.97', 'v0.1.97'],
+ ['>=0.1.97', '0.1.97'],
+ ['0.1.20 || 1.2.4', '1.2.4'],
+ ['0.1.20 || >1.2.4', '1.2.4'],
+ ['0.1.20 || 1.2.4', '1.2.3'],
+ ['0.1.20 || 1.2.4', '0.1.20'],
+ ['>=0.2.3 || <0.0.1', '0.0.0'],
+ ['>=0.2.3 || <0.0.1', '0.2.3'],
+ ['>=0.2.3 || <0.0.1', '0.2.4'],
+ ['||', '1.3.4'],
+ ['2.x.x', '2.1.3'],
+ ['1.2.x', '1.2.3'],
+ ['1.2.x || 2.x', '2.1.3'],
+ ['1.2.x || 2.x', '1.2.3'],
+ ['x', '1.2.3'],
+ ['2.*.*', '2.1.3'],
+ ['1.2.*', '1.2.3'],
+ ['1.2.* || 2.*', '2.1.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['1.2.* || 2.*', '1.2.3'],
+ ['*', '1.2.3'],
+ ['2', '2.1.2'],
+ ['2.3', '2.3.1'],
+ ['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
+ ['~2.4', '2.4.5'],
+ ['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
+ ['~1', '1.2.3'], // >=1.0.0 <2.0.0
+ ['~>1', '1.2.3'],
+ ['~> 1', '1.2.3'],
+ ['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
+ ['~ 1.0', '1.0.2'],
+ ['>=1', '1.0.0'],
+ ['>= 1', '1.0.0'],
+ ['<1.2', '1.1.1'],
+ ['< 1.2', '1.1.1'],
+ ['~v0.5.4-pre', '0.5.5'],
+ ['~v0.5.4-pre', '0.5.4'],
+ ['=0.7.x', '0.7.2'],
+ ['>=0.7.x', '0.7.2'],
+ ['<=0.7.x', '0.6.2'],
+ ['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
+ ['>=0.2.3 <=0.2.4', '0.2.4'],
+ ['1.0.0 - 2.0.0', '2.0.0'],
+ ['^3.0.0', '4.0.0'],
+ ['^1.0.0 || ~2.0.1', '2.0.0'],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
+ ['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
+ ['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'],
+ ['^1.0.0alpha', '1.0.0beta', true],
+ ['~1.0.0alpha', '1.0.0beta', true],
+ ['^1.0.0-alpha', '1.0.0beta', true],
+ ['~1.0.0-alpha', '1.0.0beta', true],
+ ['^1.0.0-alpha', '1.0.0-beta'],
+ ['~1.0.0-alpha', '1.0.0-beta'],
+ ['=0.1.0', '1.0.0']
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')';
+ t.notOk(ltr(version, range, loose), msg);
+ });
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js
new file mode 100644
index 0000000..e9d4039
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/node_modules/semver/test/major-minor-patch.js
@@ -0,0 +1,72 @@
+var tap = require('tap');
+var test = tap.test;
+var semver = require('../semver.js');
+
+test('\nmajor tests', function(t) {
+ // [range, version]
+ // Version should be detectable despite extra characters
+ [
+ ['1.2.3', 1],
+ [' 1.2.3 ', 1],
+ [' 2.2.3-4 ', 2],
+ [' 3.2.3-pre ', 3],
+ ['v5.2.3', 5],
+ [' v8.2.3 ', 8],
+ ['\t13.2.3', 13],
+ ['=21.2.3', 21, true],
+ ['v=34.2.3', 34, true]
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'major(' + range + ') = ' + version;
+ t.equal(semver.major(range, loose), version, msg);
+ });
+ t.end();
+});
+
+test('\nminor tests', function(t) {
+ // [range, version]
+ // Version should be detectable despite extra characters
+ [
+ ['1.1.3', 1],
+ [' 1.1.3 ', 1],
+ [' 1.2.3-4 ', 2],
+ [' 1.3.3-pre ', 3],
+ ['v1.5.3', 5],
+ [' v1.8.3 ', 8],
+ ['\t1.13.3', 13],
+ ['=1.21.3', 21, true],
+ ['v=1.34.3', 34, true]
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'minor(' + range + ') = ' + version;
+ t.equal(semver.minor(range, loose), version, msg);
+ });
+ t.end();
+});
+
+test('\npatch tests', function(t) {
+ // [range, version]
+ // Version should be detectable despite extra characters
+ [
+ ['1.2.1', 1],
+ [' 1.2.1 ', 1],
+ [' 1.2.2-4 ', 2],
+ [' 1.2.3-pre ', 3],
+ ['v1.2.5', 5],
+ [' v1.2.8 ', 8],
+ ['\t1.2.13', 13],
+ ['=1.2.21', 21, true],
+ ['v=1.2.34', 34, true]
+ ].forEach(function(tuple) {
+ var range = tuple[0];
+ var version = tuple[1];
+ var loose = tuple[2] || false;
+ var msg = 'patch(' + range + ') = ' + version;
+ t.equal(semver.patch(range, loose), version, msg);
+ });
+ t.end();
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/package.json
new file mode 100644
index 0000000..f5a3786
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "agent-base",
+ "version": "2.0.1",
+ "description": "Turn a function into an `http.Agent` instance",
+ "main": "agent.js",
+ "scripts": {
+ "test": "mocha --reporter spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-agent-base.git"
+ },
+ "keywords": [
+ "http",
+ "agent",
+ "base",
+ "barebones",
+ "https"
+ ],
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-agent-base/issues"
+ },
+ "devDependencies": {
+ "mocha": "2"
+ },
+ "dependencies": {
+ "extend": "~3.0.0",
+ "semver": "~5.0.1"
+ },
+ "gitHead": "b46938339bcecd261939dc55798270d0398ad8f0",
+ "homepage": "https://github.com/TooTallNate/node-agent-base#readme",
+ "_id": "agent-base@2.0.1",
+ "_shasum": "bd8f9e86a8eb221fffa07bd14befd55df142815e",
+ "_from": "agent-base@>=2.0.0 <3.0.0",
+ "_npmVersion": "2.11.3",
+ "_nodeVersion": "0.12.7",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "bd8f9e86a8eb221fffa07bd14befd55df142815e",
+ "tarball": "https://registry.npmjs.org/agent-base/-/agent-base-2.0.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.0.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/patch-core.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/patch-core.js
new file mode 100644
index 0000000..7cdacaf
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/patch-core.js
@@ -0,0 +1,54 @@
+var url = require('url');
+var http = require('http');
+var https = require('https');
+var semver = require('semver');
+var inherits = require('util').inherits;
+
+
+// we only need to patch the `http.request()` and
+// `http.ClientRequest` on older versions of Node.js
+if (semver.lt(process.version, '0.11.8')) {
+ // subclass the native ClientRequest to include the
+ // passed in `options` object.
+ http.ClientRequest = (function (_ClientRequest) {
+ function ClientRequest (options, cb) {
+ this._options = options;
+ _ClientRequest.call(this, options, cb);
+ }
+ inherits(ClientRequest, _ClientRequest);
+
+ return ClientRequest;
+ })(http.ClientRequest);
+
+
+ // need to re-define the `request()` method, since on node v0.8/v0.10
+ // the closure-local ClientRequest is used, rather than the monkey
+ // patched version we have created here.
+ http.request = (function (request) {
+ return function (options, cb) {
+ if (typeof options === 'string') {
+ options = url.parse(options);
+ }
+ if (options.protocol && options.protocol !== 'http:') {
+ throw new Error('Protocol:' + options.protocol + ' not supported.');
+ }
+ return new http.ClientRequest(options, cb);
+ };
+ })(http.request);
+}
+
+
+// this currently needs to be applied to all Node.js versions
+// (v0.8.x, v0.10.x, v0.12.x), in order to determine if the `req`
+// is an HTTP or HTTPS request. There is currently no PR attempting
+// to move this property upstream.
+https.request = (function (request) {
+ return function (options, cb) {
+ if (typeof options === 'string') {
+ options = url.parse(options);
+ }
+ if (null == options.port) options.port = 443;
+ options.secureEndpoint = true;
+ return request.call(https, options, cb);
+ };
+})(https.request);
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key
new file mode 100644
index 0000000..fd12501
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr
+bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y
+b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB
+AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd
+Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x
+1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ
+5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW
+T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX
+uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N
+Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw
+h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J
+bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ
+ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem
new file mode 100644
index 0000000..b115a5e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem
@@ -0,0 +1,12 @@
+-----BEGIN CERTIFICATE-----
+MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3
+NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0
+NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3
+NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
+ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay
+OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn
+g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN
+AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4
+1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J
+QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI=
+-----END CERTIFICATE-----
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/test.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/test.js
new file mode 100644
index 0000000..f87d308
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/agent-base/test/test.js
@@ -0,0 +1,300 @@
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs');
+var url = require('url');
+var net = require('net');
+var tls = require('tls');
+var http = require('http');
+var https = require('https');
+var assert = require('assert');
+var events = require('events');
+var Agent = require('../');
+
+describe('Agent', function () {
+ describe('"error" event', function () {
+ it('should be invoked on `http.ClientRequest` instance if passed to callback function on the first tick', function (done) {
+ var agent = new Agent(function (req, opts, fn) {
+ fn(new Error('is this caught?'));
+ });
+ var info = url.parse('http://127.0.0.1/foo');
+ info.agent = agent;
+ var req = http.get(info);
+ req.on('error', function (err) {
+ assert.equal('is this caught?', err.message);
+ done();
+ });
+ });
+ it('should be invoked on `http.ClientRequest` instance if passed to callback function after the first tick', function (done) {
+ var agent = new Agent(function (req, opts, fn) {
+ setTimeout(function () {
+ fn(new Error('is this caught?'));
+ }, 10);
+ });
+ var info = url.parse('http://127.0.0.1/foo');
+ info.agent = agent;
+ var req = http.get(info);
+ req.on('error', function (err) {
+ assert.equal('is this caught?', err.message);
+ done();
+ });
+ });
+ });
+ describe('artificial "streams"', function () {
+ it('should send a GET request', function (done) {
+ var stream = new events.EventEmitter();
+
+ // needed for the `http` module to call .write() on the stream
+ stream.writable = true;
+
+ stream.write = function (str) {
+ assert(0 == str.indexOf('GET / HTTP/1.1'));
+ done();
+ };
+
+ var opts = {
+ method: 'GET',
+ host: '127.0.0.1',
+ path: '/',
+ port: 80,
+ agent: new Agent(function (req, opts, fn) {
+ fn(null, stream);
+ })
+ };
+ var req = http.request(opts);
+ req.end();
+ });
+ it('should receive a GET response', function (done) {
+ var stream = new events.EventEmitter();
+ var opts = {
+ method: 'GET',
+ host: '127.0.0.1',
+ path: '/',
+ port: 80,
+ agent: new Agent(function (req, opts, fn) {
+ fn(null, stream);
+ })
+ };
+ var req = http.request(opts, function (res) {
+ assert.equal('0.9', res.httpVersion);
+ assert.equal(111, res.statusCode);
+ assert.equal('bar', res.headers.foo);
+ done();
+ });
+ req.end();
+
+ // have to nextTick() since `http.ClientRequest` doesn't *actually*
+ // attach the listeners to the "stream" until the next tick :\
+ process.nextTick(function () {
+ var buf = new Buffer('HTTP/0.9 111\r\n' +
+ 'Foo: bar\r\n' +
+ 'Set-Cookie: 1\r\n' +
+ 'Set-Cookie: 2\r\n\r\n');
+ if ('function' == typeof stream.ondata) {
+ // node <= v0.11.3
+ stream.ondata(buf, 0, buf.length);
+ } else {
+ // node > v0.11.3
+ stream.emit('data', buf);
+ }
+ });
+ });
+ });
+});
+
+describe('"http" module', function () {
+ var server;
+ var port;
+
+ // setup test HTTP server
+ before(function (done) {
+ server = http.createServer();
+ server.listen(0, function () {
+ port = server.address().port;
+ done();
+ });
+ });
+
+ // shut down test HTTP server
+ after(function (done) {
+ server.once('close', function () {
+ done();
+ });
+ server.close();
+ });
+
+ it('should work for basic HTTP requests', function (done) {
+ var called = false;
+ var agent = new Agent(function (req, opts, fn) {
+ called = true;
+ var socket = net.connect(opts);
+ fn(null, socket);
+ });
+
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function (req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/foo');
+ info.agent = agent;
+ http.get(info, function (res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should set the `Connection: close` response header', function (done) {
+ var called = false;
+ var agent = new Agent(function (req, opts, fn) {
+ called = true;
+ var socket = net.connect(opts);
+ fn(null, socket);
+ });
+
+ // add HTTP server "request" listener
+ var gotReq = false;
+ server.once('request', function (req, res) {
+ gotReq = true;
+ res.setHeader('X-Url', req.url);
+ assert.equal('close', req.headers.connection);
+ res.end();
+ });
+
+ var info = url.parse('http://127.0.0.1:' + port + '/bar');
+ info.agent = agent;
+ http.get(info, function (res) {
+ assert.equal('/bar', res.headers['x-url']);
+ assert.equal('close', res.headers.connection);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should pass through options from `http.request()`', function (done) {
+ var agent = new Agent(function (req, opts, fn) {
+ assert.equal('google.com', opts.host);
+ assert.equal('bar', opts.foo);
+ done();
+ });
+
+ http.get({
+ host: 'google.com',
+ foo: 'bar',
+ agent: agent
+ });
+ });
+
+ it('should default to port 80', function (done) {
+ var agent = new Agent(function (req, opts, fn) {
+ assert.equal(80, opts.port);
+ done();
+ });
+
+ // (probably) not hitting a real HTTP server here,
+ // so no need to add a httpServer request listener
+ http.get({
+ host: '127.0.0.1',
+ path: '/foo',
+ agent: agent
+ });
+ });
+});
+
+describe('"https" module', function () {
+ var server;
+ var port;
+
+ // setup test HTTPS server
+ before(function (done) {
+ var options = {
+ key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
+ cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
+ };
+ server = https.createServer(options);
+ server.listen(0, function () {
+ port = server.address().port;
+ done();
+ });
+ });
+
+ // shut down test HTTP server
+ after(function (done) {
+ server.once('close', function () {
+ done();
+ });
+ server.close();
+ });
+
+ it('should work for basic HTTPS requests', function (done) {
+ var called = false;
+ var agent = new Agent(function (req, opts, fn) {
+ called = true;
+ assert(opts.secureEndpoint);
+ var socket = tls.connect(opts);
+ fn(null, socket);
+ });
+
+ // add HTTPS server "request" listener
+ var gotReq = false;
+ server.once('request', function (req, res) {
+ gotReq = true;
+ res.setHeader('X-Foo', 'bar');
+ res.setHeader('X-Url', req.url);
+ res.end();
+ });
+
+ var info = url.parse('https://127.0.0.1:' + port + '/foo');
+ info.agent = agent;
+ info.rejectUnauthorized = false;
+ https.get(info, function (res) {
+ assert.equal('bar', res.headers['x-foo']);
+ assert.equal('/foo', res.headers['x-url']);
+ assert(gotReq);
+ assert(called);
+ done();
+ });
+ });
+
+ it('should pass through options from `https.request()`', function (done) {
+ var agent = new Agent(function (req, opts, fn) {
+ assert.equal('google.com', opts.host);
+ assert.equal('bar', opts.foo);
+ done();
+ });
+
+ https.get({
+ host: 'google.com',
+ foo: 'bar',
+ agent: agent
+ });
+ });
+
+ it('should default to port 443', function (done) {
+ var agent = new Agent(function (req, opts, fn) {
+ assert.equal(true, opts.secureEndpoint);
+ assert.equal(false, opts.rejectUnauthorized);
+ assert.equal(443, opts.port);
+ done();
+ });
+
+ // (probably) not hitting a real HTTPS server here,
+ // so no need to add a httpsServer request listener
+ https.get({
+ host: '127.0.0.1',
+ path: '/foo',
+ agent: agent,
+ rejectUnauthorized: false
+ });
+ });
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/.jshintrc b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/.jshintrc
new file mode 100644
index 0000000..299877f
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/.jshintrc
@@ -0,0 +1,3 @@
+{
+ "laxbreak": true
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/.npmignore
new file mode 100644
index 0000000..35b0dc7
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/.npmignore
@@ -0,0 +1,7 @@
+support
+test
+examples
+example
+*.sock
+dist
+yarn.lock
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/CHANGELOG.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/CHANGELOG.md
new file mode 100644
index 0000000..d5bb0ac
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/CHANGELOG.md
@@ -0,0 +1,228 @@
+2.3.2 / 2016-11-09
+==================
+
+ * Fix: be super-safe in index.js as well (@TooTallNate)
+ * Fix: should check whether process exists (Tom Newby)
+
+2.3.1 / 2016-11-09
+==================
+
+ * Fix: Added electron compatibility (#324, @paulcbetts)
+ * Improvement: Added performance optimizations (@tootallnate)
+ * Readme: Corrected PowerShell environment variable example (#252, @gimre)
+ * Misc: Removed yarn lock file from source control (#321, @fengmk2)
+
+2.3.0 / 2016-11-07
+==================
+
+ * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
+ * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
+ * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
+ * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
+ * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
+ * Package: Update "ms" to 0.7.2 (#315, @DevSide)
+ * Package: removed superfluous version property from bower.json (#207 @kkirsche)
+ * Readme: fix USE_COLORS to DEBUG_COLORS
+ * Readme: Doc fixes for format string sugar (#269, @mlucool)
+ * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
+ * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
+ * Readme: better docs for browser support (#224, @matthewmueller)
+ * Tooling: Added yarn integration for development (#317, @thebigredgeek)
+ * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
+ * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
+ * Misc: Updated contributors (@thebigredgeek)
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/LICENSE b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/LICENSE
new file mode 100644
index 0000000..658c933
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/LICENSE
@@ -0,0 +1,19 @@
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+and associated documentation files (the 'Software'), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/Makefile b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/Makefile
new file mode 100644
index 0000000..db71caf
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/Makefile
@@ -0,0 +1,37 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= $(shell which node)
+YARN ?= $(shell which yarn)
+PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+all: dist/debug.js
+
+install: node_modules
+
+clean:
+ @rm -rf dist
+
+dist:
+ @mkdir -p $@
+
+dist/debug.js: node_modules browser.js debug.js dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > $@
+
+distclean: clean
+ @rm -rf node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(PKG) install
+ @touch node_modules
+
+.PHONY: all install clean distclean
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/Readme.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/Readme.md
new file mode 100644
index 0000000..9e80851
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/Readme.md
@@ -0,0 +1,199 @@
+# debug
+
+ tiny node.js debugging utility modelled after node core's debugging technique.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+ With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` [format string goodies](https://developer.chrome.com/devtools/docs/console-api#consolelogobject-object) you're used to work fine. A unique color is selected per-function for visibility.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
+
+ 
+
+ 
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+ Note that PowerShell using different syntax to set environment variables.
+
+ ```cmd
+ $env:DEBUG = "*,-not_this"
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
+
+ 
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
+
+ 
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
+
+## Browser support
+
+ Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. You can enable this using `localStorage.debug`:
+
+```js
+localStorage.debug = 'worker:*'
+```
+
+And then refresh the page.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+ 
+
+## Output streams
+
+
+### stderr vs stdout
+ By default `debug` will log to stderr, however this can be changed by setting the environment variable `DEBUG_FD` to `1` for stdout and `2` for stderr (the default value).
+
+You can also set an alternative logging method per-namespace by overriding the `log` method on a per-namespace or globally:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+### Save debug output to a file
+
+You can save all debug statements to a file by piping them.
+
+Example:
+
+```bash
+$ DEBUG_FD=3 node your-app.js 3> whatever.log
+```
+
+### Terminal colors
+
+ By default colors will only be used in a TTY. However this can be overridden by setting the environment variable `DEBUG_COLORS` to `1`.
+
+ Note: Certain IDEs (such as WebStorm) don't support colors on stderr. In these cases you must set `DEBUG_COLORS` to `1` and additionally change `DEBUG_FD` to `1`.
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+ - Andrew Rhyne
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/bower.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/bower.json
new file mode 100644
index 0000000..7a1a5a8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/bower.json
@@ -0,0 +1,29 @@
+{
+ "name": "visionmedia-debug",
+ "main": "dist/debug.js",
+ "homepage": "https://github.com/visionmedia/debug",
+ "authors": [
+ "TJ Holowaychuk ",
+ "Nathan Rajlich (http://n8.io)",
+ "Andrew Rhyne "
+ ],
+ "description": "visionmedia-debug",
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "visionmedia",
+ "debug"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/browser.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/browser.js
new file mode 100644
index 0000000..095a045
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/browser.js
@@ -0,0 +1,175 @@
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (window.console && (console.firebug || (console.exception && console.table))) ||
+ // is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ return JSON.stringify(v);
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return args;
+
+ var c = 'color: ' + this.color;
+ args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+ return args;
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if ('env' in (typeof process === 'undefined' ? {} : process)) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage(){
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/component.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/component.json
new file mode 100644
index 0000000..eb399b7
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.3.2",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "browser.js",
+ "scripts": [
+ "browser.js",
+ "debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/debug.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/debug.js
new file mode 100644
index 0000000..a5992a4
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/debug.js
@@ -0,0 +1,200 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = debug.debug = debug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lowercased letter, i.e. "n".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previously assigned color.
+ */
+
+var prevColor = 0;
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor() {
+ return exports.colors[prevColor++ % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function debug(namespace) {
+
+ // define the `disabled` version
+ function disabled() {
+ }
+ disabled.enabled = false;
+
+ // define the `enabled` version
+ function enabled() {
+
+ var self = enabled;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // add the `color` if not set
+ if (null == self.useColors) self.useColors = exports.useColors();
+ if (null == self.color && self.useColors) self.color = selectColor();
+
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %o
+ args = ['%o'].concat(args);
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // apply env-specific formatting
+ args = exports.formatArgs.apply(self, args);
+
+ var logFn = enabled.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+ enabled.enabled = true;
+
+ var fn = exports.enabled(namespace) ? enabled : disabled;
+
+ fn.namespace = namespace;
+
+ return fn;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ var split = (namespaces || '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/[\\^$+?.()|[\]{}]/g, '\\$&').replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/index.js
new file mode 100644
index 0000000..8a39392
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/index.js
@@ -0,0 +1,10 @@
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if ((typeof process === 'undefined' ? {} : process).type === 'renderer') {
+ module.exports = require('./browser.js');
+} else {
+ module.exports = require('./node.js');
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node.js
new file mode 100644
index 0000000..01e9fad
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node.js
@@ -0,0 +1,213 @@
+
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
+ if (0 === debugColors.length) {
+ return tty.isatty(fd);
+ } else {
+ return '0' !== debugColors
+ && 'no' !== debugColors
+ && 'false' !== debugColors
+ && 'disabled' !== debugColors;
+ }
+}
+
+/**
+ * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
+ */
+
+var inspect = (4 === util.inspect.length ?
+ // node <= 0.8.x
+ function (v, colors) {
+ return util.inspect(v, void 0, void 0, colors);
+ } :
+ // node > 0.8.x
+ function (v, colors) {
+ return util.inspect(v, { colors: colors });
+ }
+);
+
+exports.formatters.o = exports.formatters.O = function(v) {
+ return inspect(v, this.useColors)
+ .replace(/\s*\n\s*/g, ' ');
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var len = arguments.length;
+ var args = new Array(len);
+ var useColors = this.useColors;
+ var name = this.namespace;
+ for (var i = 0; i < len; i++) {
+ args[i] = arguments[i];
+ }
+
+ if (useColors) {
+ var c = this.color;
+
+ args[0] = ' \u001b[3' + c + ';1m' + name + ' '
+ + '\u001b[0m'
+ + args[0];
+ args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+ return args;
+}
+
+/**
+ * Invokes `console.error()` with the specified arguments.
+ */
+
+function log() {
+ return stream.write(util.format.apply(this, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/LICENSE.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/LICENSE.md
new file mode 100644
index 0000000..69b6125
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/README.md
new file mode 100644
index 0000000..5b47570
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/README.md
@@ -0,0 +1,52 @@
+# ms
+
+[](https://travis-ci.org/zeit/ms)
+[](https://github.com/sindresorhus/xo)
+[](https://zeit.chat/)
+
+Use this package to easily convert various time formats to milliseconds.
+
+## Examples
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('1y') // 31557600000
+ms('100') // 100
+```
+
+### Convert from milliseconds
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+### Time format written-out
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+## Features
+
+- Works both in [node](https://nodejs.org) and in the browser.
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
+
+## Caught a bug?
+
+1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
+2. Link the package to the global module directory: `npm link`
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
+
+As always, you can run the tests using: `npm test`
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/index.js
new file mode 100644
index 0000000..824b37e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/index.js
@@ -0,0 +1,149 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000
+var m = s * 60
+var h = m * 60
+var d = h * 24
+var y = d * 365.25
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function (val, options) {
+ options = options || {}
+ var type = typeof val
+ if (type === 'string' && val.length > 0) {
+ return parse(val)
+ } else if (type === 'number' && isNaN(val) === false) {
+ return options.long ?
+ fmtLong(val) :
+ fmtShort(val)
+ }
+ throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
+}
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = String(str)
+ if (str.length > 10000) {
+ return
+ }
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str)
+ if (!match) {
+ return
+ }
+ var n = parseFloat(match[1])
+ var type = (match[2] || 'ms').toLowerCase()
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n
+ default:
+ return undefined
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+ if (ms >= d) {
+ return Math.round(ms / d) + 'd'
+ }
+ if (ms >= h) {
+ return Math.round(ms / h) + 'h'
+ }
+ if (ms >= m) {
+ return Math.round(ms / m) + 'm'
+ }
+ if (ms >= s) {
+ return Math.round(ms / s) + 's'
+ }
+ return ms + 'ms'
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms'
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) {
+ return
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's'
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/package.json
new file mode 100644
index 0000000..d3440d9
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/node_modules/ms/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "ms",
+ "version": "0.7.2",
+ "description": "Tiny milisecond conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zeit/ms.git"
+ },
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "test": "xo && mocha test/index.js",
+ "test-browser": "serve ./test"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "expect.js": "^0.3.1",
+ "mocha": "^3.0.2",
+ "serve": "^1.4.0",
+ "xo": "^0.17.0"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "xo": {
+ "space": true,
+ "semicolon": false,
+ "envs": [
+ "mocha"
+ ],
+ "rules": {
+ "complexity": 0
+ }
+ },
+ "gitHead": "ac92a7e0790ba2622a74d9d60690ca0d2c070a45",
+ "bugs": {
+ "url": "https://github.com/zeit/ms/issues"
+ },
+ "homepage": "https://github.com/zeit/ms#readme",
+ "_id": "ms@0.7.2",
+ "_shasum": "ae25cf2512b3885a1d95d7f037868d8431124765",
+ "_from": "ms@0.7.2",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "6.8.0",
+ "_npmUser": {
+ "name": "leo",
+ "email": "leo@zeit.co"
+ },
+ "dist": {
+ "shasum": "ae25cf2512b3885a1d95d7f037868d8431124765",
+ "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "leo",
+ "email": "leo@zeit.co"
+ },
+ {
+ "name": "rauchg",
+ "email": "rauchg@gmail.com"
+ }
+ ],
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/ms-0.7.2.tgz_1477383407940_0.4743474116548896"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/package.json
new file mode 100644
index 0000000..122b0af
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/debug/package.json
@@ -0,0 +1,88 @@
+{
+ "name": "debug",
+ "version": "2.3.2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io"
+ },
+ {
+ "name": "Andrew Rhyne",
+ "email": "rhyneandrew@gmail.com"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "0.7.2"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "mocha": "*"
+ },
+ "main": "./index.js",
+ "browser": "./browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ },
+ "gitHead": "1c6f45840d0dba8cb14f9975b4633bb685fda400",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "homepage": "https://github.com/visionmedia/debug#readme",
+ "_id": "debug@2.3.2",
+ "scripts": {},
+ "_shasum": "94cb466ef7d6d2c7e5245cdd6e4104f2d0d70d30",
+ "_from": "debug@>=2.0.0 <3.0.0",
+ "_npmVersion": "3.10.8",
+ "_nodeVersion": "7.0.0",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "kolban",
+ "email": "kolban1@kolban.com"
+ },
+ {
+ "name": "thebigredgeek",
+ "email": "rhyneandrew@gmail.com"
+ },
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "94cb466ef7d6d2c7e5245cdd6e4104f2d0d70d30",
+ "tarball": "https://registry.npmjs.org/debug/-/debug-2.3.2.tgz"
+ },
+ "_npmOperationalInternal": {
+ "host": "packages-18-east.internal.npmjs.com",
+ "tmp": "tmp/debug-2.3.2.tgz_1478759402178_0.8417916153557599"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.3.2.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.eslintrc b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.eslintrc
new file mode 100644
index 0000000..d49f173
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.eslintrc
@@ -0,0 +1,192 @@
+{
+ "env": {
+ "browser": false,
+ "node": true,
+ "amd": false,
+ "mocha": false,
+ "jasmine": false
+ },
+
+ "rules": {
+ "accessor-pairs": [2, { getWithoutSet: false, setWithoutGet: true }],
+ "array-bracket-spacing": [2, "never", {
+ "singleValue": false,
+ "objectsInArrays": false,
+ "arraysInArrays": false
+ }],
+ "block-scoped-var": [0],
+ "brace-style": [2, "1tbs", { "allowSingleLine": true }],
+ "camelcase": [2],
+ "comma-dangle": [2, "never"],
+ "comma-spacing": [2],
+ "comma-style": [2, "last"],
+ "complexity": [2, 15],
+ "computed-property-spacing": [2, "never"],
+ "consistent-return": [2],
+ "consistent-this": [0, "that"],
+ "constructor-super": [2],
+ "curly": [2, "all"],
+ "default-case": [2],
+ "dot-notation": [2, { "allowKeywords": true }],
+ "eol-last": [2],
+ "eqeqeq": [2],
+ "func-names": [0],
+ "func-style": [2, "expression"],
+ "generator-star-spacing": [2, { "before": false, "after": true }],
+ "global-strict": [0, "never"],
+ "guard-for-in": [0],
+ "handle-callback-err": [0],
+ "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
+ "linebreak-style": [2, "unix"],
+ "lines-around-comment": [2, {
+ "beforeBlockComment": false,
+ "afterBlockComment": false,
+ "beforeLineComment": false,
+ "beforeLineComment": false,
+ "allowBlockStart": true,
+ "allowBlockEnd": true
+ }],
+ "quotes": [2, "single", "avoid-escape"],
+ "max-depth": [1, 4],
+ "max-len": [0, 80, 4],
+ "max-nested-callbacks": [2, 2],
+ "max-params": [2, 2],
+ "max-statements": [2, 21],
+ "new-parens": [2],
+ "new-cap": [2],
+ "newline-after-var": [0],
+ "no-alert": [2],
+ "no-array-constructor": [2],
+ "no-bitwise": [0],
+ "no-caller": [2],
+ "no-catch-shadow": [2],
+ "no-cond-assign": [2],
+ "no-console": [2],
+ "no-constant-condition": [2],
+ "no-continue": [2],
+ "no-control-regex": [2],
+ "no-debugger": [2],
+ "no-delete-var": [2],
+ "no-div-regex": [0],
+ "no-dupe-args": [2],
+ "no-dupe-keys": [2],
+ "no-duplicate-case": [2],
+ "no-else-return": [0],
+ "no-empty": [2],
+ "no-empty-character-class": [2],
+ "no-empty-label": [2],
+ "no-eq-null": [0],
+ "no-eval": [2],
+ "no-ex-assign": [2],
+ "no-extend-native": [2],
+ "no-extra-bind": [2],
+ "no-extra-boolean-cast": [2],
+ "no-extra-parens": [0],
+ "no-extra-semi": [2],
+ "no-fallthrough": [2],
+ "no-floating-decimal": [2],
+ "no-func-assign": [2],
+ "no-implied-eval": [2],
+ "no-inline-comments": [0],
+ "no-inner-declarations": [2, "functions"],
+ "no-invalid-regexp": [2],
+ "no-irregular-whitespace": [2],
+ "no-iterator": [2],
+ "no-label-var": [2],
+ "no-labels": [2],
+ "no-lone-blocks": [2],
+ "no-lonely-if": [2],
+ "no-loop-func": [2],
+ "no-mixed-requires": [0, false],
+ "no-mixed-spaces-and-tabs": [2, false],
+ "no-multi-spaces": [2],
+ "no-multi-str": [2],
+ "no-multiple-empty-lines": [2, {"max": 1}],
+ "no-native-reassign": [2],
+ "no-negated-in-lhs": [2],
+ "no-nested-ternary": [0],
+ "no-new": [2],
+ "no-new-func": [2],
+ "no-new-object": [2],
+ "no-new-require": [0],
+ "no-new-wrappers": [2],
+ "no-obj-calls": [2],
+ "no-octal": [2],
+ "no-octal-escape": [2],
+ "no-param-reassign": [2],
+ "no-path-concat": [0],
+ "no-plusplus": [0],
+ "no-process-env": [0],
+ "no-process-exit": [2],
+ "no-proto": [2],
+ "no-redeclare": [2],
+ "no-regex-spaces": [2],
+ "no-reserved-keys": [2],
+ "no-restricted-modules": [0],
+ "no-return-assign": [2, "always"],
+ "no-script-url": [2],
+ "no-self-compare": [0],
+ "no-sequences": [2],
+ "no-shadow": [2],
+ "no-shadow-restricted-names": [2],
+ "no-space-before-semi": [2],
+ "no-spaced-func": [2],
+ "no-sparse-arrays": [2],
+ "no-sync": [0],
+ "no-ternary": [0],
+ "no-this-before-super": [2],
+ "no-throw-literal": [2],
+ "no-trailing-spaces": [2, { "skipBlankLines": false }],
+ "no-undef": [2],
+ "no-undef-init": [2],
+ "no-undefined": [0],
+ "no-underscore-dangle": [2],
+ "no-unexpected-multiline": [2],
+ "no-unneeded-ternary": [2],
+ "no-unreachable": [2],
+ "no-unused-expressions": [2],
+ "no-unused-vars": [2, { "vars": "all", "args": "after-used" }],
+ "no-use-before-define": [2],
+ "no-void": [0],
+ "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
+ "no-with": [2],
+ "no-wrap-func": [2],
+ "object-curly-spacing": [2, "always"],
+ "object-shorthand": [2, "never"],
+ "one-var": [0],
+ "operator-assignment": [0, "always"],
+ "operator-linebreak": [2, "none"],
+ "padded-blocks": [0],
+ "prefer-const": [0],
+ "quote-props": [0],
+ "radix": [0],
+ "semi": [2],
+ "semi-spacing": [2, { "before": false, "after": true }],
+ "sort-vars": [0],
+ "space-after-keywords": [2, "always"],
+ "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],
+ "space-before-blocks": [0, "always"],
+ "space-in-brackets": [0, "never", {
+ "singleValue": true,
+ "arraysInArrays": false,
+ "arraysInObjects": false,
+ "objectsInArrays": true,
+ "objectsInObjects": true,
+ "propertyName": false
+ }],
+ "space-in-parens": [2, "never"],
+ "space-infix-ops": [2],
+ "space-return-throw-case": [2],
+ "space-unary-ops": [2, { "words": true, "nonwords": false }],
+ "spaced-comment": [2, "always"],
+ "spaced-line-comment": [0, "always"],
+ "strict": [2, "global"],
+ "use-isnan": [2],
+ "valid-jsdoc": [0],
+ "valid-typeof": [2],
+ "vars-on-top": [0],
+ "wrap-iife": [2],
+ "wrap-regex": [2],
+ "yoda": [2, "never", { "exceptRange": true, "onlyEquality": false }]
+ }
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.jscs.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.jscs.json
new file mode 100644
index 0000000..7e84b28
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.jscs.json
@@ -0,0 +1,104 @@
+{
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": "allButReserved",
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": true,
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 6
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true
+}
+
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.npmignore
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.npmignore
@@ -0,0 +1 @@
+test
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.travis.yml
new file mode 100644
index 0000000..ebef644
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/.travis.yml
@@ -0,0 +1,44 @@
+language: node_js
+node_js:
+ - "iojs-v2.3"
+ - "iojs-v2.2"
+ - "iojs-v2.1"
+ - "iojs-v2.0"
+ - "iojs-v1.8"
+ - "iojs-v1.7"
+ - "iojs-v1.6"
+ - "iojs-v1.5"
+ - "iojs-v1.4"
+ - "iojs-v1.3"
+ - "iojs-v1.2"
+ - "iojs-v1.1"
+ - "iojs-v1.0"
+ - "0.12"
+ - "0.11"
+ - "0.10"
+ - "0.9"
+ - "0.8"
+ - "0.6"
+ - "0.4"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm'
+sudo: false
+matrix:
+ fast_finish: true
+ allow_failures:
+ - node_js: "iojs-v2.2"
+ - node_js: "iojs-v2.1"
+ - node_js: "iojs-v2.0"
+ - node_js: "iojs-v1.7"
+ - node_js: "iojs-v1.6"
+ - node_js: "iojs-v1.5"
+ - node_js: "iojs-v1.4"
+ - node_js: "iojs-v1.3"
+ - node_js: "iojs-v1.2"
+ - node_js: "iojs-v1.1"
+ - node_js: "iojs-v1.0"
+ - node_js: "0.11"
+ - node_js: "0.9"
+ - node_js: "0.8"
+ - node_js: "0.6"
+ - node_js: "0.4"
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/CHANGELOG.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/CHANGELOG.md
new file mode 100644
index 0000000..ee0cfd6
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/CHANGELOG.md
@@ -0,0 +1,69 @@
+3.0.0 / 2015-07-01
+==================
+ * [Possible breaking change] Use global "strict" directive (#32)
+ * [Tests] `int` is an ES3 reserved word
+ * [Tests] Test up to `io.js` `v2.3`
+ * [Tests] Add `npm run eslint`
+ * [Dev Deps] Update `covert`, `jscs`
+
+2.0.1 / 2015-04-25
+==================
+ * Use an inline `isArray` check, for ES3 browsers. (#27)
+ * Some old browsers fail when an identifier is `toString`
+ * Test latest `node` and `io.js` versions on `travis-ci`; speed up builds
+ * Add license info to package.json (#25)
+ * Update `tape`, `jscs`
+ * Adding a CHANGELOG
+
+2.0.0 / 2014-10-01
+==================
+ * Increase code coverage to 100%; run code coverage as part of tests
+ * Add `npm run lint`; Run linter as part of tests
+ * Remove nodeType and setInterval checks in isPlainObject
+ * Updating `tape`, `jscs`, `covert`
+ * General style and README cleanup
+
+1.3.0 / 2014-06-20
+==================
+ * Add component.json for browser support (#18)
+ * Use SVG for badges in README (#16)
+ * Updating `tape`, `covert`
+ * Updating travis-ci to work with multiple node versions
+ * Fix `deep === false` bug (returning target as {}) (#14)
+ * Fixing constructor checks in isPlainObject
+ * Adding additional test coverage
+ * Adding `npm run coverage`
+ * Add LICENSE (#13)
+ * Adding a warning about `false`, per #11
+ * General style and whitespace cleanup
+
+1.2.1 / 2013-09-14
+==================
+ * Fixing hasOwnProperty bugs that would only have shown up in specific browsers. Fixes #8
+ * Updating `tape`
+
+1.2.0 / 2013-09-02
+==================
+ * Updating the README: add badges
+ * Adding a missing variable reference.
+ * Using `tape` instead of `buster` for tests; add more tests (#7)
+ * Adding node 0.10 to Travis CI (#6)
+ * Enabling "npm test" and cleaning up package.json (#5)
+ * Add Travis CI.
+
+1.1.3 / 2012-12-06
+==================
+ * Added unit tests.
+ * Ensure extend function is named. (Looks nicer in a stack trace.)
+ * README cleanup.
+
+1.1.1 / 2012-11-07
+==================
+ * README cleanup.
+ * Added installation instructions.
+ * Added a missing semicolon
+
+1.0.0 / 2012-04-08
+==================
+ * Initial commit
+
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/LICENSE b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/LICENSE
new file mode 100644
index 0000000..e16d6a5
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Stefan Thomas
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/README.md
new file mode 100644
index 0000000..632fb0f
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/README.md
@@ -0,0 +1,62 @@
+[![Build Status][travis-svg]][travis-url]
+[![dependency status][deps-svg]][deps-url]
+[![dev dependency status][dev-deps-svg]][dev-deps-url]
+
+# extend() for Node.js [![Version Badge][npm-version-png]][npm-url]
+
+`node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
+
+## Installation
+
+This package is available on [npm][npm-url] as: `extend`
+
+``` sh
+npm install extend
+```
+
+## Usage
+
+**Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
+
+*Extend one object with one or more others, returning the modified object.*
+
+Keep in mind that the target object will be modified, and will be returned from extend().
+
+If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
+Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
+Warning: passing `false` as the first argument is not supported.
+
+### Arguments
+
+* `deep` *Boolean* (optional)
+If set, the merge becomes recursive (i.e. deep copy).
+* `target` *Object*
+The object to extend.
+* `object1` *Object*
+The object that will be merged into the first.
+* `objectN` *Object* (Optional)
+More objects to merge into the first.
+
+## License
+
+`node-extend` is licensed under the [MIT License][mit-license-url].
+
+## Acknowledgements
+
+All credit to the jQuery authors for perfecting this amazing utility.
+
+Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
+
+[travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
+[travis-url]: https://travis-ci.org/justmoon/node-extend
+[npm-url]: https://npmjs.org/package/extend
+[mit-license-url]: http://opensource.org/licenses/MIT
+[github-justmoon]: https://github.com/justmoon
+[github-insin]: https://github.com/insin
+[github-ljharb]: https://github.com/ljharb
+[npm-version-png]: http://vb.teelaun.ch/justmoon/node-extend.svg
+[deps-svg]: https://david-dm.org/justmoon/node-extend.svg
+[deps-url]: https://david-dm.org/justmoon/node-extend
+[dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
+[dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies
+
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/component.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/component.json
new file mode 100644
index 0000000..1500a2f
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/component.json
@@ -0,0 +1,32 @@
+{
+ "name": "extend",
+ "author": "Stefan Thomas (http://www.justmoon.net)",
+ "version": "3.0.0",
+ "description": "Port of jQuery.extend for node.js and the browser.",
+ "scripts": [
+ "index.js"
+ ],
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "repository" : {
+ "type": "git",
+ "url": "https://github.com/justmoon/node-extend.git"
+ },
+ "dependencies": {
+ },
+ "devDependencies": {
+ "tape" : "~3.0.0",
+ "covert": "~0.4.0",
+ "jscs": "~1.6.2"
+ }
+}
+
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/index.js
new file mode 100644
index 0000000..f5ec75d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/index.js
@@ -0,0 +1,86 @@
+'use strict';
+
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+
+var isArray = function isArray(arr) {
+ if (typeof Array.isArray === 'function') {
+ return Array.isArray(arr);
+ }
+
+ return toStr.call(arr) === '[object Array]';
+};
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
+ }
+
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) {/**/}
+
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+module.exports = function extend() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0],
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if (typeof target === 'boolean') {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ } else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {
+ target = {};
+ }
+
+ for (; i < length; ++i) {
+ options = arguments[i];
+ // Only deal with non-null/undefined values
+ if (options != null) {
+ // Extend the base object
+ for (name in options) {
+ src = target[name];
+ copy = options[name];
+
+ // Prevent never-ending loop
+ if (target !== copy) {
+ // Recurse if we're merging plain objects or arrays
+ if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
+ if (copyIsArray) {
+ copyIsArray = false;
+ clone = src && isArray(src) ? src : [];
+ } else {
+ clone = src && isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[name] = extend(deep, clone, copy);
+
+ // Don't bring in undefined values
+ } else if (typeof copy !== 'undefined') {
+ target[name] = copy;
+ }
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/package.json
new file mode 100644
index 0000000..7b86254
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/extend/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "extend",
+ "author": {
+ "name": "Stefan Thomas",
+ "email": "justmoon@members.fsf.org",
+ "url": "http://www.justmoon.net"
+ },
+ "version": "3.0.0",
+ "description": "Port of jQuery.extend for node.js and the browser",
+ "main": "index",
+ "scripts": {
+ "test": "npm run lint && node test/index.js && npm run coverage-quiet",
+ "coverage": "covert test/index.js",
+ "coverage-quiet": "covert test/index.js --quiet",
+ "lint": "npm run jscs && npm run eslint",
+ "jscs": "jscs *.js */*.js",
+ "eslint": "eslint *.js */*.js"
+ },
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "keywords": [
+ "extend",
+ "clone",
+ "merge"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/justmoon/node-extend.git"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tape": "^4.0.0",
+ "covert": "^1.1.0",
+ "jscs": "^1.13.1",
+ "eslint": "^0.24.0"
+ },
+ "license": "MIT",
+ "gitHead": "148e7270cab2e9413af2cd0cab147070d755ed6d",
+ "bugs": {
+ "url": "https://github.com/justmoon/node-extend/issues"
+ },
+ "homepage": "https://github.com/justmoon/node-extend#readme",
+ "_id": "extend@3.0.0",
+ "_shasum": "5a474353b9f3353ddd8176dfd37b91c83a46f1d4",
+ "_from": "extend@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.11.3",
+ "_nodeVersion": "2.3.1",
+ "_npmUser": {
+ "name": "ljharb",
+ "email": "ljharb@gmail.com"
+ },
+ "dist": {
+ "shasum": "5a474353b9f3353ddd8176dfd37b91c83a46f1d4",
+ "tarball": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "justmoon",
+ "email": "justmoon@members.fsf.org"
+ },
+ {
+ "name": "ljharb",
+ "email": "ljharb@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/.npmignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/.npmignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/.travis.yml
new file mode 100644
index 0000000..85a5012
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
+ - npm install -g npm@latest
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/History.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/History.md
new file mode 100644
index 0000000..6765fce
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/History.md
@@ -0,0 +1,84 @@
+
+1.0.0 / 2015-07-10
+==================
+
+ * http-proxy-agent: use %o debug() formatter
+ * http-proxy-agent: remove `defaults` merging logic
+ * package: update "agent-base" to v2
+ * test: add an assert() call
+ * test: use ssl-cert-snakeoil self-signed SSL certs
+ * README: add note about node-https-proxy-agent
+
+0.2.7 / 2015-07-06
+==================
+
+ * travis: ensure latest npm before testing
+ * travis: test node v0.8, v0.10, and v0.12
+ * README: use SVG for Travis-CI badge
+ * package: update "extend" to v3
+ * package: update "mocha" to v2
+ * package: update "debug" to v2
+
+0.2.6 / 2014-06-11
+==================
+
+ * package: update "debug" to v1.0.0
+
+0.2.5 / 2014-04-09
+==================
+
+ * package: update outdated deps
+
+0.2.4 / 2014-01-12
+==================
+
+ * http-proxy-agent: fix using the agent after the first tick of creating the ClientRequest
+ * http-proxy-agent: use "debug" module
+ * History: fix whitespace
+
+0.2.3 / 2013-11-18
+==================
+
+ * https-proxy-agent: allow "https" without trailing colon
+
+0.2.2 / 2013-11-16
+==================
+
+ * http-proxy-agent: delete the `port` if it matches default port
+ * http-proxy-agent: don't mix in the `proxy` opts to the endpoint opts
+ * http-proxy-agent: delete `pathname` from the proxy opts as well
+
+0.2.1 / 2013-10-28
+==================
+
+ * http-proxy-agent: properly proxy the query-string on request URLs (GH-1)
+
+0.2.0 / 2013-09-16
+==================
+
+ * http-proxy-agent: update to `agent-base` v1.0.0 API
+ * http-proxy-agent: rename `secure` option to `secureProxy`
+ * http-proxy-agent: default the "port" to 80 if not set
+ * http-proxy-agent: use "extend" module
+ * test: refactor tests
+ * test: add 407 auth test
+ * test: add bad proxy info test
+ * test: add "secureProxy" option tests
+
+0.1.0 / 2013-09-03
+==================
+
+ * Add initial "Proxy-Authorization" Basic authentication support
+
+0.0.2 / 2013-07-11
+==================
+
+ * test: make tests pass, ensure valid IP addresses are returned
+ * test: add tests
+ * throw an Error when no proxy info is given
+ * add support for passing options to net/tls .connect()
+
+0.0.1 / 2013-07-09
+==================
+
+ * Initial release
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/README.md
new file mode 100644
index 0000000..4f1fc37
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/README.md
@@ -0,0 +1,74 @@
+http-proxy-agent
+================
+### An HTTP(s) proxy `http.Agent` implementation for HTTP
+[](https://travis-ci.org/TooTallNate/node-http-proxy-agent)
+
+This module provides an `http.Agent` implementation that connects to a specified
+HTTP or HTTPS proxy server, and can be used with the built-in `http` module.
+
+__Note:__ For HTTP proxy usage with the `https` module, check out
+[`node-https-proxy-agent`](https://github.com/TooTallNate/node-https-proxy-agent).
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install http-proxy-agent
+```
+
+
+Example
+-------
+
+``` js
+var url = require('url');
+var http = require('http');
+var HttpProxyAgent = require('http-proxy-agent');
+
+// HTTP/HTTPS proxy to connect to
+var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
+console.log('using proxy server %j', proxy);
+
+// HTTP endpoint for the proxy to connect to
+var endpoint = process.argv[2] || 'http://nodejs.org/api/';
+console.log('attempting to GET %j', endpoint);
+var opts = url.parse(endpoint);
+
+// create an instance of the `HttpProxyAgent` class with the proxy server information
+var agent = new HttpProxyAgent(proxy);
+opts.agent = agent;
+
+http.get(opts, function (res) {
+ console.log('"response" event!', res.headers);
+ res.pipe(process.stdout);
+});
+```
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/http-proxy-agent.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/http-proxy-agent.js
new file mode 100644
index 0000000..b70e875
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/http-proxy-agent.js
@@ -0,0 +1,110 @@
+
+/**
+ * Module dependencies.
+ */
+
+var net = require('net');
+var tls = require('tls');
+var url = require('url');
+var extend = require('extend');
+var Agent = require('agent-base');
+var inherits = require('util').inherits;
+var debug = require('debug')('http-proxy-agent');
+
+/**
+ * Module exports.
+ */
+
+module.exports = HttpProxyAgent;
+
+/**
+ * The `HttpProxyAgent` implements an HTTP Agent subclass that connects to the
+ * specified "HTTP proxy server" in order to proxy HTTP requests.
+ *
+ * @api public
+ */
+
+function HttpProxyAgent (opts) {
+ if (!(this instanceof HttpProxyAgent)) return new HttpProxyAgent(opts);
+ if ('string' == typeof opts) opts = url.parse(opts);
+ if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
+ debug('creating new HttpProxyAgent instance: %o', opts);
+ Agent.call(this, connect);
+
+ var proxy = extend({}, opts);
+
+ // if `true`, then connect to the proxy server over TLS. defaults to `false`.
+ this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false;
+
+ // prefer `hostname` over `host`, and set the `port` if needed
+ proxy.host = proxy.hostname || proxy.host;
+ proxy.port = +proxy.port || (this.secureProxy ? 443 : 80);
+
+ if (proxy.host && proxy.path) {
+ // if both a `host` and `path` are specified then it's most likely the
+ // result of a `url.parse()` call... we need to remove the `path` portion so
+ // that `net.connect()` doesn't attempt to open that as a unix socket file.
+ delete proxy.path;
+ delete proxy.pathname;
+ }
+
+ this.proxy = proxy;
+}
+inherits(HttpProxyAgent, Agent);
+
+/**
+ * Called when the node-core HTTP client library is creating a new HTTP request.
+ *
+ * @api public
+ */
+
+function connect (req, opts, fn) {
+ var proxy = this.proxy;
+
+ // change the `http.ClientRequest` instance's "path" field
+ // to the absolute path of the URL that will be requested
+ var parsed = url.parse(req.path);
+ if (null == parsed.protocol) parsed.protocol = 'http:';
+ if (null == parsed.hostname) parsed.hostname = opts.hostname || opts.host;
+ if (null == parsed.port) parsed.port = opts.port;
+ if (parsed.port == 80) {
+ // if port is 80, then we can remove the port so that the
+ // ":80" portion is not on the produced URL
+ delete parsed.port;
+ }
+ var absolute = url.format(parsed);
+ req.path = absolute;
+
+ // inject the `Proxy-Authorization` header if necessary
+ var auth = proxy.auth;
+ if (auth) {
+ req.setHeader('Proxy-Authorization', 'Basic ' + new Buffer(auth).toString('base64'));
+ }
+
+ // create a socket connection to the proxy server
+ var socket;
+ if (this.secureProxy) {
+ socket = tls.connect(proxy);
+ } else {
+ socket = net.connect(proxy);
+ }
+
+ // at this point, the http ClientRequest's internal `_header` field might have
+ // already been set. If this is the case then we'll need to re-generate the
+ // string since we just changed the `req.path`
+ if (req._header) {
+ debug('regenerating stored HTTP header string for request');
+ req._header = null;
+ req._implicitHeader();
+ if (req.output && req.output.length > 0) {
+ debug('patching connection write() output buffer with updated header');
+ // the _header has already been queued to be written to the socket
+ var first = req.output[0];
+ var endOfHeaders = first.indexOf('\r\n\r\n') + 4;
+ req.output[0] = req._header + first.substring(endOfHeaders);
+ debug('output buffer: %o', req.output);
+ }
+ }
+
+ fn(null, socket);
+};
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/package.json
new file mode 100644
index 0000000..ee12099
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/package.json
@@ -0,0 +1,61 @@
+{
+ "name": "http-proxy-agent",
+ "version": "1.0.0",
+ "description": "An HTTP(s) proxy `http.Agent` implementation for HTTP",
+ "main": "http-proxy-agent.js",
+ "scripts": {
+ "test": "mocha --reporter spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-http-proxy-agent.git"
+ },
+ "keywords": [
+ "http",
+ "proxy",
+ "endpoint",
+ "agent"
+ ],
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-http-proxy-agent/issues"
+ },
+ "dependencies": {
+ "agent-base": "2",
+ "extend": "3",
+ "debug": "2"
+ },
+ "devDependencies": {
+ "mocha": "2",
+ "proxy": "~0.2.3"
+ },
+ "gitHead": "c2a1e575ebf7226251b55194855e739ef319a1cb",
+ "homepage": "https://github.com/TooTallNate/node-http-proxy-agent#readme",
+ "_id": "http-proxy-agent@1.0.0",
+ "_shasum": "cc1ce38e453bf984a0f7702d2dd59c73d081284a",
+ "_from": "http-proxy-agent@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.11.2",
+ "_nodeVersion": "0.12.6",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "cc1ce38e453bf984a0f7702d2dd59c73d081284a",
+ "tarball": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key
new file mode 100644
index 0000000..fd12501
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr
+bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y
+b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB
+AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd
+Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x
+1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ
+5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW
+T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX
+uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N
+Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw
+h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J
+bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ
+ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem
new file mode 100644
index 0000000..b115a5e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem
@@ -0,0 +1,12 @@
+-----BEGIN CERTIFICATE-----
+MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3
+NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0
+NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3
+NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
+ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay
+OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn
+g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN
+AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4
+1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J
+QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI=
+-----END CERTIFICATE-----
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/test.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/test.js
new file mode 100644
index 0000000..cc320c7
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/http-proxy-agent/test/test.js
@@ -0,0 +1,303 @@
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs');
+var url = require('url');
+var http = require('http');
+var https = require('https');
+var assert = require('assert');
+var Proxy = require('proxy');
+var HttpProxyAgent = require('../');
+
+describe('HttpProxyAgent', function () {
+
+ var server;
+ var serverPort;
+
+ var proxy;
+ var proxyPort;
+
+ var sslProxy;
+ var sslProxyPort;
+
+ before(function (done) {
+ // setup HTTP proxy server
+ proxy = Proxy();
+ proxy.listen(function () {
+ proxyPort = proxy.address().port;
+ done();
+ });
+ });
+
+ before(function (done) {
+ // setup target HTTP server
+ server = http.createServer();
+ server.listen(function () {
+ serverPort = server.address().port;
+ done();
+ });
+ });
+
+ before(function (done) {
+ // setup SSL HTTP proxy server
+ var options = {
+ key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
+ cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
+ };
+ sslProxy = Proxy(https.createServer(options));
+ sslProxy.listen(function () {
+ sslProxyPort = sslProxy.address().port;
+ done();
+ });
+ });
+
+ // shut down test HTTP server
+ after(function (done) {
+ proxy.once('close', function () { done(); });
+ proxy.close();
+ });
+
+ after(function (done) {
+ server.once('close', function () { done(); });
+ server.close();
+ });
+
+ after(function (done) {
+ sslProxy.once('close', function () { done(); });
+ sslProxy.close();
+ });
+
+ describe('constructor', function () {
+ it('should throw an Error if no "proxy" argument is given', function () {
+ assert.throws(function () {
+ new HttpProxyAgent();
+ });
+ });
+ it('should accept a "string" proxy argument', function () {
+ var agent = new HttpProxyAgent('http://127.0.0.1:' + proxyPort);
+ assert.equal('127.0.0.1', agent.proxy.host);
+ assert.equal(proxyPort, agent.proxy.port);
+ });
+ it('should accept a `url.parse()` result object argument', function () {
+ var opts = url.parse('http://127.0.0.1:' + proxyPort);
+ var agent = new HttpProxyAgent(opts);
+ assert.equal('127.0.0.1', agent.proxy.host);
+ assert.equal(proxyPort, agent.proxy.port);
+ });
+ describe('secureProxy', function () {
+ it('should default to `false`', function () {
+ var agent = new HttpProxyAgent({ port: proxyPort });
+ assert.equal(false, agent.secureProxy);
+ });
+ it('should be `false` when "http:" protocol is used', function () {
+ var agent = new HttpProxyAgent({ port: proxyPort, protocol: 'http:' });
+ assert.equal(false, agent.secureProxy);
+ });
+ it('should be `true` when "https:" protocol is used', function () {
+ var agent = new HttpProxyAgent({ port: proxyPort, protocol: 'https:' });
+ assert.equal(true, agent.secureProxy);
+ });
+ it('should be `true` when "https" protocol is used', function () {
+ var agent = new HttpProxyAgent({ port: proxyPort, protocol: 'https' });
+ assert.equal(true, agent.secureProxy);
+ });
+ });
+ });
+
+ describe('"http" module', function () {
+ it('should work over an HTTP proxy', function (done) {
+ // set HTTP "request" event handler for this test
+ server.once('request', function (req, res) {
+ res.end(JSON.stringify(req.headers));
+ });
+
+ var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort;
+ var agent = new HttpProxyAgent(proxy);
+
+ var opts = url.parse('http://127.0.0.1:' + serverPort);
+ opts.agent = agent;
+
+ http.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('127.0.0.1:' + serverPort, data.host);
+ assert('via' in data);
+ done();
+ });
+ });
+ });
+ it('should work over an HTTPS proxy', function (done) {
+ // set HTTP "request" event handler for this test
+ server.once('request', function (req, res) {
+ res.end(JSON.stringify(req.headers));
+ });
+
+ var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort;
+ proxy = url.parse(proxy);
+ proxy.rejectUnauthorized = false;
+ var agent = new HttpProxyAgent(proxy);
+ assert.equal(true, agent.secureProxy);
+
+ var opts = url.parse('http://127.0.0.1:' + serverPort);
+ opts.agent = agent;
+
+ http.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('127.0.0.1:' + serverPort, data.host);
+ assert('via' in data);
+ done();
+ });
+ });
+ });
+ it('should proxy the query string of the request path', function (done) {
+ // set HTTP "request" event handler for this test
+ server.once('request', function (req, res) {
+ res.end(JSON.stringify({
+ url: req.url
+ }));
+ });
+
+ var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort;
+ var agent = new HttpProxyAgent(proxy);
+
+ var opts = url.parse('http://127.0.0.1:' + serverPort + '/test?foo=bar&1=2');
+ opts.agent = agent;
+
+ http.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('/test?foo=bar&1=2', data.url);
+ done();
+ });
+ });
+ });
+ it('should receive the 407 authorization code on the `http.ClientResponse`', function (done) {
+ // set a proxy authentication function for this test
+ proxy.authenticate = function (req, fn) {
+ // reject all requests
+ fn(null, false);
+ };
+
+ var proxyUri = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort;
+ var agent = new HttpProxyAgent(proxyUri);
+
+ var opts = {};
+ // `host` and `port` don't really matter since the proxy will reject anyways
+ opts.host = '127.0.0.1';
+ opts.port = 80;
+ opts.agent = agent;
+
+ http.get(opts, function (res) {
+ assert.equal(407, res.statusCode);
+ assert('proxy-authenticate' in res.headers);
+ delete proxy.authenticate;
+ done();
+ });
+ });
+ it('should send the "Proxy-Authorization" request header', function (done) {
+ // set a proxy authentication function for this test
+ proxy.authenticate = function (req, fn) {
+ // username:password is "foo:bar"
+ fn(null, req.headers['proxy-authorization'] == 'Basic Zm9vOmJhcg==');
+ };
+
+ // set HTTP "request" event handler for this test
+ server.once('request', function (req, res) {
+ res.end(JSON.stringify(req.headers));
+ });
+
+ var proxyUri = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort;
+ var proxyOpts = url.parse(proxyUri);
+ proxyOpts.auth = 'foo:bar';
+ var agent = new HttpProxyAgent(proxyOpts);
+
+ var opts = url.parse('http://127.0.0.1:' + serverPort);
+ opts.agent = agent;
+
+ http.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('127.0.0.1:' + serverPort, data.host);
+ assert('via' in data);
+ delete proxy.authenticate;
+ done();
+ });
+ });
+ });
+ it('should emit an "error" event on the `http.ClientRequest` if the proxy does not exist', function (done) {
+ // port 4 is a reserved, but "unassigned" port
+ var proxyUri = 'http://127.0.0.1:4';
+ var agent = new HttpProxyAgent(proxyUri);
+
+ var opts = url.parse('http://nodejs.org');
+ opts.agent = agent;
+
+ var req = http.get(opts);
+ req.once('error', function (err) {
+ assert.equal('ECONNREFUSED', err.code);
+ req.abort();
+ done();
+ });
+ });
+ it('should work after the first tick of the `http.ClientRequest` instance', function (done) {
+ // set HTTP "request" event handler for this test
+ server.once('request', function (req, res) {
+ res.end(JSON.stringify(req.url));
+ });
+
+ var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort;
+ var agent = new HttpProxyAgent(proxy);
+
+ var opts = url.parse('http://127.0.0.1:' + serverPort + '/test');
+ opts.agent = agent;
+
+ // defer the "connect()" function logic, since calling .end() before the
+ // "socket" event can cause weirdness since the HTTP header will have been
+ // cached and the HttpProxyAgent `req.path` patches won't be respected
+ var callback = agent.callback;
+ agent.callback = function (req, opts, fn) {
+ setTimeout(function () {
+ agent.callback = callback;
+ agent.callback(req, opts, fn);
+ }, 10);
+ };
+
+ http.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('/test', data);
+ done();
+ });
+ });
+ });
+ });
+
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/.npmignore
new file mode 100644
index 0000000..c12f3a8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/.npmignore
@@ -0,0 +1,2 @@
+/node_modules
+/?.js
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/.travis.yml
new file mode 100644
index 0000000..85a5012
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
+ - npm install -g npm@latest
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/History.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/History.md
new file mode 100644
index 0000000..0d882d4
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/History.md
@@ -0,0 +1,90 @@
+
+1.0.0 / 2015-07-10
+==================
+
+ * upgrade to "agent-base" v2 API
+ * test: test case is fixed
+ * use %o debug() formatter
+ * README: use SVG for Travis-CI badge
+
+0.3.6 / 2015-07-06
+==================
+
+ * package: update "extend" to v3
+ * package: update "mocha" to v2
+ * package: update "debug" to v2
+ * travis: test node v0.8, v0.10, and v0.12
+ * test: use ssl-cert-snakeoil self-signed SSL certs
+
+0.3.5 / 2014-06-11
+==================
+
+ * package: update "debug" to v1.0.0
+
+0.3.4 / 2014-04-09
+==================
+
+ * gitignore: ignore root level ?.js files
+ * package: update outdated dependencies
+
+0.3.3 / 2014-01-13
+==================
+
+ * https-proxy-agnet: use debug() instead of console.error()
+ * https-proxy-agent: fix debug() call
+ * History: fix whitespace
+
+0.3.2 / 2013-11-18
+==================
+
+ * https-proxy-agent: allow "https" without trailing colon
+ * README: fix typo
+
+0.3.1 / 2013-11-16
+==================
+
+ * test: enable the HTTPS over HTTPS test on node v0.11.8
+ * https-proxy-agent: create the proxy socket connection first
+ * https-proxy-agent: delete `pathname` from the proxy opts as well
+ * https-proxy-agent: remove dead "end"-emitting code
+
+0.3.0 / 2013-09-16
+==================
+
+ * https-proxy-agent: use "debug" module
+ * https-proxy-agent: update to the "agent-base" v1 API
+ * https-proxy-agent: default the "port" to 443 if not set
+ * https-proxy-agent: augment the `opts` object for the `tls.connect` function
+ * https-proxy-agent: use "extend" module
+ * https-proxy-agent: remove use of `this` as much as possible
+ * https-proxy-agent: listen for the "error" event of the socket
+ * test: refactor of tests to use "proxy" module
+ * test: add "error" event catching test
+ * test: add 407 proxy response test
+ * test: use "semver" module, disable the HTTPS over HTTPS test for node >= v0.11.3
+
+0.2.0 / 2013-09-03
+==================
+
+ * Add initial "Proxy-Authorization" Basic authentication support
+
+0.1.0 / 2013-07-21
+==================
+
+ * rename `secure` to `secureProxy`
+ * added `secureEndpoint` option
+ * various optimizations
+ * README improvements
+
+0.0.2 / 2013-07-11
+==================
+
+ * test: add mocha tests
+ * don't use `socket.ondata`, use the official API instead
+ * throw an Error when no proxy info is given
+ * add support for passing options to net/tls .connect()
+
+0.0.1 / 2013-07-09
+==================
+
+ * Initial release
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/README.md
new file mode 100644
index 0000000..b62d9c8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/README.md
@@ -0,0 +1,141 @@
+https-proxy-agent
+================
+### An HTTP(s) proxy `http.Agent` implementation for HTTPS
+[](https://travis-ci.org/TooTallNate/node-https-proxy-agent)
+
+This module provides an `http.Agent` implementation that connects to a specified
+HTTP or HTTPS proxy server, and can be used with the built-in `https` module.
+
+Specifically, this `Agent` implementation connects to an intermediary "proxy"
+server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to
+open a direct TCP connection to the destination server.
+
+Since this agent implements the CONNECT HTTP method, it also works with other
+protocols that use this method when connecting over proxies (i.e. WebSockets).
+See the "Examples" section below for more.
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install https-proxy-agent
+```
+
+
+Examples
+--------
+
+#### `https` module example
+
+``` js
+var url = require('url');
+var https = require('https');
+var HttpsProxyAgent = require('https-proxy-agent');
+
+// HTTP/HTTPS proxy to connect to
+var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
+console.log('using proxy server %j', proxy);
+
+// HTTPS endpoint for the proxy to connect to
+var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate';
+console.log('attempting to GET %j', endpoint);
+var opts = url.parse(endpoint);
+
+// create an instance of the `HttpsProxyAgent` class with the proxy server information
+var agent = new HttpsProxyAgent(proxy);
+opts.agent = agent;
+
+https.get(opts, function (res) {
+ console.log('"response" event!', res.headers);
+ res.pipe(process.stdout);
+});
+```
+
+#### `ws` WebSocket connection example
+
+``` js
+var url = require('url');
+var WebSocket = require('ws');
+var HttpsProxyAgent = require('https-proxy-agent');
+
+// HTTP/HTTPS proxy to connect to
+var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
+console.log('using proxy server %j', proxy);
+
+// WebSocket endpoint for the proxy to connect to
+var endpoint = process.argv[2] || 'ws://echo.websocket.org';
+var parsed = url.parse(endpoint);
+console.log('attempting to connect to WebSocket %j', endpoint);
+
+// create an instance of the `HttpsProxyAgent` class with the proxy server information
+var opts = url.parse(proxy);
+
+// IMPORTANT! Set the `secureEndpoint` option to `false` when connecting
+// over "ws://", but `true` when connecting over "wss://"
+opts.secureEndpoint = parsed.protocol ? parsed.protocol == 'wss:' : false;
+
+var agent = new HttpsProxyAgent(opts);
+
+// finally, initiate the WebSocket connection
+var socket = new WebSocket(endpoint, { agent: agent });
+
+socket.on('open', function () {
+ console.log('"open" event!');
+ socket.send('hello world');
+});
+
+socket.on('message', function (data, flags) {
+ console.log('"message" event! %j %j', data, flags);
+ socket.close();
+});
+```
+
+API
+---
+
+### new HttpsProxyAgent(opts)
+
+The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
+to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
+requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT].
+
+The `opts` argument may either be a string URI of the proxy server to use, or an
+"options" object with more specific properties:
+
+ * `host` - String - Proxy host to connect to (may use `hostname` as well). Required.
+ * `port` - Number - Proxy port to connect to. Required.
+ * `secureProxy` - Boolean - If `true`, then use TLS to connect to the proxy. Defaults to `false`.
+ * `secureEndpoint` - Boolean - If `true` then a TLS connection to the endpoint will be established on top of the proxy socket. Defaults to `true`.
+ * Any other options given are passed to the `net.connect()`/`tls.connect()` functions.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/https-proxy-agent.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/https-proxy-agent.js
new file mode 100644
index 0000000..6baaa9d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/https-proxy-agent.js
@@ -0,0 +1,202 @@
+
+/**
+ * Module dependencies.
+ */
+
+var net = require('net');
+var tls = require('tls');
+var url = require('url');
+var extend = require('extend');
+var Agent = require('agent-base');
+var inherits = require('util').inherits;
+var debug = require('debug')('https-proxy-agent');
+
+/**
+ * Module exports.
+ */
+
+module.exports = HttpsProxyAgent;
+
+/**
+ * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to the
+ * specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
+ *
+ * @api public
+ */
+
+function HttpsProxyAgent (opts) {
+ if (!(this instanceof HttpsProxyAgent)) return new HttpsProxyAgent(opts);
+ if ('string' == typeof opts) opts = url.parse(opts);
+ if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
+ debug('creating new HttpsProxyAgent instance: %o', opts);
+ Agent.call(this, connect);
+
+ var proxy = extend({}, opts);
+
+ // if `true`, then connect to the proxy server over TLS. defaults to `false`.
+ this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false;
+
+ // prefer `hostname` over `host`, and set the `port` if needed
+ proxy.host = proxy.hostname || proxy.host;
+ proxy.port = +proxy.port || (this.secureProxy ? 443 : 80);
+
+ if (proxy.host && proxy.path) {
+ // if both a `host` and `path` are specified then it's most likely the
+ // result of a `url.parse()` call... we need to remove the `path` portion so
+ // that `net.connect()` doesn't attempt to open that as a unix socket file.
+ delete proxy.path;
+ delete proxy.pathname;
+ }
+
+ this.proxy = proxy;
+}
+inherits(HttpsProxyAgent, Agent);
+
+/**
+ * Called when the node-core HTTP client library is creating a new HTTP request.
+ *
+ * @api public
+ */
+
+function connect (req, opts, fn) {
+
+ var proxy = this.proxy;
+
+ // create a socket connection to the proxy server
+ var socket;
+ if (this.secureProxy) {
+ socket = tls.connect(proxy);
+ } else {
+ socket = net.connect(proxy);
+ }
+
+ // we need to buffer any HTTP traffic that happens with the proxy before we get
+ // the CONNECT response, so that if the response is anything other than an "200"
+ // response code, then we can re-play the "data" events on the socket once the
+ // HTTP parser is hooked up...
+ var buffers = [];
+ var buffersLength = 0;
+
+ function read () {
+ var b = socket.read();
+ if (b) ondata(b);
+ else socket.once('readable', read);
+ }
+
+ function cleanup () {
+ socket.removeListener('data', ondata);
+ socket.removeListener('end', onend);
+ socket.removeListener('error', onerror);
+ socket.removeListener('close', onclose);
+ socket.removeListener('readable', read);
+ }
+
+ function onclose (err) {
+ debug('onclose had error %o', err);
+ }
+
+ function onend () {
+ debug('onend');
+ }
+
+ function onerror (err) {
+ cleanup();
+ fn(err);
+ }
+
+ function ondata (b) {
+ buffers.push(b);
+ buffersLength += b.length;
+ var buffered = Buffer.concat(buffers, buffersLength);
+ var str = buffered.toString('ascii');
+
+ if (!~str.indexOf('\r\n\r\n')) {
+ // keep buffering
+ debug('have not received end of HTTP headers yet...');
+ if (socket.read) {
+ read();
+ } else {
+ socket.once('data', ondata);
+ }
+ return;
+ }
+
+ var firstLine = str.substring(0, str.indexOf('\r\n'));
+ var statusCode = +firstLine.split(' ')[1];
+ debug('got proxy server response: %o', firstLine);
+
+ if (200 == statusCode) {
+ // 200 Connected status code!
+ var sock = socket;
+
+ // nullify the buffered data since we won't be needing it
+ buffers = buffered = null;
+
+ if (opts.secureEndpoint) {
+ // since the proxy is connecting to an SSL server, we have
+ // to upgrade this socket connection to an SSL connection
+ debug('upgrading proxy-connected socket to TLS connection: %o', opts.host);
+ opts.socket = socket;
+ opts.servername = opts.host;
+ opts.host = null;
+ opts.hostname = null;
+ opts.port = null;
+ sock = tls.connect(opts);
+ }
+
+ cleanup();
+ fn(null, sock);
+ } else {
+ // some other status code that's not 200... need to re-play the HTTP header
+ // "data" events onto the socket once the HTTP machinery is attached so that
+ // the user can parse and handle the error status code
+ cleanup();
+
+ // save a reference to the concat'd Buffer for the `onsocket` callback
+ buffers = buffered;
+
+ // need to wait for the "socket" event to re-play the "data" events
+ req.once('socket', onsocket);
+ fn(null, socket);
+ }
+ }
+
+ function onsocket (socket) {
+ // replay the "buffers" Buffer onto the `socket`, since at this point
+ // the HTTP module machinery has been hooked up for the user
+ if ('function' == typeof socket.ondata) {
+ // node <= v0.11.3, the `ondata` function is set on the socket
+ socket.ondata(buffers, 0, buffers.length);
+ } else if (socket.listeners('data').length > 0) {
+ // node > v0.11.3, the "data" event is listened for directly
+ socket.emit('data', buffers);
+ } else {
+ // never?
+ throw new Error('should not happen...');
+ }
+
+ // nullify the cached Buffer instance
+ buffers = null;
+ }
+
+ socket.on('error', onerror);
+ socket.on('close', onclose);
+ socket.on('end', onend);
+
+ if (socket.read) {
+ read();
+ } else {
+ socket.once('data', ondata);
+ }
+
+ var hostname = opts.host + ':' + opts.port;
+ var msg = 'CONNECT ' + hostname + ' HTTP/1.1\r\n';
+ var auth = proxy.auth;
+ if (auth) {
+ msg += 'Proxy-Authorization: Basic ' + new Buffer(auth).toString('base64') + '\r\n';
+ }
+ msg += 'Host: ' + hostname + '\r\n' +
+ 'Connection: close\r\n' +
+ '\r\n';
+ socket.write(msg);
+};
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/package.json
new file mode 100644
index 0000000..b4a4122
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "https-proxy-agent",
+ "version": "1.0.0",
+ "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
+ "main": "https-proxy-agent.js",
+ "scripts": {
+ "test": "mocha --reporter spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-https-proxy-agent.git"
+ },
+ "keywords": [
+ "https",
+ "proxy",
+ "endpoint",
+ "agent"
+ ],
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues"
+ },
+ "dependencies": {
+ "agent-base": "2",
+ "debug": "2",
+ "extend": "3"
+ },
+ "devDependencies": {
+ "mocha": "2",
+ "proxy": "~0.2.3",
+ "semver": "~2.2.1"
+ },
+ "gitHead": "cb7577b6aa9a2466ca7612b1ebd6fc281407187f",
+ "homepage": "https://github.com/TooTallNate/node-https-proxy-agent#readme",
+ "_id": "https-proxy-agent@1.0.0",
+ "_shasum": "35f7da6c48ce4ddbfa264891ac593ee5ff8671e6",
+ "_from": "https-proxy-agent@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.11.2",
+ "_nodeVersion": "0.12.6",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "35f7da6c48ce4ddbfa264891ac593ee5ff8671e6",
+ "tarball": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key
new file mode 100644
index 0000000..fd12501
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr
+bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y
+b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB
+AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd
+Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x
+1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ
+5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW
+T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX
+uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N
+Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw
+h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J
+bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ
+ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem
new file mode 100644
index 0000000..b115a5e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem
@@ -0,0 +1,12 @@
+-----BEGIN CERTIFICATE-----
+MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3
+NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0
+NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3
+NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
+ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay
+OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn
+g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN
+AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4
+1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J
+QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI=
+-----END CERTIFICATE-----
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/test.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/test.js
new file mode 100644
index 0000000..2ee6724
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/https-proxy-agent/test/test.js
@@ -0,0 +1,293 @@
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs');
+var url = require('url');
+var http = require('http');
+var https = require('https');
+var assert = require('assert');
+var Proxy = require('proxy');
+var Semver = require('semver');
+var version = new Semver(process.version);
+var HttpsProxyAgent = require('../');
+
+describe('HttpsProxyAgent', function () {
+
+ var server;
+ var serverPort;
+
+ var sslServer;
+ var sslServerPort;
+
+ var proxy;
+ var proxyPort;
+
+ var sslProxy;
+ var sslProxyPort;
+
+ before(function (done) {
+ // setup target HTTP server
+ server = http.createServer();
+ server.listen(function () {
+ serverPort = server.address().port;
+ done();
+ });
+ });
+
+ before(function (done) {
+ // setup HTTP proxy server
+ proxy = Proxy();
+ proxy.listen(function () {
+ proxyPort = proxy.address().port;
+ done();
+ });
+ });
+
+ before(function (done) {
+ // setup target HTTPS server
+ var options = {
+ key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
+ cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
+ };
+ sslServer = https.createServer(options);
+ sslServer.listen(function () {
+ sslServerPort = sslServer.address().port;
+ done();
+ });
+ });
+
+ before(function (done) {
+ // setup SSL HTTP proxy server
+ var options = {
+ key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'),
+ cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem')
+ };
+ sslProxy = Proxy(https.createServer(options));
+ sslProxy.listen(function () {
+ sslProxyPort = sslProxy.address().port;
+ done();
+ });
+ });
+
+ // shut down test HTTP server
+ after(function (done) {
+ server.once('close', function () { done(); });
+ server.close();
+ });
+
+ after(function (done) {
+ proxy.once('close', function () { done(); });
+ proxy.close();
+ });
+
+ after(function (done) {
+ sslServer.once('close', function () { done(); });
+ sslServer.close();
+ });
+
+ after(function (done) {
+ sslProxy.once('close', function () { done(); });
+ sslProxy.close();
+ });
+
+ describe('constructor', function () {
+ it('should throw an Error if no "proxy" argument is given', function () {
+ assert.throws(function () {
+ new HttpsProxyAgent();
+ });
+ });
+ it('should accept a "string" proxy argument', function () {
+ var agent = new HttpsProxyAgent('http://127.0.0.1:' + proxyPort);
+ assert.equal('127.0.0.1', agent.proxy.host);
+ assert.equal(proxyPort, agent.proxy.port);
+ });
+ it('should accept a `url.parse()` result object argument', function () {
+ var opts = url.parse('http://127.0.0.1:' + proxyPort);
+ var agent = new HttpsProxyAgent(opts);
+ assert.equal('127.0.0.1', agent.proxy.host);
+ assert.equal(proxyPort, agent.proxy.port);
+ });
+ describe('secureProxy', function () {
+ it('should default to `false`', function () {
+ var agent = new HttpsProxyAgent({ port: proxyPort });
+ assert.equal(false, agent.secureProxy);
+ });
+ it('should be `false` when "http:" protocol is used', function () {
+ var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'http:' });
+ assert.equal(false, agent.secureProxy);
+ });
+ it('should be `true` when "https:" protocol is used', function () {
+ var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'https:' });
+ assert.equal(true, agent.secureProxy);
+ });
+ it('should be `true` when "https" protocol is used', function () {
+ var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'https' });
+ assert.equal(true, agent.secureProxy);
+ });
+ });
+ });
+
+ describe('"http" module', function () {
+
+ beforeEach(function () {
+ delete proxy.authenticate;
+ });
+
+ it('should work over an HTTP proxy', function (done) {
+ server.once('request', function (req, res) {
+ res.end(JSON.stringify(req.headers));
+ });
+
+ var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort;
+ var agent = new HttpsProxyAgent(proxy);
+
+ var opts = url.parse('http://127.0.0.1:' + serverPort);
+ opts.agent = agent;
+
+ var req = http.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('127.0.0.1:' + serverPort, data.host);
+ done();
+ });
+ });
+ req.once('error', done);
+ });
+ it('should work over an HTTPS proxy', function (done) {
+ server.once('request', function (req, res) {
+ res.end(JSON.stringify(req.headers));
+ });
+
+ var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort;
+ proxy = url.parse(proxy);
+ proxy.rejectUnauthorized = false;
+ var agent = new HttpsProxyAgent(proxy);
+
+ var opts = url.parse('http://127.0.0.1:' + serverPort);
+ opts.agent = agent;
+
+ http.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ console.log(data);
+ assert.equal('127.0.0.1:' + serverPort, data.host);
+ done();
+ });
+ });
+ });
+ it('should receive the 407 authorization code on the `http.ClientResponse`', function (done) {
+ // set a proxy authentication function for this test
+ proxy.authenticate = function (req, fn) {
+ // reject all requests
+ fn(null, false);
+ };
+
+ var proxyUri = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort;
+ var agent = new HttpsProxyAgent(proxyUri);
+
+ var opts = {};
+ // `host` and `port` don't really matter since the proxy will reject anyways
+ opts.host = '127.0.0.1';
+ opts.port = 80;
+ opts.agent = agent;
+
+ var req = http.get(opts, function (res) {
+ assert.equal(407, res.statusCode);
+ assert('proxy-authenticate' in res.headers);
+ done();
+ });
+ });
+ it('should emit an "error" event on the `http.ClientRequest` if the proxy does not exist', function (done) {
+ // port 4 is a reserved, but "unassigned" port
+ var proxyUri = 'http://127.0.0.1:4';
+ var agent = new HttpsProxyAgent(proxyUri);
+
+ var opts = url.parse('http://nodejs.org');
+ opts.agent = agent;
+
+ var req = http.get(opts);
+ req.once('error', function (err) {
+ assert.equal('ECONNREFUSED', err.code);
+ req.abort();
+ done();
+ });
+ });
+ });
+
+ describe('"https" module', function () {
+ it('should work over an HTTP proxy', function (done) {
+ sslServer.once('request', function (req, res) {
+ res.end(JSON.stringify(req.headers));
+ });
+
+ var proxy = process.env.HTTP_PROXY || process.env.http_proxy || 'http://127.0.0.1:' + proxyPort;
+ var agent = new HttpsProxyAgent(proxy);
+
+ var opts = url.parse('https://127.0.0.1:' + sslServerPort);
+ opts.rejectUnauthorized = false;
+ opts.agent = agent;
+
+ https.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('127.0.0.1:' + sslServerPort, data.host);
+ done();
+ });
+ });
+ });
+
+ if (version.compare('0.11.3') < 0 || version.compare('0.11.8') >= 0) {
+ // This test is disabled on node >= 0.11.3 && < 0.11.8, since it segfaults :(
+ // See: https://github.com/joyent/node/issues/6204
+
+ it('should work over an HTTPS proxy', function (done) {
+ sslServer.once('request', function (req, res) {
+ res.end(JSON.stringify(req.headers));
+ });
+
+ var proxy = process.env.HTTPS_PROXY || process.env.https_proxy || 'https://127.0.0.1:' + sslProxyPort;
+ proxy = url.parse(proxy);
+ proxy.rejectUnauthorized = false;
+ var agent = new HttpsProxyAgent(proxy);
+
+ var opts = url.parse('https://127.0.0.1:' + sslServerPort);
+ opts.agent = agent;
+ opts.rejectUnauthorized = false;
+
+ https.get(opts, function (res) {
+ var data = '';
+ res.setEncoding('utf8');
+ res.on('data', function (b) {
+ data += b;
+ });
+ res.on('end', function () {
+ data = JSON.parse(data);
+ assert.equal('127.0.0.1:' + sslServerPort, data.host);
+ done();
+ });
+ });
+ });
+ } else {
+ it('should work over an HTTPS proxy');
+ }
+
+ });
+
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/.npmignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/.npmignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/.travis.yml
new file mode 100644
index 0000000..4af02b3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - '0.8'
+ - '0.10'
+ - '0.12'
+ - 'iojs'
+before_install:
+ - npm install -g npm@latest
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/CONTRIBUTORS b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/CONTRIBUTORS
new file mode 100644
index 0000000..4a0bc50
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/CONTRIBUTORS
@@ -0,0 +1,14 @@
+# Authors, sorted by whether or not they are me
+Isaac Z. Schlueter
+Brian Cottingham
+Carlos Brito Lage
+Jesse Dailey
+Kevin O'Hara
+Marco Rogers
+Mark Cavage
+Marko Mikulicic
+Nathan Rajlich
+Satheesh Natesan
+Trent Mick
+ashleybrener
+n4kz
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/LICENSE b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/README.md
new file mode 100644
index 0000000..a8bba68
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/README.md
@@ -0,0 +1,109 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n) { return n * 2 }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = LRU(options)
+ , otherCache = LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n){return n.length}`. The default is
+ `function(n){return 1}`, which is fine if you want to store `n`
+ like-sized things.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+
+## API
+
+* `set(key, value, maxAge)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think. `max` is optional and overrides the
+ cache `max` option if provided.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
+
+* `length()`
+
+ Return total length of objects in cache taking into account
+ `length` options function.
+
+* `itemCount()`
+
+ Return total quantity of objects currently in cache. Note, that
+ `stale` (see options) items are returned as part of this item
+ count.
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/lib/lru-cache.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/lib/lru-cache.js
new file mode 100644
index 0000000..d66e7a2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/lib/lru-cache.js
@@ -0,0 +1,274 @@
+;(function () { // closure for web browsers
+
+if (typeof module === 'object' && module.exports) {
+ module.exports = LRUCache
+} else {
+ // just set the global for non-node platforms.
+ this.LRUCache = LRUCache
+}
+
+function hOP (obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key)
+}
+
+function naiveLength () { return 1 }
+
+function LRUCache (options) {
+ if (!(this instanceof LRUCache))
+ return new LRUCache(options)
+
+ if (typeof options === 'number')
+ options = { max: options }
+
+ if (!options)
+ options = {}
+
+ this._max = options.max
+ // Kind of weird to have a default max of Infinity, but oh well.
+ if (!this._max || !(typeof this._max === "number") || this._max <= 0 )
+ this._max = Infinity
+
+ this._lengthCalculator = options.length || naiveLength
+ if (typeof this._lengthCalculator !== "function")
+ this._lengthCalculator = naiveLength
+
+ this._allowStale = options.stale || false
+ this._maxAge = options.maxAge || null
+ this._dispose = options.dispose
+ this.reset()
+}
+
+// resize the cache when the max changes.
+Object.defineProperty(LRUCache.prototype, "max",
+ { set : function (mL) {
+ if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
+ this._max = mL
+ if (this._length > this._max) trim(this)
+ }
+ , get : function () { return this._max }
+ , enumerable : true
+ })
+
+// resize the cache when the lengthCalculator changes.
+Object.defineProperty(LRUCache.prototype, "lengthCalculator",
+ { set : function (lC) {
+ if (typeof lC !== "function") {
+ this._lengthCalculator = naiveLength
+ this._length = this._itemCount
+ for (var key in this._cache) {
+ this._cache[key].length = 1
+ }
+ } else {
+ this._lengthCalculator = lC
+ this._length = 0
+ for (var key in this._cache) {
+ this._cache[key].length = this._lengthCalculator(this._cache[key].value)
+ this._length += this._cache[key].length
+ }
+ }
+
+ if (this._length > this._max) trim(this)
+ }
+ , get : function () { return this._lengthCalculator }
+ , enumerable : true
+ })
+
+Object.defineProperty(LRUCache.prototype, "length",
+ { get : function () { return this._length }
+ , enumerable : true
+ })
+
+
+Object.defineProperty(LRUCache.prototype, "itemCount",
+ { get : function () { return this._itemCount }
+ , enumerable : true
+ })
+
+LRUCache.prototype.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ var i = 0
+ var itemCount = this._itemCount
+
+ for (var k = this._mru - 1; k >= 0 && i < itemCount; k--) if (this._lruList[k]) {
+ i++
+ var hit = this._lruList[k]
+ if (isStale(this, hit)) {
+ del(this, hit)
+ if (!this._allowStale) hit = undefined
+ }
+ if (hit) {
+ fn.call(thisp, hit.value, hit.key, this)
+ }
+ }
+}
+
+LRUCache.prototype.keys = function () {
+ var keys = new Array(this._itemCount)
+ var i = 0
+ for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) {
+ var hit = this._lruList[k]
+ keys[i++] = hit.key
+ }
+ return keys
+}
+
+LRUCache.prototype.values = function () {
+ var values = new Array(this._itemCount)
+ var i = 0
+ for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) {
+ var hit = this._lruList[k]
+ values[i++] = hit.value
+ }
+ return values
+}
+
+LRUCache.prototype.reset = function () {
+ if (this._dispose && this._cache) {
+ for (var k in this._cache) {
+ this._dispose(k, this._cache[k].value)
+ }
+ }
+
+ this._cache = Object.create(null) // hash of items by key
+ this._lruList = Object.create(null) // list of items in order of use recency
+ this._mru = 0 // most recently used
+ this._lru = 0 // least recently used
+ this._length = 0 // number of items in the list
+ this._itemCount = 0
+}
+
+// Provided for debugging/dev purposes only. No promises whatsoever that
+// this API stays stable.
+LRUCache.prototype.dump = function () {
+ return this._cache
+}
+
+LRUCache.prototype.dumpLru = function () {
+ return this._lruList
+}
+
+LRUCache.prototype.set = function (key, value, maxAge) {
+ maxAge = maxAge || this._maxAge
+ var now = maxAge ? Date.now() : 0
+
+ if (hOP(this._cache, key)) {
+ // dispose of the old one before overwriting
+ if (this._dispose)
+ this._dispose(key, this._cache[key].value)
+
+ this._cache[key].now = now
+ this._cache[key].maxAge = maxAge
+ this._cache[key].value = value
+ this.get(key)
+ return true
+ }
+
+ var len = this._lengthCalculator(value)
+ var hit = new Entry(key, value, this._mru++, len, now, maxAge)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > this._max) {
+ if (this._dispose) this._dispose(key, value)
+ return false
+ }
+
+ this._length += hit.length
+ this._lruList[hit.lu] = this._cache[key] = hit
+ this._itemCount ++
+
+ if (this._length > this._max)
+ trim(this)
+
+ return true
+}
+
+LRUCache.prototype.has = function (key) {
+ if (!hOP(this._cache, key)) return false
+ var hit = this._cache[key]
+ if (isStale(this, hit)) {
+ return false
+ }
+ return true
+}
+
+LRUCache.prototype.get = function (key) {
+ return get(this, key, true)
+}
+
+LRUCache.prototype.peek = function (key) {
+ return get(this, key, false)
+}
+
+LRUCache.prototype.pop = function () {
+ var hit = this._lruList[this._lru]
+ del(this, hit)
+ return hit || null
+}
+
+LRUCache.prototype.del = function (key) {
+ del(this, this._cache[key])
+}
+
+function get (self, key, doUse) {
+ var hit = self._cache[key]
+ if (hit) {
+ if (isStale(self, hit)) {
+ del(self, hit)
+ if (!self._allowStale) hit = undefined
+ } else {
+ if (doUse) use(self, hit)
+ }
+ if (hit) hit = hit.value
+ }
+ return hit
+}
+
+function isStale(self, hit) {
+ if (!hit || (!hit.maxAge && !self._maxAge)) return false
+ var stale = false;
+ var diff = Date.now() - hit.now
+ if (hit.maxAge) {
+ stale = diff > hit.maxAge
+ } else {
+ stale = self._maxAge && (diff > self._maxAge)
+ }
+ return stale;
+}
+
+function use (self, hit) {
+ shiftLU(self, hit)
+ hit.lu = self._mru ++
+ self._lruList[hit.lu] = hit
+}
+
+function trim (self) {
+ while (self._lru < self._mru && self._length > self._max)
+ del(self, self._lruList[self._lru])
+}
+
+function shiftLU (self, hit) {
+ delete self._lruList[ hit.lu ]
+ while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++
+}
+
+function del (self, hit) {
+ if (hit) {
+ if (self._dispose) self._dispose(hit.key, hit.value)
+ self._length -= hit.length
+ self._itemCount --
+ delete self._cache[ hit.key ]
+ shiftLU(self, hit)
+ }
+}
+
+// classy, since V8 prefers predictable objects.
+function Entry (key, value, lu, length, now, maxAge) {
+ this.key = key
+ this.value = value
+ this.lu = lu
+ this.length = length
+ this.now = now
+ if (maxAge) this.maxAge = maxAge
+}
+
+})()
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/package.json
new file mode 100644
index 0000000..d649018
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "lru-cache",
+ "description": "A cache object that deletes the least-recently-used items.",
+ "version": "2.6.5",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "keywords": [
+ "mru",
+ "lru",
+ "cache"
+ ],
+ "scripts": {
+ "test": "tap test --gc"
+ },
+ "main": "lib/lru-cache.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-lru-cache.git"
+ },
+ "devDependencies": {
+ "tap": "^1.2.0",
+ "weak": ""
+ },
+ "license": "ISC",
+ "gitHead": "7062a0c891bfb80a294be9217e4de0f882e75776",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "homepage": "https://github.com/isaacs/node-lru-cache#readme",
+ "_id": "lru-cache@2.6.5",
+ "_shasum": "e56d6354148ede8d7707b58d143220fd08df0fd5",
+ "_from": "lru-cache@>=2.6.5 <2.7.0",
+ "_npmVersion": "3.0.0",
+ "_nodeVersion": "2.2.1",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ "dist": {
+ "shasum": "e56d6354148ede8d7707b58d143220fd08df0fd5",
+ "tarball": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/basic.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/basic.js
new file mode 100644
index 0000000..949113e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/basic.js
@@ -0,0 +1,395 @@
+var test = require("tap").test
+ , LRU = require("../")
+
+test("basic", function (t) {
+ var cache = new LRU({max: 10})
+ cache.set("key", "value")
+ t.equal(cache.get("key"), "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.length, 1)
+ t.equal(cache.max, 10)
+ t.end()
+})
+
+test("least recently set", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.get("a")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("del", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.del("a")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("max", function (t) {
+ var cache = new LRU(3)
+
+ // test changing the max, verify that the LRU items get dropped.
+ cache.max = 100
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+
+ // now remove the max restriction, and try again.
+ cache.max = "hello"
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ // should trigger an immediate resize
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ t.end()
+})
+
+test("reset", function (t) {
+ var cache = new LRU(10)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.reset()
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 10)
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), undefined)
+ t.end()
+})
+
+
+// Note: `.dump()` is a debugging tool only. No guarantees are made
+// about the format/layout of the response.
+test("dump", function (t) {
+ var cache = new LRU(10)
+ var d = cache.dump();
+ t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache")
+ cache.set("a", "A")
+ var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } }
+ t.ok(d.a)
+ t.equal(d.a.key, "a")
+ t.equal(d.a.value, "A")
+ t.equal(d.a.lu, 0)
+
+ cache.set("b", "B")
+ cache.get("b")
+ d = cache.dump()
+ t.ok(d.b)
+ t.equal(d.b.key, "b")
+ t.equal(d.b.value, "B")
+ t.equal(d.b.lu, 2)
+
+ t.end()
+})
+
+
+test("basic with weighed length", function (t) {
+ var cache = new LRU({
+ max: 100,
+ length: function (item) { return item.size }
+ })
+ cache.set("key", {val: "value", size: 50})
+ t.equal(cache.get("key").val, "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.lengthCalculator(cache.get("key")), 50)
+ t.equal(cache.length, 50)
+ t.equal(cache.max, 100)
+ t.end()
+})
+
+
+test("weighed length item too large", function (t) {
+ var cache = new LRU({
+ max: 10,
+ length: function (item) { return item.size }
+ })
+ t.equal(cache.max, 10)
+
+ // should fall out immediately
+ cache.set("key", {val: "value", size: 50})
+
+ t.equal(cache.length, 0)
+ t.equal(cache.get("key"), undefined)
+ t.end()
+})
+
+test("least recently set with weighed length", function (t) {
+ var cache = new LRU({
+ max:8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("c"), "CCC")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten with weighed length", function (t) {
+ var cache = new LRU({
+ max: 8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.get("a")
+ cache.get("b")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("c"), undefined)
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("b"), "BB")
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("set returns proper booleans", function(t) {
+ var cache = new LRU({
+ max: 5,
+ length: function (item) { return item.length }
+ })
+
+ t.equal(cache.set("a", "A"), true)
+
+ // should return false for max exceeded
+ t.equal(cache.set("b", "donuts"), false)
+
+ t.equal(cache.set("b", "B"), true)
+ t.equal(cache.set("c", "CCCC"), true)
+ t.end()
+})
+
+test("drop the old items", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ cache.set("a", "A")
+
+ setTimeout(function () {
+ cache.set("b", "b")
+ t.equal(cache.get("a"), "A")
+ }, 25)
+
+ setTimeout(function () {
+ cache.set("c", "C")
+ // timed out
+ t.notOk(cache.get("a"))
+ }, 60 + 25)
+
+ setTimeout(function () {
+ t.notOk(cache.get("b"))
+ t.equal(cache.get("c"), "C")
+ }, 90)
+
+ setTimeout(function () {
+ t.notOk(cache.get("c"))
+ t.end()
+ }, 155)
+})
+
+test("individual item can have it's own maxAge", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ cache.set("a", "A", 20)
+ setTimeout(function () {
+ t.notOk(cache.get("a"))
+ t.end()
+ }, 25)
+})
+
+test("individual item can have it's own maxAge > cache's", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 20
+ })
+
+ cache.set("a", "A", 50)
+ setTimeout(function () {
+ t.equal(cache.get("a"), "A")
+ t.end()
+ }, 25)
+})
+
+test("disposal function", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+
+ cache.set(1, 1)
+ cache.set(2, 2)
+ t.equal(disposed, 1)
+ cache.set(3, 3)
+ t.equal(disposed, 2)
+ cache.reset()
+ t.equal(disposed, 3)
+ t.end()
+})
+
+test("disposal function on too big of item", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ length: function (k) {
+ return k.length
+ },
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+ var obj = [ 1, 2 ]
+
+ t.equal(disposed, false)
+ cache.set("obj", obj)
+ t.equal(disposed, obj)
+ t.end()
+})
+
+test("has()", function(t) {
+ var cache = new LRU({
+ max: 1,
+ maxAge: 10
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.has('foo'), true)
+ cache.set('blu', 'baz')
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.has('blu'), true)
+ setTimeout(function() {
+ t.equal(cache.has('blu'), false)
+ t.end()
+ }, 15)
+})
+
+test("stale", function(t) {
+ var cache = new LRU({
+ maxAge: 10,
+ stale: true
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.has('foo'), true)
+ setTimeout(function() {
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.get('foo'), undefined)
+ t.end()
+ }, 15)
+})
+
+test("lru update via set", function(t) {
+ var cache = LRU({ max: 2 });
+
+ cache.set('foo', 1);
+ cache.set('bar', 2);
+ cache.del('bar');
+ cache.set('baz', 3);
+ cache.set('qux', 4);
+
+ t.equal(cache.get('foo'), undefined)
+ t.equal(cache.get('bar'), undefined)
+ t.equal(cache.get('baz'), 3)
+ t.equal(cache.get('qux'), 4)
+ t.end()
+})
+
+test("least recently set w/ peek", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ t.equal(cache.peek("a"), "A")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("pop the least used item", function (t) {
+ var cache = new LRU(3)
+ , last
+
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.set("c", "C")
+
+ t.equal(cache.length, 3)
+ t.equal(cache.max, 3)
+
+ // Ensure we pop a, c, b
+ cache.get("b", "B")
+
+ last = cache.pop()
+ t.equal(last.key, "a")
+ t.equal(last.value, "A")
+ t.equal(cache.length, 2)
+ t.equal(cache.max, 3)
+
+ last = cache.pop()
+ t.equal(last.key, "c")
+ t.equal(last.value, "C")
+ t.equal(cache.length, 1)
+ t.equal(cache.max, 3)
+
+ last = cache.pop()
+ t.equal(last.key, "b")
+ t.equal(last.value, "B")
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 3)
+
+ last = cache.pop()
+ t.equal(last, null)
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 3)
+
+ t.end()
+})
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/foreach.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/foreach.js
new file mode 100644
index 0000000..4190417
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/foreach.js
@@ -0,0 +1,120 @@
+var test = require('tap').test
+var LRU = require('../')
+
+test('forEach', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 9
+ l.forEach(function (val, key, cache) {
+ t.equal(cache, l)
+ t.equal(key, i.toString())
+ t.equal(val, i.toString(2))
+ i -= 1
+ })
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ var order = [ 8, 6, 9, 7, 5 ]
+ var i = 0
+
+ l.forEach(function (val, key, cache) {
+ var j = order[i ++]
+ t.equal(cache, l)
+ t.equal(key, j.toString())
+ t.equal(val, j.toString(2))
+ })
+ t.equal(i, order.length);
+
+ t.end()
+})
+
+test('keys() and values()', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ t.similar(l.keys(), ['9', '8', '7', '6', '5'])
+ t.similar(l.values(), ['1001', '1000', '111', '110', '101'])
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ t.similar(l.keys(), ['8', '6', '9', '7', '5'])
+ t.similar(l.values(), ['1000', '110', '1001', '111', '101'])
+
+ t.end()
+})
+
+test('all entries are iterated over', function(t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 0
+ l.forEach(function (val, key, cache) {
+ if (i > 0) {
+ cache.del(key)
+ }
+ i += 1
+ })
+
+ t.equal(i, 5)
+ t.equal(l.keys().length, 1)
+
+ t.end()
+})
+
+test('all stale entries are removed', function(t) {
+ var l = new LRU({ max: 5, maxAge: -5, stale: true })
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 0
+ l.forEach(function () {
+ i += 1
+ })
+
+ t.equal(i, 5)
+ t.equal(l.keys().length, 0)
+
+ t.end()
+})
+
+test('expires', function (t) {
+ var l = new LRU({
+ max: 10,
+ maxAge: 50
+ })
+ for (var i = 0; i < 10; i++) {
+ l.set(i.toString(), i.toString(2), ((i % 2) ? 25 : undefined))
+ }
+
+ var i = 0
+ var order = [ 8, 6, 4, 2, 0 ]
+ setTimeout(function () {
+ l.forEach(function (val, key, cache) {
+ var j = order[i++]
+ t.equal(cache, l)
+ t.equal(key, j.toString())
+ t.equal(val, j.toString(2))
+ })
+ t.equal(i, order.length);
+
+ setTimeout(function () {
+ var count = 0;
+ l.forEach(function (val, key, cache) { count++; })
+ t.equal(0, count);
+ t.end()
+ }, 25)
+
+ }, 26)
+})
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/memory-leak.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/memory-leak.js
new file mode 100644
index 0000000..b5912f6
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/lru-cache/test/memory-leak.js
@@ -0,0 +1,51 @@
+#!/usr/bin/env node --expose_gc
+
+
+var weak = require('weak');
+var test = require('tap').test
+var LRU = require('../')
+var l = new LRU({ max: 10 })
+var refs = 0
+function X() {
+ refs ++
+ weak(this, deref)
+}
+
+function deref() {
+ refs --
+}
+
+test('no leaks', function (t) {
+ // fill up the cache
+ for (var i = 0; i < 100; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var start = process.memoryUsage()
+
+ // capture the memory
+ var startRefs = refs
+
+ // do it again, but more
+ for (var i = 0; i < 10000; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var end = process.memoryUsage()
+ t.equal(refs, startRefs, 'no leaky refs')
+
+ console.error('start: %j\n' +
+ 'end: %j', start, end);
+ t.pass();
+ t.end();
+})
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/.npmignore
new file mode 100644
index 0000000..a51a2e7
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/.npmignore
@@ -0,0 +1,4 @@
+/node_modules
+
+/?.js
+/*.pac
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/.travis.yml
new file mode 100644
index 0000000..85a5012
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
+ - npm install -g npm@latest
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/History.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/History.md
new file mode 100644
index 0000000..088b04b
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/History.md
@@ -0,0 +1,61 @@
+
+1.0.0 / 2015-07-10
+==================
+
+ * package: update "extend" to v3
+ * refactor to use proxy agent classes directly
+ * upgrade to `agent-base` v2 API
+ * use "stream-to-buffer"
+ * use %o formatter for debug() calls
+ * package: update "get-uri" to v1
+ * package: update "mocha" to v2
+ * travis: test node v0.8, v0.10, and v0.12
+ * test: add initial test cases
+ * test: add basic "https" module tests
+ * README: use SVG for Travis-CI badge
+
+0.2.0 / 2014-11-10
+==================
+
+ * index: add reference link for Chrome's "HTTPS" support
+ * index: throw an error for unknown proxy types (#2, @michaelansel)
+ * index: support HTTPS proxies (#2, @michaelansel)
+ * package: allow any "debug" v2
+
+0.1.2 / 2014-04-04
+==================
+
+ * package: update outdated dependencies
+
+0.1.1 / 2014-02-03
+==================
+
+ * index: move the exports before the `require()` calls
+ * index: minor code cleanup
+ * index: better proxy string splitting logic
+
+0.1.0 / 2014-01-25
+==================
+
+ * index: calculate an SHA1 hash of the JS code
+ * index: pass the `sandbox` option in to PacResolver
+ * index: remove final remnants of the `code` property
+ * index: set the `filename` option when creating the resolver function
+ * package: update to "pac-resolver" v1.1.0
+
+0.0.2 / 2014-01-25
+==================
+
+ * package: be lax on the `proxy-agent` version
+ * index: remove incomplete support for the `code` property
+
+0.0.1 / 2014-01-12
+==================
+
+ * gitignore: ignore development test files
+ * index: set `port` to null when it is the protocol default port (80 / 443)
+ * index: better support for passing in an "options object"
+ * index: add more debug() calls, store the `cache` reference
+ * index: use `proxy-agent` for "PROXY" and "SOCKS"
+ * add README.md file
+ * initial code
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/README.md
new file mode 100644
index 0000000..2bf6665
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/README.md
@@ -0,0 +1,78 @@
+pac-proxy-agent
+===============
+### A [PAC file][pac-wikipedia] proxy `http.Agent` implementation for HTTP and HTTPS
+[](https://travis-ci.org/TooTallNate/node-pac-proxy-agent)
+
+This module provides an `http.Agent` implementation that retreives the specified
+[PAC proxy file][pac-wikipedia] and uses it to resolve which HTTP, HTTPS, or
+SOCKS proxy, or if a direct connection should be used to connect to the
+HTTP endpoint.
+
+It is designed to be be used with the built-in `http` and `https` modules.
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install pac-proxy-agent
+```
+
+
+Example
+-------
+
+``` js
+var url = require('url');
+var http = require('http');
+var PacProxyAgent = require('pac-proxy-agent');
+
+// URI to a PAC proxy file to use (the "pac+" prefix is stripped)
+var proxy = 'pac+https://cloudup.com/ceGH2yZ0Bjp+';
+console.log('using PAC proxy proxy file at %j', proxy);
+
+// HTTP endpoint for the proxy to connect to
+var endpoint = 'http://nodejs.org/api/';
+console.log('attempting to GET %j', endpoint);
+var opts = url.parse(endpoint);
+
+// create an instance of the `PacProxyAgent` class with the PAC file location
+var agent = new PacProxyAgent(proxy);
+opts.agent = agent;
+
+http.get(opts, function (res) {
+ console.log('"response" event!', res.headers);
+ res.pipe(process.stdout);
+});
+```
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+[pac-wikipedia]: http://wikipedia.org/wiki/Proxy_auto-config
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/index.js
new file mode 100644
index 0000000..1eb62fe
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/index.js
@@ -0,0 +1,264 @@
+
+/**
+ * Module exports.
+ */
+
+module.exports = exports = PacProxyAgent;
+
+/**
+ * Supported "protocols". Delegates out to the `get-uri` module.
+ */
+
+var getUri = require('get-uri');
+Object.defineProperty(exports, 'protocols', {
+ enumerable: true,
+ configurable: true,
+ get: function () { return Object.keys(getUri.protocols); }
+});
+
+/**
+ * Module dependencies.
+ */
+
+var net = require('net');
+var tls = require('tls');
+var crypto = require('crypto');
+var parse = require('url').parse;
+var format = require('url').format;
+var extend = require('extend');
+var Agent = require('agent-base');
+var HttpProxyAgent = require('http-proxy-agent');
+var HttpsProxyAgent = require('https-proxy-agent');
+var SocksProxyAgent = require('socks-proxy-agent');
+var PacResolver = require('pac-resolver');
+var toBuffer = require('stream-to-buffer');
+var inherits = require('util').inherits;
+var debug = require('debug')('pac-proxy-agent');
+
+/**
+ * The `PacProxyAgent` class.
+ *
+ * A few different "protocol" modes are supported (supported protocols are
+ * backed by the `get-uri` module):
+ *
+ * - "pac+data", "data" - refers to an embedded "data:" URI
+ * - "pac+file", "file" - refers to a local file
+ * - "pac+ftp", "ftp" - refers to a file located on an FTP server
+ * - "pac+http", "http" - refers to an HTTP endpoint
+ * - "pac+https", "https" - refers to an HTTPS endpoint
+ *
+ * @api public
+ */
+
+function PacProxyAgent (uri, opts) {
+ if (!(this instanceof PacProxyAgent)) return new PacProxyAgent(uri, opts);
+
+ // was an options object passed in first?
+ if ('object' === typeof uri) {
+ opts = uri;
+
+ // result of a url.parse() call?
+ if (opts.href) {
+ if (opts.path && !opts.pathname) {
+ opts.pathname = opts.path;
+ }
+ opts.slashes = true;
+ uri = format(opts);
+ } else {
+ uri = opts.uri;
+ }
+ }
+ if (!opts) opts = {};
+
+ if (!uri) throw new Error('a PAC file URI must be specified!');
+ debug('creating PacProxyAgent with URI %o and options %o', uri, opts);
+
+ Agent.call(this, connect);
+
+ // strip the "pac+" prefix
+ this.uri = uri.replace(/^pac\+/i, '');
+
+ this.sandbox = opts.sandox;
+
+ this.proxy = opts;
+
+ this.cache = this._resolver = null;
+}
+inherits(PacProxyAgent, Agent);
+
+/**
+ * Loads the PAC proxy file from the source if necessary, and returns
+ * a generated `FindProxyForURL()` resolver function to use.
+ *
+ * @param {Function} fn callback function
+ * @api private
+ */
+
+PacProxyAgent.prototype.loadResolver = function (fn) {
+ var self = this;
+
+ // kick things off by attempting to (re)load the contents of the PAC file URI
+ this.loadPacFile(onpacfile);
+
+ // loadPacFile() callback function
+ function onpacfile (err, code) {
+ if (err) {
+ if ('ENOTMODIFIED' == err.code) {
+ debug('got ENOTMODIFIED response, reusing previous proxy resolver');
+ fn(null, self._resolver);
+ } else {
+ fn(err);
+ }
+ return;
+ }
+
+ // create a sha1 hash of the JS code
+ var hash = crypto.createHash('sha1').update(code).digest('hex');
+
+ if (self._resolver && self._resolver.hash == hash) {
+ debug('same sha1 hash for code - contents have not changed, reusing previous proxy resolver');
+ fn(null, self._resolver);
+ return;
+ }
+
+ // cache the resolver
+ debug('creating new proxy resolver instance');
+ self._resolver = new PacResolver(code, {
+ filename: self.uri,
+ sandbox: self.sandbox
+ });
+
+ // store that sha1 hash on the resolver instance
+ // for future comparison purposes
+ self._resolver.hash = hash;
+
+ fn(null, self._resolver);
+ }
+};
+
+/**
+ * Loads the contents of the PAC proxy file.
+ *
+ * @param {Function} fn callback function
+ * @api private
+ */
+
+PacProxyAgent.prototype.loadPacFile = function (fn) {
+ debug('loading PAC file: %o', this.uri);
+ var self = this;
+
+ // delegate out to the `get-uri` module
+ var opts = {};
+ if (this.cache) {
+ opts.cache = this.cache;
+ }
+ getUri(this.uri, opts, onstream);
+
+ function onstream (err, rs) {
+ if (err) return fn(err);
+ debug('got stream.Readable instance for URI');
+ self.cache = rs;
+ toBuffer(rs, onbuffer);
+ }
+
+ function onbuffer (err, buf) {
+ if (err) return fn(err);
+ debug('read %o byte PAC file from URI', buf.length);
+ fn(null, buf.toString('utf8'));
+ }
+};
+
+/**
+ * Called when the node-core HTTP client library is creating a new HTTP request.
+ *
+ * @api public
+ */
+
+function connect (req, opts, fn) {
+ var url;
+ var host;
+ var self = this;
+ var secure = Boolean(opts.secureEndpoint);
+
+ // first we need get a generated FindProxyForURL() function,
+ // either cached or retreived from the source
+ this.loadResolver(onresolver);
+
+ // `loadResolver()` callback function
+ function onresolver (err, FindProxyForURL) {
+ if (err) return fn(err);
+
+ // calculate the `url` parameter
+ var defaultPort = secure ? 443 : 80;
+ var path = req.path;
+ var firstQuestion = path.indexOf('?');
+ var search;
+ if (-1 != firstQuestion) {
+ search = path.substring(firstQuestion);
+ path = path.substring(0, firstQuestion);
+ }
+ url = format(extend({}, opts, {
+ protocol: secure ? 'https:' : 'http:',
+ pathname: path,
+ search: search,
+
+ // need to use `hostname` instead of `host` otherwise `port` is ignored
+ hostname: opts.host,
+ host: null,
+
+ // set `port` to null when it is the protocol default port (80 / 443)
+ port: defaultPort == opts.port ? null : opts.port
+ }));
+
+ // calculate the `host` parameter
+ host = parse(url).hostname;
+
+ debug('url: %o, host: %o', url, host);
+ FindProxyForURL(url, host, onproxy);
+ }
+
+ // `FindProxyForURL()` callback function
+ function onproxy (err, proxy) {
+ if (err) return fn(err);
+
+ // default to "DIRECT" if a falsey value was returned (or nothing)
+ if (!proxy) proxy = 'DIRECT';
+
+ var proxies = String(proxy).trim().split(/\s*;\s*/g).filter(Boolean);
+
+ // XXX: right now, only the first proxy specified will be used
+ var first = proxies[0];
+ debug('using proxy: %o', first);
+
+ var agent;
+ var parts = first.split(/\s+/);
+ var type = parts[0];
+
+ if ('DIRECT' == type) {
+ // direct connection to the destination endpoint
+ var socket;
+ if (secure) {
+ socket = tls.connect(opts);
+ } else {
+ socket = net.connect(opts);
+ }
+ return fn(null, socket);
+ } else if ('SOCKS' == type) {
+ // use a SOCKS proxy
+ agent = new SocksProxyAgent('socks://' + parts[1]);
+ } else if ('PROXY' == type || 'HTTPS' == type) {
+ // use an HTTP or HTTPS proxy
+ // http://dev.chromium.org/developers/design-documents/secure-web-proxy
+ var proxyURL = ('HTTPS' === type ? 'https' : 'http') + '://' + parts[1];
+ var proxy = extend({}, self.proxy, parse(proxyURL));
+ if (secure) {
+ agent = new HttpsProxyAgent(proxy);
+ } else {
+ agent = new HttpProxyAgent(proxy);
+ }
+ } else {
+ throw new Error('Unknown proxy type: ' + type);
+ }
+ if (agent) agent.callback(req, opts, fn);
+ }
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/.npmignore
new file mode 100644
index 0000000..c12f3a8
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/.npmignore
@@ -0,0 +1,2 @@
+/node_modules
+/?.js
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/.travis.yml
new file mode 100644
index 0000000..85a5012
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
+ - npm install -g npm@latest
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/History.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/History.md
new file mode 100644
index 0000000..52afaa3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/History.md
@@ -0,0 +1,95 @@
+
+1.1.0 / 2015-07-08
+==================
+
+ * add 'use strict' declaration
+ * add `use()` helper function for adding external protocols
+
+1.0.0 / 2015-07-06
+==================
+
+ * bumping to v1 for better semver semantics
+
+0.1.4 / 2015-07-06
+==================
+
+ * README: use SVG for Travis-CI badge
+ * README: properly do cache example
+ * use %o debug formatter most of the time
+ * package: update "readable-stream" to v2
+ * package: update "extend" to v3
+ * package: update "debug" to v2
+ * package: update "mocha" to v2
+ * travis: test node v0.8, v0.10, and v0.12
+
+0.1.3 / 2014-04-03
+==================
+
+ * package: old npm compatible semver
+
+0.1.2 / 2014-04-03
+==================
+
+ * package: loosen semver required versions
+ * data: just always use the "readable-stream" module
+
+0.1.1 / 2014-02-05
+==================
+
+ * http: initial shot at "cached redirects" logic
+ * package: pin "ftpd" version to v0.2.4 (for tests)
+ * test: refactor tests into their own files
+ * file: remove unused `path` require
+ * test: fix "file:" URI tests on Windows
+ * file: add better Windows support for file:// URIs
+ * http: add the Cache-Control and Expires respecting logic
+ * http: clean up logic a bit
+
+0.1.0 / 2014-01-12
+==================
+
+ * test: add initial "http:" protocol tests
+ * package: add "st" as a dev dependency
+ * http: don't pass the `res` when there's a response error
+ * test: add initial "https:" protocol tests
+ * http: initial 304 Not Modified support
+ * index: use debug()
+ * http: add support for 3xx redirect response codes
+ * http, https: initial "http:" and "https:" implementation
+ * ftp: fix debug() call
+ * package: update "description"
+ * test: remove PASV port range from FTP server
+ * test: add more "ftp:" protocol tests
+ * test: add more "data:" protocol tests
+ * test: more "file:" protocol tests
+ * test: set `logLevel` to -1 on the FTP server
+ * file: close the `fd` upon an error before creating the ReadStream
+ * data: use "readable-stream" for node v0.8.x support
+ * ftp: add debug() call for the entry logging
+ * test: use "ftpd" for the "ftp:" protocol test
+ * file: refactor for optimizations and to do proper NotModifiedErrors
+ * add .travis.yml file
+ * file: decodeURIComponent() on the pathname before normalizing
+ * file: beginnings of refactor
+ * file: initial async "file:" protocol
+ * ftp: tweak comment
+ * http, https: prep
+ * test: add initial "file:" protocol test
+ * data: fix debug() function name
+ * notfound: fix jsdoc description
+ * data: add NotModifierError() handling logic
+ * ftp: handle the "file not found" scenario
+ * notfound: add NotFoundError class
+ * ftp: better ftp impl, not with NotModified support
+ * notmodified: add NotModifiedError() class
+ * ftp: fix `onfile()` error handling
+ * file: beginnings of "file:" protocol impl
+ * test: add initial "ftp" test
+ * test: use "stream-to-array" for tests
+ * ftp: comment out console.error() call
+ * ftp: update to the async interface
+ * package: update "data-uri-to-buffer" to v0.0.3
+ * test: add initial tests
+ * turn into an async interface
+ * Add Readme.md
+ * initial commit
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/README.md
new file mode 100644
index 0000000..4b57797
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/README.md
@@ -0,0 +1,158 @@
+get-uri
+=======
+### Returns a `stream.Readable` from a URI string
+[](https://travis-ci.org/TooTallNate/node-get-uri)
+
+This high-level module accepts a URI string and returns a `Readable` stream
+instance. There is built-in support for a variety of "protocols", and it's
+easily extensible with more:
+
+| Protocol | Description | Example
+|:---------:|:-------------------------------:|:---------------------------------:
+| `data` | [Data URIs][data] | `data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D`
+| `file` | [File URIs][file] | `file:///c:/windows/example.ini`
+| `ftp` | [FTP URIs][ftp] | `ftp://ftp.kernel.org/pub/site/README`
+| `http` | [HTTP URIs][http] | `http://www.example.com/path/to/name`
+| `https` | [HTTPS URIs][https] | `https://www.example.com/path/to/name`
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install get-uri
+```
+
+
+Example
+-------
+
+To simply get a `stream.Readable` instance from a `file:` URI, try something like:
+
+``` js
+var getUri = require('get-uri');
+
+// `file:` maps to a `fs.ReadStream` instance…
+getUri('file:///Users/nrajlich/wat.json', function (err, rs) {
+ if (err) throw err;
+ rs.pipe(process.stdout);
+});
+```
+
+
+Missing Endpoints
+-----------------
+
+When you pass in a URI in which the resource referenced does not exist on the
+destination server, then a `NotFoundError` will be returned. The `code` of the
+error instance is set to `"ENOTFOUND"`, so you can special-case that in your code
+to detect when a bad filename is requested:
+
+``` js
+getUri('http://example.com/resource.json', function (err, rs) {
+ if (err) {
+ if ('ENOTFOUND' == err.code) {
+ // bad file path requested
+ } else {
+ // something else bad happened...
+ throw err;
+ }
+ }
+
+ // your app code…
+});
+```
+
+
+Cacheability
+------------
+
+When calling `getUri()` with the same URI multiple times, the `get-uri` module
+supports sending an indicator that the remote resource has not been modified
+since the last time it has been retreived from that node process.
+
+To do this, pass in a `cache` option to the "options object" argument
+with the value set to the `stream.Readable` instance that was previously
+returned. If the remote resource has not been changed since the last call for
+that same URI, then a `NotModifiedError` instance will be returned with it's
+`code` property set to `"ENOTMODIFIED"`.
+
+When the `"ENOTMODIFIED"` error occurs, then you can safely re-use the
+results from the previous `getUri()` call for that same URI:
+
+``` js
+// maps to a `fs.ReadStream` instance
+getUri('http://example.com/resource.json', function (err, rs) {
+ if (err) throw err;
+
+ // … some time later, if you need to get this same URI again, pass in the
+ // previous `stream.Readable` instance as `cache` option to potentially
+ // receive an "ENOTMODIFIED" response:
+ var opts = { cache: rs };
+ getUri('http://example.com/resource.json', opts, function (err, rs2) {
+ if (err) {
+ if ('ENOTFOUND' == err.code) {
+ // bad file path requested
+ } else if ('ENOTMODIFIED' == err.code) {
+ // source file has not been modified since last time it was requested,
+ // so `rs2` is undefined and you are expected to re-use results from
+ // a previous call to `getUri()`
+ } else {
+ // something else bad happened...
+ throw err;
+ }
+ }
+ });
+});
+```
+
+
+API
+---
+
+### getUri(String uri[, Object options,] Function callback)
+
+A `uri` String is required. An optional `options` object may be passed in:
+
+ - `cache` - A `stream.Readable` instance from a previous call to `getUri()` with the same URI. If this option is passed in, and the destination endpoint has not been modified, then an `ENOTMODIFIED` error is returned
+
+Any other options passed in to the `options` object will be passed through
+to the low-level connection creation functions (`http.get()`, `ftp.connect()`,
+etc).
+
+Invokes the given `callback` function with a `stream.Readable` instance to
+read the resource at the given `uri`.
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+[data]: http://tools.ietf.org/html/rfc2397
+[file]: http://tools.ietf.org/html/draft-hoffman-file-uri-03
+[ftp]: http://www.w3.org/Protocols/rfc959/
+[http]: http://www.w3.org/Protocols/rfc2616/rfc2616.html
+[https]: http://wikipedia.org/wiki/HTTP_Secure
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/data.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/data.js
new file mode 100644
index 0000000..3086341
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/data.js
@@ -0,0 +1,62 @@
+
+/**
+ * Module dependencies.
+ */
+
+var crypto = require('crypto');
+var Readable = require('readable-stream');;
+var dataUriToBuffer = require('data-uri-to-buffer');
+var NotModifiedError = require('./notmodified');
+var debug = require('debug')('get-uri:data');
+
+/**
+ * Module exports.
+ */
+
+module.exports = get;
+
+/**
+ * Returns a Readable stream from a "data:" URI.
+ *
+ * @api protected
+ */
+
+function get (parsed, opts, fn) {
+ var uri = parsed.href;
+ var cache = opts.cache;
+
+ // need to create a SHA1 hash of the URI string, for cacheability checks
+ // in future `getUri()` calls with the same data URI passed in.
+ var shasum = crypto.createHash('sha1');
+ shasum.update(uri);
+ var hash = shasum.digest('hex');
+ debug('generated SHA1 hash for "data:" URI: %o', hash);
+
+ // check if the cache is the same "data:" URI that was previously passed in.
+ if (cache && cache.hash == hash) {
+ debug('got matching cache SHA1 hash: %o', hash);
+ fn(new NotModifiedError());
+ } else {
+ debug('creating Readable stream from "data:" URI buffer');
+ var buf = dataUriToBuffer(uri, opts);
+ var rs = new Readable();
+ rs._read = read(buf);
+ buf = null;
+ rs.hash = hash;
+ fn(null, rs);
+ }
+}
+
+/**
+ * Function that returns a Readable `_read` function implementation.
+ *
+ * @api private
+ */
+
+function read (buf) {
+ return function (n) {
+ this.push(buf);
+ this.push(null);
+ buf = null;
+ };
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/file.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/file.js
new file mode 100644
index 0000000..3e624c3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/file.js
@@ -0,0 +1,86 @@
+
+/**
+ * Module dependencies.
+ */
+
+var fs = require('fs');
+var uri2path = require('file-uri-to-path');
+var NotFoundError = require('./notfound');
+var NotModifiedError = require('./notmodified');
+var debug = require('debug')('get-uri:file');
+
+/**
+ * Module exports.
+ */
+
+module.exports = get;
+
+/**
+ * Returns a `fs.ReadStream` instance from a "file:" URI.
+ *
+ * @api protected
+ */
+
+function get (parsed, opts, fn) {
+
+ var fd;
+ var cache = opts.cache;
+
+ // same as in fs.ReadStream's constructor
+ var flags = opts.hasOwnProperty('flags') ? options.flags : 'r';
+ var mode = opts.hasOwnProperty('mode') ? options.mode : 438; /*=0666*/
+
+ // convert URI → Path
+ var uri = parsed.href;
+ var filepath = uri2path(uri);
+ debug('normalized pathname: %o', filepath);
+
+ // open() first to get a fd and ensure that the file exists
+ fs.open(filepath, flags, mode, onopen);
+
+ function onerror (err) {
+ if ('number' == typeof fd) {
+ fs.close(fd, onclose);
+ }
+ fn(err);
+ }
+
+ function onclose () {
+ debug('closed fd %o', fd);
+ }
+
+ function onopen (err, _fd) {
+ if (err) {
+ if ('ENOENT' == err.code) {
+ err = new NotFoundError();
+ }
+ return onerror(err);
+ }
+ fd = _fd;
+
+ // now fstat() to check the `mtime` and store the stat object for the cache
+ fs.fstat(fd, onstat);
+ }
+
+ function onstat (err, stat) {
+ if (err) return onerror(err);
+
+ // if a `cache` was provided, check if the file has not been modified
+ if (cache && cache.stat && stat && isNotModified(cache.stat, stat)) {
+ return onerror(new NotModifiedError());
+ }
+
+ // `fs.ReadStream` takes care of calling `fs.close()` on the
+ // fd after it's done reading
+ opts.fd = fd;
+ var rs = fs.createReadStream(null, opts);
+ rs.stat = stat;
+
+ fn(null, rs);
+ }
+
+ // returns `true` if the `mtime` of the 2 stat objects are equal
+ function isNotModified (prev, curr) {
+ return +prev.mtime == +curr.mtime;
+ }
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/ftp.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/ftp.js
new file mode 100644
index 0000000..3fd00e1
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/ftp.js
@@ -0,0 +1,127 @@
+
+/**
+ * Module dependencies.
+ */
+
+var FTP = require('ftp');
+var path = require('path');
+var NotFoundError = require('./notfound');
+var NotModifiedError = require('./notmodified');
+var debug = require('debug')('get-uri:ftp');
+
+/**
+ * Module exports.
+ */
+
+module.exports = get;
+
+/**
+ * Returns a Readable stream from an "ftp:" URI.
+ *
+ * @api protected
+ */
+
+function get (parsed, opts, fn) {
+ var cache = opts.cache;
+ var client = new FTP();
+ var filepath = parsed.pathname;
+ var lastModified;
+
+ client.once('ready', onready);
+ client.once('greeting', ongreeting);
+
+ function onready () {
+ // first we have to figure out the Last Modified date.
+ // try the MDTM command first, which is an optional extension command.
+ client.lastMod(filepath, onlastmod);
+ }
+
+ function ongreeting (greeting) {
+ debug('FTP greeting: %o', greeting);
+ }
+
+ function onerror (err) {
+ client.end();
+ fn(err);
+ }
+
+ function onfile (err, stream) {
+ if (err) return onerror(err);
+ stream.once('end', onend);
+ stream.lastModified = lastModified;
+ fn(null, stream);
+ }
+
+ function onend () {
+ // close the FTP client socket connection
+ client.end();
+ }
+
+ function getFile () {
+ client.get(filepath, onfile);
+ }
+
+ function onlastmod (err, lastmod) {
+ // handle the "file not found" error code
+ if (err) {
+ if (550 == err.code) {
+ onerror(new NotFoundError());
+ }
+ // any other error then we'll try the LIST command instead
+ }
+ if (lastmod) {
+ setLastMod(lastmod);
+ } else {
+ // try to get the last modified date via the LIST command (uses
+ // more bandwidth, but is more compatible with older FTP servers
+ var dir = path.dirname(filepath);
+ client.list(dir, onlist);
+ }
+ }
+
+ function setLastMod (lastmod) {
+ lastModified = lastmod;
+ if (cache && isNotModified()) {
+ // file is the same as in the "cache", return a not modified error
+ onerror(new NotModifiedError());
+ } else {
+ // XXX: a small timeout seemed necessary otherwise FTP servers
+ // were returning empty sockets for the file occasionally
+ setTimeout(client.get.bind(client, filepath, onfile), 10);
+ }
+ }
+
+ function onlist (err, list) {
+ if (err) return onerror(err);
+ var name = path.basename(filepath);
+
+ // attempt to find the "entry" with a matching "name"
+ var entry;
+ for (var i = 0; i < list.length; i++) {
+ entry = list[i];
+ debug('file %o: %o', i, entry.name);
+ if (entry.name == name) {
+ break;
+ }
+ entry = null;
+ }
+
+ if (entry) {
+ setLastMod(entry.date);
+ } else {
+ onerror(new NotFoundError());
+ }
+ }
+
+ // called when `lastModified` is set, and a "cache" stream was provided
+ function isNotModified () {
+ return +cache.lastModified == +lastModified;
+ }
+
+ opts.host = parsed.hostname || parsed.host || 'localhost';
+ opts.port = parseInt(parsed.port, 10) || 21;
+ if (debug.enabled) opts.debug = debug;
+
+ // TODO: add auth
+ client.connect(opts);
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/http.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/http.js
new file mode 100644
index 0000000..e6b0faa
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/http.js
@@ -0,0 +1,230 @@
+
+/**
+ * Module dependencies.
+ */
+
+var url = require('url');
+var http = require('http');
+var extend = require('extend');
+var NotFoundError = require('./notfound');
+var NotModifiedError = require('./notmodified');
+var debug = require('debug')('get-uri:http');
+
+/**
+ * Module exports.
+ */
+
+module.exports = get;
+
+/**
+ * Returns a Readable stream from an "http:" URI.
+ *
+ * @api protected
+ */
+
+function get (parsed, opts, fn) {
+ debug('GET %o', parsed.href);
+
+ var cache = getCache(parsed, opts.cache);
+
+ // 5 redirects allowed by default
+ var maxRedirects = opts.hasOwnProperty('maxRedirects') ? opts.maxRedirects : 5;
+ debug('allowing %o max redirects', maxRedirects);
+
+ // first check the previous Expires and/or Cache-Control headers
+ // of a previous response if a `cache` was provided
+ if (cache && isFresh(cache)) {
+
+ // check for a 3xx "redirect" status code on the previous cache
+ var location = cache.headers.location;
+ var type = (cache.statusCode / 100 | 0);
+ if (3 == type && location) {
+ debug('cached redirect');
+ fn(new Error('TODO: implement cached redirects!'));
+ } else {
+ // otherwise we assume that it's the destination endpoint,
+ // since there's nowhere else to redirect to
+ fn(new NotModifiedError());
+ }
+ return;
+ }
+
+ var mod;
+ if (opts.http) {
+ // the `https` module passed in from the "http.js" file
+ mod = opts.http;
+ debug('using secure `https` core module');
+ } else {
+ mod = http;
+ debug('using `http` core module');
+ }
+
+ var options = extend({}, opts, parsed);
+
+ // add "cache validation" headers if a `cache` was provided
+ if (cache) {
+ if (!options.headers) options.headers = {};
+
+ var lastModified = cache.headers['last-modified'];
+ if (lastModified != null) {
+ options.headers['If-Modified-Since'] = lastModified;
+ debug('added "If-Modified-Since" request header: %o', lastModified);
+ }
+
+ var etag = cache.headers.etag;
+ if (etag != null) {
+ options.headers['If-None-Match'] = etag;
+ debug('added "If-None-Match" request header: %o', etag);
+ }
+ }
+
+ var req = mod.get(options);
+ req.once('error', onerror);
+ req.once('response', onresponse);
+
+ // http.ClientRequest "error" event handler
+ function onerror (err) {
+ debug('http.ClientRequest "error" event: %o', err.stack || err);
+ fn(err);
+ }
+
+ // http.ClientRequest "response" event handler
+ function onresponse (res) {
+ var code = res.statusCode;
+
+ // assign a Date to this response for the "Cache-Control" delta calculation
+ res.date = new Date();
+ res.parsed = parsed;
+
+ debug('got %o response status code', code);
+
+ // any 2xx response is a "success" code
+ var type = (code / 100 | 0);
+
+ // check for a 3xx "redirect" status code
+ var location = res.headers.location;
+ if (3 == type && location) {
+ if (!opts.redirects) opts.redirects = [];
+ var redirects = opts.redirects;
+
+ if (redirects.length < maxRedirects) {
+ debug('got a "redirect" status code with Location: %o', location);
+
+ // flush this response - we're not going to use it
+ res.resume();
+
+ // hang on to this Response object for the "redirects" Array
+ redirects.push(res);
+
+ var newUri = url.resolve(parsed, location);
+ debug('resolved redirect URL: %o', newUri);
+
+ var left = maxRedirects - redirects.length;
+ debug('%o more redirects allowed after this one', left);
+
+ return get(url.parse(newUri), opts, fn);
+ }
+ }
+
+ // if we didn't get a 2xx "success" status code, then create an Error object
+ if (2 != type) {
+ var err;
+ if (304 == code) {
+ err = new NotModifiedError();
+ } else if (404 == code) {
+ err = new NotFoundError();
+ } else {
+ // other HTTP-level error
+ var message = http.STATUS_CODES[code];
+ err = new Error(message);
+ err.statusCode = code;
+ err.code = code;
+ }
+
+ res.resume();
+ return fn(err);
+ }
+
+ if (opts.redirects) {
+ // store a reference to the "redirects" Array on the Response object so that
+ // they can be inspected during a subsequent call to GET the same URI
+ res.redirects = opts.redirects;
+ }
+
+ fn(null, res);
+ }
+}
+
+/**
+ * Returns `true` if the provided cache's "freshness" is valid. That is, either
+ * the Cache-Control header or Expires header values are still within the allowed
+ * time period.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+function isFresh (cache) {
+ var cacheControl = cache.headers['cache-control'];
+ var expires = cache.headers.expires;
+ var fresh;
+
+ if (cacheControl) {
+ // for Cache-Control rules, see: http://www.mnot.net/cache_docs/#CACHE-CONTROL
+ debug('Cache-Control: %o', cacheControl);
+
+ var parts = cacheControl.split(/,\s*?\b/);
+ for (var i = 0; i < parts.length; i++) {
+ var part = parts[i];
+ var subparts = part.split('=');
+ var name = subparts[0];
+ switch (name) {
+ case 'max-age':
+ var val = +subparts[1];
+ expires = new Date(+cache.date + (val * 1000));
+ fresh = new Date() < expires;
+ if (fresh) debug('cache is "fresh" due to previous %o Cache-Control param', part);
+ return fresh;
+ case 'must-revalidate':
+ // XXX: what we supposed to do here?
+ break;
+ case 'no-cache':
+ case 'no-store':
+ debug('cache is "stale" due to explicit %o Cache-Control param', name);
+ return false;
+ }
+ }
+
+ } else if (expires) {
+ // for Expires rules, see: http://www.mnot.net/cache_docs/#EXPIRES
+ debug('Expires: %o', expires);
+
+ fresh = new Date() < new Date(expires);
+ if (fresh) debug('cache is "fresh" due to previous Expires response header');
+ return fresh;
+ }
+
+ return false;
+}
+
+/**
+ * Attempts to return a previous Response object from a previous GET call to the
+ * same URI.
+ *
+ * @api private
+ */
+
+function getCache (parsed, cache) {
+ if (!cache) return;
+ var href = parsed.href;
+ if (cache.parsed.href == href) {
+ return cache;
+ }
+ var redirects = cache.redirects;
+ if (redirects) {
+ for (var i = 0; i < redirects.length; i++) {
+ var c = getCache(parsed, redirects[i]);
+ if (c) return c;
+ }
+ }
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/https.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/https.js
new file mode 100644
index 0000000..a77e664
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/https.js
@@ -0,0 +1,24 @@
+
+/**
+ * Module dependencies.
+ */
+
+var http = require('./http');
+var https = require('https');
+
+/**
+ * Module exports.
+ */
+
+module.exports = get;
+
+/**
+ * Returns a Readable stream from an "https:" URI.
+ *
+ * @api protected
+ */
+
+function get (parsed, opts, fn) {
+ opts.http = https;
+ http(parsed, opts, fn);
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/index.js
new file mode 100644
index 0000000..293edb3
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/index.js
@@ -0,0 +1,93 @@
+'use strict';
+
+/**
+ * Module dependencies.
+ */
+
+var parse = require('url').parse;
+var debug = require('debug')('get-uri');
+
+/**
+ * Module exports.
+ */
+
+module.exports = exports = getUri;
+
+/**
+ * Supported "protocols".
+ */
+
+exports.protocols = {
+ data: require('./data'),
+ file: require('./file'),
+ ftp: require('./ftp'),
+ http: require('./http'),
+ https: require('./https')
+};
+
+/**
+ * Adds a new protocol via module `require()`.
+ */
+
+exports.use = function use (name) {
+ var setup;
+ try {
+ setup = require(name);
+ } catch (e) {
+ if (e.code === 'MODULE_NOT_FOUND') {
+ // support `use('tftp') -> require('get-uri-tftp')`
+ setup = require('get-uri-' + name);
+ } else {
+ throw e;
+ }
+ }
+ if ('function' !== typeof setup) {
+ throw new TypeError('expected a protocol setup function, got ' + (typeof setup));
+ }
+ setup(exports.protocols);
+};
+
+/**
+ * Async function that returns a `stream.Readable` instance to the
+ * callback function that will output the contents of the given URI.
+ *
+ * For caching purposes, you can pass in a `stream` instance from a previous
+ * `getUri()` call as a `cache: stream` option, and if the destination has
+ * not changed since the last time the endpoint was retreived then the callback
+ * will be invoked with an Error object with `code` set to "ENOTMODIFIED" and
+ * `null` for the "stream" instance argument. In this case, you can skip
+ * retreiving the file again and continue to use the previous payload.
+ *
+ * @param {String} uri URI to retrieve
+ * @param {Object} opts optional "options" object
+ * @param {Function} fn callback function
+ * @api public
+ */
+
+function getUri (uri, opts, fn) {
+ debug('getUri(%o)', uri);
+
+ if ('function' == typeof opts) {
+ fn = opts;
+ opts = null;
+ }
+ if ('function' != typeof fn) {
+ throw new TypeError('a callback function must be provided');
+ }
+
+ if (!uri) return fn(new TypeError('must pass in a URI to "get"'));
+
+ var parsed = parse(uri);
+ var protocol = parsed.protocol;
+ if (!protocol) return fn(new TypeError('URI does not contain a protocol: ' + uri));
+
+ // strip trailing :
+ protocol = protocol.replace(/\:$/, '');
+
+ var getter = exports.protocols[protocol];
+
+ if ('function' != typeof getter)
+ return fn(new TypeError('unsupported protocol "' + protocol + '" specified in URI: ' + uri));
+
+ getter(parsed, opts || {}, fn);
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/.npmignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/.npmignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/.travis.yml b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/.travis.yml
new file mode 100644
index 0000000..85a5012
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/.travis.yml
@@ -0,0 +1,8 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.12"
+before_install:
+ - '[ "${TRAVIS_NODE_VERSION}" != "0.8" ] || npm install -g npm@1.4.28'
+ - npm install -g npm@latest
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/History.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/History.md
new file mode 100644
index 0000000..440c77d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/History.md
@@ -0,0 +1,29 @@
+
+0.0.4 / 2015-06-29
+==================
+
+ * package: update "mocha" to v2
+ * package: add RFC to the "keywords" section
+ * travis: test node v0.8, v0.10, and v0.12
+ * README: use SVG for Travis-CI badge
+ * test: more tests
+
+0.0.3 / 2014-01-08
+==================
+
+ * index: fix a URI with a comma in the data portion
+
+0.0.2 / 2014-01-08
+==================
+
+ * index: use unescape() instead of decodeURIComponent()
+ * test: add more tests from Mozilla
+
+0.0.1 / 2014-01-02
+==================
+
+ * add `README.md`
+ * index: default the `charset` property to "US-ASCII"
+ * default encoding is "ascii"
+ * default `type` to "text/plain" when none is given
+ * initial commit
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/README.md
new file mode 100644
index 0000000..e19a046
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/README.md
@@ -0,0 +1,80 @@
+data-uri-to-buffer
+==================
+### Generate a Buffer instance from a [Data URI][rfc] string
+[](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer)
+
+This module accepts a ["data" URI][rfc] String of data, and returns a
+node.js `Buffer` instance with the decoded data.
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install data-uri-to-buffer
+```
+
+
+Example
+-------
+
+``` js
+var dataUriToBuffer = require('data-uri-to-buffer');
+
+// plain-text data is supported
+var uri = 'data:,Hello%2C%20World!';
+var decoded = dataUriToBuffer(uri);
+console.log(decoded.toString());
+// 'Hello, World!'
+
+// base64-encoded data is supported
+uri = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D';
+decoded = dataUriToBuffer(uri);
+console.log(decoded.toString());
+// 'Hello, World!'
+```
+
+
+API
+---
+
+### dataUriToBuffer(String uri) → Buffer
+
+The `type` property on the Buffer instance gets set to the Content-Type portion of
+the "mediatype" portion of the "data" URI, or defaults to `"text/plain"` if not
+specified.
+
+The `charset` property on the Buffer instance gets set to the Charset portion of
+the "mediatype" portion of the "data" URI, or defaults to `"US-ASCII"` if not
+specified.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+[rfc]: http://tools.ietf.org/html/rfc2397
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/index.js
new file mode 100644
index 0000000..22a1f83
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/index.js
@@ -0,0 +1,54 @@
+
+/**
+ * Module exports.
+ */
+
+module.exports = dataUriToBuffer;
+
+/**
+ * Returns a `Buffer` instance from the given data URI `uri`.
+ *
+ * @param {String} uri Data URI to turn into a Buffer instance
+ * @return {Buffer} Buffer instance from Data URI
+ * @api public
+ */
+
+function dataUriToBuffer (uri) {
+ if (!/^data\:/i.test(uri)) {
+ throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
+ }
+
+ // strip newlines
+ uri = uri.replace(/\r?\n/g, '');
+
+ // split the URI up into the "metadata" and the "data" portions
+ var firstComma = uri.indexOf(',');
+ if (-1 === firstComma || firstComma <= 4) throw new TypeError('malformed data: URI');
+
+ // remove the "data:" scheme and parse the metadata
+ var meta = uri.substring(5, firstComma).split(';');
+
+ var base64 = false;
+ var charset = 'US-ASCII';
+ for (var i = 0; i < meta.length; i++) {
+ if ('base64' == meta[i]) {
+ base64 = true;
+ } else if (0 == meta[i].indexOf('charset=')) {
+ charset = meta[i].substring(8);
+ }
+ }
+
+ // get the encoded data portion and decode URI-encoded chars
+ var data = unescape(uri.substring(firstComma + 1));
+
+ var encoding = base64 ? 'base64' : 'ascii';
+ var buffer = new Buffer(data, encoding);
+
+ // set `.type` property to MIME type
+ buffer.type = meta[0] || 'text/plain';
+
+ // set the `.charset` property
+ buffer.charset = charset;
+
+ return buffer;
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/package.json
new file mode 100644
index 0000000..3d22e80
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "data-uri-to-buffer",
+ "version": "0.0.4",
+ "description": "Generate a Buffer instance from a Data URI string",
+ "main": "index.js",
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-data-uri-to-buffer.git"
+ },
+ "keywords": [
+ "data",
+ "uri",
+ "datauri",
+ "data-uri",
+ "buffer",
+ "convert",
+ "rfc2397",
+ "2397"
+ ],
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-data-uri-to-buffer/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/node-data-uri-to-buffer",
+ "devDependencies": {
+ "mocha": "2"
+ },
+ "gitHead": "387e133e2b016f8a62eb7df0d150455775f97ef8",
+ "_id": "data-uri-to-buffer@0.0.4",
+ "_shasum": "46e13ab9da8e309745c8d01ce547213ebdb2fe3f",
+ "_from": "data-uri-to-buffer@>=0.0.0 <1.0.0",
+ "_npmVersion": "2.10.1",
+ "_nodeVersion": "0.12.4",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "dist": {
+ "shasum": "46e13ab9da8e309745c8d01ce547213ebdb2fe3f",
+ "tarball": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-0.0.4.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-0.0.4.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/test/test.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/test/test.js
new file mode 100644
index 0000000..dff24bd
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/data-uri-to-buffer/test/test.js
@@ -0,0 +1,128 @@
+
+/**
+ * Module dependencies.
+ */
+
+var assert = require('assert');
+var dataUriToBuffer = require('../');
+
+describe('data-uri-to-buffer', function () {
+
+ it('should decode bare-bones Data URIs', function () {
+ var uri = 'data:,Hello%2C%20World!';
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal('Hello, World!', buf.toString());
+ });
+
+ it('should decode bare-bones "base64" Data URIs', function () {
+ var uri = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D';
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal('Hello, World!', buf.toString());
+ });
+
+ it('should decode plain-text Data URIs', function () {
+ var html = ''+
+ ''+
+ 'Embedded Window'+
+ '42
'+
+ '';
+
+ // Escape the HTML for URL formatting
+ var uri = 'data:text/html;charset=utf-8,' + encodeURIComponent(html);
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/html', buf.type);
+ assert.equal('utf-8', buf.charset);
+ assert.equal(html, buf.toString());
+ });
+
+ // the next 4 tests are from:
+ // https://bug161965.bugzilla.mozilla.org/attachment.cgi?id=94670&action=view
+
+ it('should decode "ISO-8859-8 in Base64" URIs', function () {
+ var uri = 'data:text/plain;charset=iso-8859-8-i;base64,+ezl7Q==';
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal('iso-8859-8-i', buf.charset);
+ assert.equal(4, buf.length);
+ assert.equal(0xf9, buf[0]);
+ assert.equal(0xec, buf[1]);
+ assert.equal(0xe5, buf[2]);
+ assert.equal(0xed, buf[3]);
+ });
+
+ it('should decode "ISO-8859-8 in URL-encoding" URIs', function () {
+ var uri = 'data:text/plain;charset=iso-8859-8-i,%f9%ec%e5%ed';
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal('iso-8859-8-i', buf.charset);
+ assert.equal(4, buf.length);
+ assert.equal(0xf9, buf[0]);
+ assert.equal(0xec, buf[1]);
+ assert.equal(0xe5, buf[2]);
+ assert.equal(0xed, buf[3]);
+ });
+
+ it('should decode "UTF-8 in Base64" URIs', function () {
+ var uri = 'data:text/plain;charset=UTF-8;base64,16nXnNeV150=';
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal('UTF-8', buf.charset);
+ assert.equal(8, buf.length);
+ assert.equal('שלום', buf.toString('utf8'));
+ });
+
+ it('should decode "UTF-8 in URL-encoding" URIs', function () {
+ var uri = 'data:text/plain;charset=UTF-8,%d7%a9%d7%9c%d7%95%d7%9d';
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal('UTF-8', buf.charset);
+ assert.equal(8, buf.length);
+ assert.equal('שלום', buf.toString('utf8'));
+ });
+
+ // this next one is from Wikipedia IIRC
+
+ it('should decode "base64" Data URIs with newlines', function () {
+ var uri = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA\n' +
+ 'AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO\n' +
+ '9TXL0Y4OHwAAAABJRU5ErkJggg==';
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('image/png', buf.type);
+ assert.equal('iVBORw0KGgoAAAANSUhEUgAAAAUA' +
+ 'AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO' +
+ '9TXL0Y4OHwAAAABJRU5ErkJggg==', buf.toString('base64'));
+ });
+
+ it('should decode a plain-text URI with a space character in it', function () {
+ var uri = 'data:,foo bar';
+
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal('foo bar', buf.toString());
+ });
+
+ it('should decode data with a "," comma char', function () {
+ var uri = 'data:,a,b';
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal('a,b', buf.toString());
+ });
+
+ it('should decode data with traditionally reserved characters like ";"', function () {
+ var uri = 'data:,;test';
+ var buf = dataUriToBuffer(uri);
+ assert.equal('text/plain', buf.type);
+ assert.equal(';test', buf.toString());
+ });
+
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/.npmignore b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/.npmignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/.npmignore
@@ -0,0 +1 @@
+/node_modules
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/History.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/History.md
new file mode 100644
index 0000000..78bdf05
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/History.md
@@ -0,0 +1,10 @@
+
+0.0.2 / 2014-01-27
+==================
+
+ * index: invert the path separators on Windows
+
+0.0.1 / 2014-01-27
+==================
+
+ * initial commit
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/index.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/index.js
new file mode 100644
index 0000000..ea2fda2
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/index.js
@@ -0,0 +1,66 @@
+
+/**
+ * Module dependencies.
+ */
+
+var sep = require('path').sep || '/';
+
+/**
+ * Module exports.
+ */
+
+module.exports = fileUriToPath;
+
+/**
+ * File URI to Path function.
+ *
+ * @param {String} uri
+ * @return {String} path
+ * @api public
+ */
+
+function fileUriToPath (uri) {
+ if ('string' != typeof uri ||
+ uri.length <= 7 ||
+ 'file://' != uri.substring(0, 7)) {
+ throw new TypeError('must pass in a file:// URI to convert to a file path');
+ }
+
+ var rest = unescape(uri.substring(7));
+ var firstSlash = rest.indexOf('/');
+ var host = rest.substring(0, firstSlash);
+ var path = rest.substring(firstSlash + 1);
+
+ // 2. Scheme Definition
+ // As a special case, can be the string "localhost" or the empty
+ // string; this is interpreted as "the machine from which the URL is
+ // being interpreted".
+ if ('localhost' == host) host = '';
+
+ if (host) {
+ host = sep + sep + host;
+ }
+
+ // 3.2 Drives, drive letters, mount points, file system root
+ // Drive letters are mapped into the top of a file URI in various ways,
+ // depending on the implementation; some applications substitute
+ // vertical bar ("|") for the colon after the drive letter, yielding
+ // "file:///c|/tmp/test.txt". In some cases, the colon is left
+ // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
+ // colon is simply omitted, as in "file:///c/tmp/test.txt".
+ path = path.replace(/^(.+)\|/, '$1:');
+
+ // for Windows, we need to invert the path separators from what a URI uses
+ if (sep == '\\') {
+ path = path.replace(/\//g, '\\');
+ }
+
+ if (/^.+\:/.test(path)) {
+ // has Windows drive at beginning of path
+ } else {
+ // unix path…
+ path = sep + path;
+ }
+
+ return host + path;
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/package.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/package.json
new file mode 100644
index 0000000..dc5713d
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "file-uri-to-path",
+ "version": "0.0.2",
+ "description": "Convert a file: URI to a file path",
+ "main": "index.js",
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/file-uri-to-path.git"
+ },
+ "keywords": [
+ "file",
+ "uri",
+ "convert",
+ "path"
+ ],
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net",
+ "url": "http://n8.io/"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/file-uri-to-path/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/file-uri-to-path",
+ "devDependencies": {
+ "mocha": "~1.17.1"
+ },
+ "_id": "file-uri-to-path@0.0.2",
+ "dist": {
+ "shasum": "37cdd1b5b905404b3f05e1b23645be694ff70f82",
+ "tarball": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-0.0.2.tgz"
+ },
+ "_from": "file-uri-to-path@>=0.0.0 <1.0.0",
+ "_npmVersion": "1.3.21",
+ "_npmUser": {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ },
+ "maintainers": [
+ {
+ "name": "tootallnate",
+ "email": "nathan@tootallnate.net"
+ }
+ ],
+ "_shasum": "37cdd1b5b905404b3f05e1b23645be694ff70f82",
+ "_resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-0.0.2.tgz"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/test/test.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/test/test.js
new file mode 100644
index 0000000..79305dc
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/test/test.js
@@ -0,0 +1,24 @@
+
+var sep = require('path').sep || '/';
+var assert = require('assert');
+var uri2path = require('../');
+var tests = require('./tests.json');
+
+describe('file-uri-to-path', function () {
+
+ Object.keys(tests).forEach(function (uri) {
+
+ // the test cases were generated from Windows' PathCreateFromUrlA() function.
+ // On Unix, we have to replace the path separator with the Unix one instead of
+ // the Windows one.
+ var expected = tests[uri].replace(/\\/g, sep);
+
+ it('should convert ' + JSON.stringify(uri) + ' to ' + JSON.stringify(expected),
+ function () {
+ var actual = uri2path(uri);
+ assert.equal(actual, expected);
+ });
+
+ });
+
+});
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/test/tests.json b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/test/tests.json
new file mode 100644
index 0000000..92a63cb
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/file-uri-to-path/test/tests.json
@@ -0,0 +1,12 @@
+{
+ "file://host/path": "\\\\host\\path",
+ "file://localhost/etc/fstab": "\\etc\\fstab",
+ "file:///etc/fstab": "\\etc\\fstab",
+ "file:///c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
+ "file://localhost/c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
+ "file:///c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
+ "file://localhost/c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
+ "file://hostname/path/to/the%20file.txt": "\\\\hostname\\path\\to\\the file.txt",
+ "file:///c:/path/to/the%20file.txt": "c:\\path\\to\\the file.txt",
+ "file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc": "C:\\Documents and Settings\\davris\\FileSchemeURIs.doc"
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/LICENSE b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/LICENSE
new file mode 100644
index 0000000..290762e
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/LICENSE
@@ -0,0 +1,19 @@
+Copyright Brian White. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
\ No newline at end of file
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/README.md b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/README.md
new file mode 100644
index 0000000..922fd52
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/README.md
@@ -0,0 +1,195 @@
+Description
+===========
+
+node-ftp is an FTP client module for [node.js](http://nodejs.org/) that provides an asynchronous interface for communicating with an FTP server.
+
+
+Requirements
+============
+
+* [node.js](http://nodejs.org/) -- v0.8.0 or newer
+
+
+Install
+=======
+
+ npm install ftp
+
+
+Examples
+========
+
+* Get a directory listing of the current (remote) working directory:
+
+```javascript
+ var Client = require('ftp');
+
+ var c = new Client();
+ c.on('ready', function() {
+ c.list(function(err, list) {
+ if (err) throw err;
+ console.dir(list);
+ c.end();
+ });
+ });
+ // connect to localhost:21 as anonymous
+ c.connect();
+```
+
+* Download remote file 'foo.txt' and save it to the local file system:
+
+```javascript
+ var Client = require('ftp');
+ var fs = require('fs');
+
+ var c = new Client();
+ c.on('ready', function() {
+ c.get('foo.txt', function(err, stream) {
+ if (err) throw err;
+ stream.once('close', function() { c.end(); });
+ stream.pipe(fs.createWriteStream('foo.local-copy.txt'));
+ });
+ });
+ // connect to localhost:21 as anonymous
+ c.connect();
+```
+
+* Upload local file 'foo.txt' to the server:
+
+```javascript
+ var Client = require('ftp');
+ var fs = require('fs');
+
+ var c = new Client();
+ c.on('ready', function() {
+ c.put('foo.txt', 'foo.remote-copy.txt', function(err) {
+ if (err) throw err;
+ c.end();
+ });
+ });
+ // connect to localhost:21 as anonymous
+ c.connect();
+```
+
+
+API
+===
+
+Events
+------
+
+* **greeting**(< _string_ >msg) - Emitted after connection. `msg` is the text the server sent upon connection.
+
+* **ready**() - Emitted when connection and authentication were sucessful.
+
+* **close**(< _boolean_ >hadErr) - Emitted when the connection has fully closed.
+
+* **end**() - Emitted when the connection has ended.
+
+* **error**(< _Error_ >err) - Emitted when an error occurs. In case of protocol-level errors, `err` contains a 'code' property that references the related 3-digit FTP response code.
+
+
+Methods
+-------
+
+**\* Note: As with the 'error' event, any error objects passed to callbacks will have a 'code' property for protocol-level errors.**
+
+* **(constructor)**() - Creates and returns a new FTP client instance.
+
+* **connect**(< _object_ >config) - _(void)_ - Connects to an FTP server. Valid config properties:
+
+ * host - _string_ - The hostname or IP address of the FTP server. **Default:** 'localhost'
+
+ * port - _integer_ - The port of the FTP server. **Default:** 21
+
+ * secure - _mixed_ - Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) **Default:** false
+
+ * secureOptions - _object_ - Additional options to be passed to `tls.connect()`. **Default:** (none)
+
+ * user - _string_ - Username for authentication. **Default:** 'anonymous'
+
+ * password - _string_ - Password for authentication. **Default:** 'anonymous@'
+
+ * connTimeout - _integer_ - How long (in milliseconds) to wait for the control connection to be established. **Default:** 10000
+
+ * pasvTimeout - _integer_ - How long (in milliseconds) to wait for a PASV data connection to be established. **Default:** 10000
+
+ * keepalive - _integer_ - How often (in milliseconds) to send a 'dummy' (NOOP) command to keep the connection alive. **Default:** 10000
+
+* **end**() - _(void)_ - Closes the connection to the server after any/all enqueued commands have been executed.
+
+* **destroy**() - _(void)_ - Closes the connection to the server immediately.
+
+### Required "standard" commands (RFC 959)
+
+* **list**([< _string_ >path, ][< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Retrieves the directory listing of `path`. `path` defaults to the current working directory. `useCompression` defaults to false. `callback` has 2 parameters: < _Error_ >err, < _array_ >list. `list` is an array of objects with these properties:
+
+ * type - _string_ - A single character denoting the entry type: 'd' for directory, '-' for file (or 'l' for symlink on **\*NIX only**).
+
+ * name - _string_ - The name of the entry.
+
+ * size - _string_ - The size of the entry in bytes.
+
+ * date - _Date_ - The last modified date of the entry.
+
+ * rights - _object_ - The various permissions for this entry **(*NIX only)**.
+
+ * user - _string_ - An empty string or any combination of 'r', 'w', 'x'.
+
+ * group - _string_ - An empty string or any combination of 'r', 'w', 'x'.
+
+ * other - _string_ - An empty string or any combination of 'r', 'w', 'x'.
+
+ * owner - _string_ - The user name or ID that this entry belongs to **(*NIX only)**.
+
+ * group - _string_ - The group name or ID that this entry belongs to **(*NIX only)**.
+
+ * target - _string_ - For symlink entries, this is the symlink's target **(*NIX only)**.
+
+ * sticky - _boolean_ - True if the sticky bit is set for this entry **(*NIX only)**.
+
+* **get**(< _string_ >path, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Retrieves a file at `path` from the server. `useCompression` defaults to false. `callback` has 2 parameters: < _Error_ >err, < _ReadableStream_ >fileStream.
+
+* **put**(< _mixed_ >input, < _string_ >destPath, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Sends data to the server to be stored as `destPath`. `input` can be a ReadableStream, a Buffer, or a path to a local file. `useCompression` defaults to false. `callback` has 1 parameter: < _Error_ >err.
+
+* **append**(< _mixed_ >input, < _string_ >destPath, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Same as **put()**, except if `destPath` already exists, it will be appended to instead of overwritten.
+
+* **rename**(< _string_ >oldPath, < _string_ >newPath, < _function_ >callback) - _(void)_ - Renames `oldPath` to `newPath` on the server. `callback` has 1 parameter: < _Error_ >err.
+
+* **logout**(< _function_ >callback) - _(void)_ - Logout the user from the server. `callback` has 1 parameter: < _Error_ >err.
+
+* **delete**(< _string_ >path, < _function_ >callback) - _(void)_ - Deletes a file, `path`, on the server. `callback` has 1 parameter: < _Error_ >err.
+
+* **cwd**(< _string_ >path, < _function_ >callback) - _(void)_ - Changes the current working directory to `path`. `callback` has 2 parameters: < _Error_ >err, < _string_ >currentDir. Note: `currentDir` is only given if the server replies with the path in the response text.
+
+* **abort**(< _function_ >callback) - _(void)_ - Aborts the current data transfer (e.g. from get(), put(), or list()). `callback` has 1 parameter: < _Error_ >err.
+
+* **site**(< _string_ >command, < _function_ >callback) - _(void)_ - Sends `command` (e.g. 'CHMOD 755 foo', 'QUOTA') using SITE. `callback` has 3 parameters: < _Error_ >err, < _string >responseText, < _integer_ >responseCode.
+
+* **status**(< _function_ >callback) - _(void)_ - Retrieves human-readable information about the server's status. `callback` has 2 parameters: < _Error_ >err, < _string_ >status.
+
+* **ascii**(< _function_ >callback) - _(void)_ - Sets the transfer data type to ASCII. `callback` has 1 parameter: < _Error_ >err.
+
+* **binary**(< _function_ >callback) - _(void)_ - Sets the transfer data type to binary (default at time of connection). `callback` has 1 parameter: < _Error_ >err.
+
+### Optional "standard" commands (RFC 959)
+
+* **mkdir**(< _string_ >path, [< _boolean_ >recursive, ]< _function_ >callback) - _(void)_ - Creates a new directory, `path`, on the server. `recursive` is for enabling a 'mkdir -p' algorithm and defaults to false. `callback` has 1 parameter: < _Error_ >err.
+
+* **rmdir**(< _string_ >path, [< _boolean_ >recursive, ]< _function_ >callback) - _(void)_ - Removes a directory, `path`, on the server. If `recursive`, this call will delete the contents of the directory if it is not empty. `callback` has 1 parameter: < _Error_ >err.
+
+* **cdup**(< _function_ >callback) - _(void)_ - Changes the working directory to the parent of the current directory. `callback` has 1 parameter: < _Error_ >err.
+
+* **pwd**(< _function_ >callback) - _(void)_ - Retrieves the current working directory. `callback` has 2 parameters: < _Error_ >err, < _string_ >cwd.
+
+* **system**(< _function_ >callback) - _(void)_ - Retrieves the server's operating system. `callback` has 2 parameters: < _Error_ >err, < _string_ >OS.
+
+* **listSafe**([< _string_ >path, ][< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Similar to list(), except the directory is temporarily changed to `path` to retrieve the directory listing. This is useful for servers that do not handle characters like spaces and quotes in directory names well for the LIST command. This function is "optional" because it relies on pwd() being available.
+
+### Extended commands (RFC 3659)
+
+* **size**(< _string_ >path, < _function_ >callback) - _(void)_ - Retrieves the size of `path`. `callback` has 2 parameters: < _Error_ >err, < _integer_ >numBytes.
+
+* **lastMod**(< _string_ >path, < _function_ >callback) - _(void)_ - Retrieves the last modified date and time for `path`. `callback` has 2 parameters: < _Error_ >err, < _Date_ >lastModified.
+
+* **restart**(< _integer_ >byteOffset, < _function_ >callback) - _(void)_ - Sets the file byte offset for the next file transfer action (get/put) to `byteOffset`. `callback` has 1 parameter: < _Error_ >err.
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/TODO b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/TODO
new file mode 100644
index 0000000..6901d03
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/TODO
@@ -0,0 +1,3 @@
+ - Add support for some SITE commands such as CHMOD, CHGRP, and QUOTA
+ - Active (non-passive) data connections
+ - IPv6 support
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/lib/connection.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/lib/connection.js
new file mode 100644
index 0000000..ca35eea
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/lib/connection.js
@@ -0,0 +1,1070 @@
+var fs = require('fs'),
+ tls = require('tls'),
+ zlib = require('zlib'),
+ Socket = require('net').Socket,
+ EventEmitter = require('events').EventEmitter,
+ inherits = require('util').inherits,
+ inspect = require('util').inspect;
+
+var Parser = require('./parser');
+var XRegExp = require('xregexp').XRegExp;
+
+var REX_TIMEVAL = XRegExp.cache('^(?\\d{4})(?\\d{2})(?\\d{2})(?\\d{2})(?\\d{2})(?\\d+)(?:.\\d+)?$'),
+ RE_PASV = /([\d]+),([\d]+),([\d]+),([\d]+),([-\d]+),([-\d]+)/,
+ RE_EOL = /\r?\n/g,
+ RE_WD = /"(.+)"(?: |$)/,
+ RE_SYST = /^([^ ]+)(?: |$)/;
+
+var /*TYPE = {
+ SYNTAX: 0,
+ INFO: 1,
+ SOCKETS: 2,
+ AUTH: 3,
+ UNSPEC: 4,
+ FILESYS: 5
+ },*/
+ RETVAL = {
+ PRELIM: 1,
+ OK: 2,
+ WAITING: 3,
+ ERR_TEMP: 4,
+ ERR_PERM: 5
+ },
+ /*ERRORS = {
+ 421: 'Service not available, closing control connection',
+ 425: 'Can\'t open data connection',
+ 426: 'Connection closed; transfer aborted',
+ 450: 'Requested file action not taken / File unavailable (e.g., file busy)',
+ 451: 'Requested action aborted: local error in processing',
+ 452: 'Requested action not taken / Insufficient storage space in system',
+ 500: 'Syntax error / Command unrecognized',
+ 501: 'Syntax error in parameters or arguments',
+ 502: 'Command not implemented',
+ 503: 'Bad sequence of commands',
+ 504: 'Command not implemented for that parameter',
+ 530: 'Not logged in',
+ 532: 'Need account for storing files',
+ 550: 'Requested action not taken / File unavailable (e.g., file not found, no access)',
+ 551: 'Requested action aborted: page type unknown',
+ 552: 'Requested file action aborted / Exceeded storage allocation (for current directory or dataset)',
+ 553: 'Requested action not taken / File name not allowed'
+ },*/
+ bytesNOOP = new Buffer('NOOP\r\n');
+
+var FTP = module.exports = function() {
+ if (!(this instanceof FTP))
+ return new FTP();
+
+ this._socket = undefined;
+ this._pasvSock = undefined;
+ this._feat = undefined;
+ this._curReq = undefined;
+ this._queue = [];
+ this._secstate = undefined;
+ this._debug = undefined;
+ this._keepalive = undefined;
+ this._ending = false;
+ this._parser = undefined;
+ this.options = {
+ host: undefined,
+ port: undefined,
+ user: undefined,
+ password: undefined,
+ secure: false,
+ secureOptions: undefined,
+ connTimeout: undefined,
+ pasvTimeout: undefined,
+ aliveTimeout: undefined
+ };
+ this.connected = false;
+};
+inherits(FTP, EventEmitter);
+
+FTP.prototype.connect = function(options) {
+ var self = this;
+ if (typeof options !== 'object')
+ options = {};
+ this.connected = false;
+ this.options.host = options.host || 'localhost';
+ this.options.port = options.port || 21;
+ this.options.user = options.user || 'anonymous';
+ this.options.password = options.password || 'anonymous@';
+ this.options.secure = options.secure || false;
+ this.options.secureOptions = options.secureOptions;
+ this.options.connTimeout = options.connTimeout || 10000;
+ this.options.pasvTimeout = options.pasvTimeout || 10000;
+ this.options.aliveTimeout = options.keepalive || 10000;
+
+ if (typeof options.debug === 'function')
+ this._debug = options.debug;
+
+ var secureOptions,
+ debug = this._debug,
+ socket = new Socket();
+
+ socket.setTimeout(0);
+ socket.setKeepAlive(true);
+
+ this._parser = new Parser({ debug: debug });
+ this._parser.on('response', function(code, text) {
+ var retval = code / 100 >> 0;
+ if (retval === RETVAL.ERR_TEMP || retval === RETVAL.ERR_PERM) {
+ if (self._curReq)
+ self._curReq.cb(makeError(code, text), undefined, code);
+ else
+ self.emit('error', makeError(code, text));
+ } else if (self._curReq)
+ self._curReq.cb(undefined, text, code);
+
+ // a hack to signal we're waiting for a PASV data connection to complete
+ // first before executing any more queued requests ...
+ //
+ // also: don't forget our current request if we're expecting another
+ // terminating response ....
+ if (self._curReq && retval !== RETVAL.PRELIM) {
+ self._curReq = undefined;
+ self._send();
+ }
+
+ noopreq.cb();
+ });
+
+ if (this.options.secure) {
+ secureOptions = {};
+ secureOptions.host = this.options.host;
+ for (var k in this.options.secureOptions)
+ secureOptions[k] = this.options.secureOptions[k];
+ secureOptions.socket = socket;
+ this.options.secureOptions = secureOptions;
+ }
+
+ if (this.options.secure === 'implicit')
+ this._socket = tls.connect(secureOptions, onconnect);
+ else {
+ socket.once('connect', onconnect);
+ this._socket = socket;
+ }
+
+ var noopreq = {
+ cmd: 'NOOP',
+ cb: function() {
+ clearTimeout(self._keepalive);
+ self._keepalive = setTimeout(donoop, self.options.aliveTimeout);
+ }
+ };
+
+ function donoop() {
+ if (!self._socket || !self._socket.writable)
+ clearTimeout(self._keepalive);
+ else if (!self._curReq && self._queue.length === 0) {
+ self._curReq = noopreq;
+ debug&&debug('[connection] > NOOP');
+ self._socket.write(bytesNOOP);
+ } else
+ noopreq.cb();
+ }
+
+ function onconnect() {
+ clearTimeout(timer);
+ clearTimeout(self._keepalive);
+ self.connected = true;
+ self._socket = socket; // re-assign for implicit secure connections
+
+ var cmd;
+
+ if (self._secstate) {
+ if (self._secstate === 'upgraded-tls' && self.options.secure === true) {
+ cmd = 'PBSZ';
+ self._send('PBSZ 0', reentry, true);
+ } else {
+ cmd = 'USER';
+ self._send('USER ' + self.options.user, reentry, true);
+ }
+ } else {
+ self._curReq = {
+ cmd: '',
+ cb: reentry
+ };
+ }
+
+ function reentry(err, text, code) {
+ if (err && (!cmd || cmd === 'USER' || cmd === 'PASS' || cmd === 'TYPE')) {
+ self.emit('error', err);
+ return self._socket && self._socket.end();
+ }
+ if ((cmd === 'AUTH TLS' && code !== 234 && self.options.secure !== true)
+ || (cmd === 'AUTH SSL' && code !== 334)
+ || (cmd === 'PBSZ' && code !== 200)
+ || (cmd === 'PROT' && code !== 200)) {
+ self.emit('error', makeError(code, 'Unable to secure connection(s)'));
+ return self._socket && self._socket.end();
+ }
+
+ if (!cmd) {
+ // sometimes the initial greeting can contain useful information
+ // about authorized use, other limits, etc.
+ self.emit('greeting', text);
+
+ if (self.options.secure && self.options.secure !== 'implicit') {
+ cmd = 'AUTH TLS';
+ self._send(cmd, reentry, true);
+ } else {
+ cmd = 'USER';
+ self._send('USER ' + self.options.user, reentry, true);
+ }
+ } else if (cmd === 'USER') {
+ if (code !== 230) {
+ // password required
+ if (!self.options.password) {
+ self.emit('error', makeError(code, 'Password required'));
+ return self._socket && self._socket.end();
+ }
+ cmd = 'PASS';
+ self._send('PASS ' + self.options.password, reentry, true);
+ } else {
+ // no password required
+ cmd = 'PASS';
+ reentry(undefined, text, code);
+ }
+ } else if (cmd === 'PASS') {
+ cmd = 'FEAT';
+ self._send(cmd, reentry, true);
+ } else if (cmd === 'FEAT') {
+ if (!err)
+ self._feat = Parser.parseFeat(text);
+ cmd = 'TYPE';
+ self._send('TYPE I', reentry, true);
+ } else if (cmd === 'TYPE')
+ self.emit('ready');
+ else if (cmd === 'PBSZ') {
+ cmd = 'PROT';
+ self._send('PROT P', reentry, true);
+ } else if (cmd === 'PROT') {
+ cmd = 'USER';
+ self._send('USER ' + self.options.user, reentry, true);
+ } else if (cmd.substr(0, 4) === 'AUTH') {
+ if (cmd === 'AUTH TLS' && code !== 234) {
+ cmd = 'AUTH SSL';
+ return self._send(cmd, reentry, true);
+ } else if (cmd === 'AUTH TLS')
+ self._secstate = 'upgraded-tls';
+ else if (cmd === 'AUTH SSL')
+ self._secstate = 'upgraded-ssl';
+ socket.removeAllListeners('data');
+ socket.removeAllListeners('error');
+ socket._decoder = null;
+ self._curReq = null; // prevent queue from being processed during
+ // TLS/SSL negotiation
+ secureOptions.socket = self._socket;
+ secureOptions.session = undefined;
+ socket = tls.connect(secureOptions, onconnect);
+ socket.setEncoding('binary');
+ socket.on('data', ondata);
+ socket.once('end', onend);
+ socket.on('error', onerror);
+ }
+ }
+ }
+
+ socket.on('data', ondata);
+ function ondata(chunk) {
+ debug&&debug('[connection] < ' + inspect(chunk.toString('binary')));
+ if (self._parser)
+ self._parser.write(chunk);
+ }
+
+ socket.on('error', onerror);
+ function onerror(err) {
+ clearTimeout(timer);
+ clearTimeout(self._keepalive);
+ self.emit('error', err);
+ }
+
+ socket.once('end', onend);
+ function onend() {
+ ondone();
+ self.emit('end');
+ }
+
+ socket.once('close', function(had_err) {
+ ondone();
+ self.emit('close', had_err);
+ });
+
+ var hasReset = false;
+ function ondone() {
+ if (!hasReset) {
+ hasReset = true;
+ clearTimeout(timer);
+ self._reset();
+ }
+ }
+
+ var timer = setTimeout(function() {
+ self.emit('error', new Error('Timeout while connecting to server'));
+ self._socket && self._socket.destroy();
+ self._reset();
+ }, this.options.connTimeout);
+
+ this._socket.connect(this.options.port, this.options.host);
+};
+
+FTP.prototype.end = function() {
+ if (this._queue.length)
+ this._ending = true;
+ else
+ this._reset();
+};
+
+FTP.prototype.destroy = function() {
+ this._reset();
+};
+
+// "Standard" (RFC 959) commands
+FTP.prototype.ascii = function(cb) {
+ return this._send('TYPE A', cb);
+};
+
+FTP.prototype.binary = function(cb) {
+ return this._send('TYPE I', cb);
+};
+
+FTP.prototype.abort = function(immediate, cb) {
+ if (typeof immediate === 'function') {
+ cb = immediate;
+ immediate = true;
+ }
+ if (immediate)
+ this._send('ABOR', cb, true);
+ else
+ this._send('ABOR', cb);
+};
+
+FTP.prototype.cwd = function(path, cb, promote) {
+ this._send('CWD ' + path, function(err, text, code) {
+ if (err)
+ return cb(err);
+ var m = RE_WD.exec(text);
+ cb(undefined, m ? m[1] : undefined);
+ }, promote);
+};
+
+FTP.prototype.delete = function(path, cb) {
+ this._send('DELE ' + path, cb);
+};
+
+FTP.prototype.site = function(cmd, cb) {
+ this._send('SITE ' + cmd, cb);
+};
+
+FTP.prototype.status = function(cb) {
+ this._send('STAT', cb);
+};
+
+FTP.prototype.rename = function(from, to, cb) {
+ var self = this;
+ this._send('RNFR ' + from, function(err) {
+ if (err)
+ return cb(err);
+
+ self._send('RNTO ' + to, cb, true);
+ });
+};
+
+FTP.prototype.logout = function(cb) {
+ this._send('QUIT', cb);
+};
+
+FTP.prototype.listSafe = function(path, zcomp, cb) {
+ if (typeof path === 'string') {
+ var self = this;
+ // store current path
+ this.pwd(function(err, origpath) {
+ if (err) return cb(err);
+ // change to destination path
+ self.cwd(path, function(err) {
+ if (err) return cb(err);
+ // get dir listing
+ self.list(zcomp || false, function(err, list) {
+ // change back to original path
+ if (err) return self.cwd(origpath, cb);
+ self.cwd(origpath, function(err) {
+ if (err) return cb(err);
+ cb(err, list);
+ });
+ });
+ });
+ });
+ } else
+ this.list(path, zcomp, cb);
+};
+
+FTP.prototype.list = function(path, zcomp, cb) {
+ var self = this, cmd;
+
+ if (typeof path === 'function') {
+ // list(function() {})
+ cb = path;
+ path = undefined;
+ cmd = 'LIST';
+ zcomp = false;
+ } else if (typeof path === 'boolean') {
+ // list(true, function() {})
+ cb = zcomp;
+ zcomp = path;
+ path = undefined;
+ cmd = 'LIST';
+ } else if (typeof zcomp === 'function') {
+ // list('/foo', function() {})
+ cb = zcomp;
+ cmd = 'LIST ' + path;
+ zcomp = false;
+ } else
+ cmd = 'LIST ' + path;
+
+ this._pasv(function(err, sock) {
+ if (err)
+ return cb(err);
+
+ if (self._queue[0] && self._queue[0].cmd === 'ABOR') {
+ sock.destroy();
+ return cb();
+ }
+
+ var sockerr, done = false, replies = 0, entries, buffer = '', source = sock;
+
+ if (zcomp) {
+ source = zlib.createInflate();
+ sock.pipe(source);
+ }
+
+ source.on('data', function(chunk) { buffer += chunk.toString('binary'); });
+ source.once('error', function(err) {
+ if (!sock.aborting)
+ sockerr = err;
+ });
+ source.once('end', ondone);
+ source.once('close', ondone);
+
+ function ondone() {
+ done = true;
+ final();
+ }
+ function final() {
+ if (done && replies === 2) {
+ replies = 3;
+ if (sockerr)
+ return cb(new Error('Unexpected data connection error: ' + sockerr));
+ if (sock.aborting)
+ return cb();
+
+ // process received data
+ entries = buffer.split(RE_EOL);
+ entries.pop(); // ending EOL
+ var parsed = [];
+ for (var i = 0, len = entries.length; i < len; ++i) {
+ var parsedVal = Parser.parseListEntry(entries[i]);
+ if (parsedVal !== null)
+ parsed.push(parsedVal);
+ }
+
+ if (zcomp) {
+ self._send('MODE S', function() {
+ cb(undefined, parsed);
+ }, true);
+ } else
+ cb(undefined, parsed);
+ }
+ }
+
+ if (zcomp) {
+ self._send('MODE Z', function(err, text, code) {
+ if (err) {
+ sock.destroy();
+ return cb(makeError(code, 'Compression not supported'));
+ }
+ sendList();
+ }, true);
+ } else
+ sendList();
+
+ function sendList() {
+ // this callback will be executed multiple times, the first is when server
+ // replies with 150 and then a final reply to indicate whether the
+ // transfer was actually a success or not
+ self._send(cmd, function(err, text, code) {
+ if (err) {
+ sock.destroy();
+ if (zcomp) {
+ self._send('MODE S', function() {
+ cb(err);
+ }, true);
+ } else
+ cb(err);
+ return;
+ }
+
+ // some servers may not open a data connection for empty directories
+ if (++replies === 1 && code === 226) {
+ replies = 2;
+ sock.destroy();
+ final();
+ } else if (replies === 2)
+ final();
+ }, true);
+ }
+ });
+};
+
+FTP.prototype.get = function(path, zcomp, cb) {
+ var self = this;
+ if (typeof zcomp === 'function') {
+ cb = zcomp;
+ zcomp = false;
+ }
+
+ this._pasv(function(err, sock) {
+ if (err)
+ return cb(err);
+
+ if (self._queue[0] && self._queue[0].cmd === 'ABOR') {
+ sock.destroy();
+ return cb();
+ }
+
+ // modify behavior of socket events so that we can emit 'error' once for
+ // either a TCP-level error OR an FTP-level error response that we get when
+ // the socket is closed (e.g. the server ran out of space).
+ var sockerr, started = false, lastreply = false, done = false,
+ source = sock;
+
+ if (zcomp) {
+ source = zlib.createInflate();
+ sock.pipe(source);
+ sock._emit = sock.emit;
+ sock.emit = function(ev, arg1) {
+ if (ev === 'error') {
+ if (!sockerr)
+ sockerr = arg1;
+ return;
+ }
+ sock._emit.apply(sock, Array.prototype.slice.call(arguments));
+ };
+ }
+
+ source._emit = source.emit;
+ source.emit = function(ev, arg1) {
+ if (ev === 'error') {
+ if (!sockerr)
+ sockerr = arg1;
+ return;
+ } else if (ev === 'end' || ev === 'close') {
+ if (!done) {
+ done = true;
+ ondone();
+ }
+ return;
+ }
+ source._emit.apply(source, Array.prototype.slice.call(arguments));
+ };
+
+ function ondone() {
+ if (done && lastreply) {
+ self._send('MODE S', function() {
+ source._emit('end');
+ source._emit('close');
+ }, true);
+ }
+ }
+
+ sock.pause();
+
+ if (zcomp) {
+ self._send('MODE Z', function(err, text, code) {
+ if (err) {
+ sock.destroy();
+ return cb(makeError(code, 'Compression not supported'));
+ }
+ sendRetr();
+ }, true);
+ } else
+ sendRetr();
+
+ function sendRetr() {
+ // this callback will be executed multiple times, the first is when server
+ // replies with 150, then a final reply after the data connection closes
+ // to indicate whether the transfer was actually a success or not
+ self._send('RETR ' + path, function(err, text, code) {
+ if (sockerr || err) {
+ sock.destroy();
+ if (!started) {
+ if (zcomp) {
+ self._send('MODE S', function() {
+ cb(sockerr || err);
+ }, true);
+ } else
+ cb(sockerr || err);
+ } else {
+ source._emit('error', sockerr || err);
+ source._emit('close', true);
+ }
+ return;
+ }
+ // server returns 125 when data connection is already open; we treat it
+ // just like a 150
+ if (code === 150 || code === 125) {
+ started = true;
+ cb(undefined, source);
+ sock.resume();
+ } else {
+ lastreply = true;
+ ondone();
+ }
+ }, true);
+ }
+ });
+};
+
+FTP.prototype.put = function(input, path, zcomp, cb) {
+ this._store('STOR ' + path, input, zcomp, cb);
+};
+
+FTP.prototype.append = function(input, path, zcomp, cb) {
+ this._store('APPE ' + path, input, zcomp, cb);
+};
+
+FTP.prototype.pwd = function(cb) { // PWD is optional
+ var self = this;
+ this._send('PWD', function(err, text, code) {
+ if (code === 502) {
+ return self.cwd('.', function(cwderr, cwd) {
+ if (cwderr)
+ return cb(cwderr);
+ if (cwd === undefined)
+ cb(err);
+ else
+ cb(undefined, cwd);
+ }, true);
+ } else if (err)
+ return cb(err);
+ cb(undefined, RE_WD.exec(text)[1]);
+ });
+};
+
+FTP.prototype.cdup = function(cb) { // CDUP is optional
+ var self = this;
+ this._send('CDUP', function(err, text, code) {
+ if (code === 502)
+ self.cwd('..', cb, true);
+ else
+ cb(err);
+ });
+};
+
+FTP.prototype.mkdir = function(path, recursive, cb) { // MKD is optional
+ if (typeof recursive === 'function') {
+ cb = recursive;
+ recursive = false;
+ }
+ if (!recursive)
+ this._send('MKD ' + path, cb);
+ else {
+ var self = this, owd, abs, dirs, dirslen, i = -1, searching = true;
+
+ abs = (path[0] === '/');
+
+ var nextDir = function() {
+ if (++i === dirslen) {
+ // return to original working directory
+ return self._send('CWD ' + owd, cb, true);
+ }
+ if (searching) {
+ self._send('CWD ' + dirs[i], function(err, text, code) {
+ if (code === 550) {
+ searching = false;
+ --i;
+ } else if (err) {
+ // return to original working directory
+ return self._send('CWD ' + owd, function() {
+ cb(err);
+ }, true);
+ }
+ nextDir();
+ }, true);
+ } else {
+ self._send('MKD ' + dirs[i], function(err, text, code) {
+ if (err) {
+ // return to original working directory
+ return self._send('CWD ' + owd, function() {
+ cb(err);
+ }, true);
+ }
+ self._send('CWD ' + dirs[i], nextDir, true);
+ }, true);
+ }
+ };
+ this.pwd(function(err, cwd) {
+ if (err)
+ return cb(err);
+ owd = cwd;
+ if (abs)
+ path = path.substr(1);
+ if (path[path.length - 1] === '/')
+ path = path.substring(0, path.length - 1);
+ dirs = path.split('/');
+ dirslen = dirs.length;
+ if (abs)
+ self._send('CWD /', function(err) {
+ if (err)
+ return cb(err);
+ nextDir();
+ }, true);
+ else
+ nextDir();
+ });
+ }
+};
+
+FTP.prototype.rmdir = function(path, recursive, cb) { // RMD is optional
+ if (typeof recursive === 'function') {
+ cb = recursive;
+ recursive = false;
+ }
+ if (!recursive) {
+ return this._send('RMD ' + path, cb);
+ }
+
+ var self = this;
+ this.list(path, function(err, list) {
+ if (err) return cb(err);
+ var idx = 0;
+
+ // this function will be called once per listing entry
+ var deleteNextEntry;
+ deleteNextEntry = function(err) {
+ if (err) return cb(err);
+ if (idx >= list.length) {
+ if (list[0] && list[0].name === path) {
+ return cb(null);
+ } else {
+ return self.rmdir(path, cb);
+ }
+ }
+
+ var entry = list[idx++];
+
+ // get the path to the file
+ var subpath = null;
+ if (entry.name[0] === '/') {
+ // this will be the case when you call deleteRecursively() and pass
+ // the path to a plain file
+ subpath = entry.name;
+ } else {
+ if (path[path.length - 1] == '/') {
+ subpath = path + entry.name;
+ } else {
+ subpath = path + '/' + entry.name
+ }
+ }
+
+ // delete the entry (recursively) according to its type
+ if (entry.type === 'd') {
+ if (entry.name === "." || entry.name === "..") {
+ return deleteNextEntry();
+ }
+ self.rmdir(subpath, true, deleteNextEntry);
+ } else {
+ self.delete(subpath, deleteNextEntry);
+ }
+ }
+ deleteNextEntry();
+ });
+};
+
+FTP.prototype.system = function(cb) { // SYST is optional
+ this._send('SYST', function(err, text) {
+ if (err)
+ return cb(err);
+ cb(undefined, RE_SYST.exec(text)[1]);
+ });
+};
+
+// "Extended" (RFC 3659) commands
+FTP.prototype.size = function(path, cb) {
+ var self = this;
+ this._send('SIZE ' + path, function(err, text, code) {
+ if (code === 502) {
+ // Note: this may cause a problem as list() is _appended_ to the queue
+ return self.list(path, function(err, list) {
+ if (err)
+ return cb(err);
+ if (list.length === 1)
+ cb(undefined, list[0].size);
+ else {
+ // path could have been a directory and we got a listing of its
+ // contents, but here we echo the behavior of the real SIZE and
+ // return 'File not found' for directories
+ cb(new Error('File not found'));
+ }
+ }, true);
+ } else if (err)
+ return cb(err);
+ cb(undefined, parseInt(text, 10));
+ });
+};
+
+FTP.prototype.lastMod = function(path, cb) {
+ var self = this;
+ this._send('MDTM ' + path, function(err, text, code) {
+ if (code === 502) {
+ return self.list(path, function(err, list) {
+ if (err)
+ return cb(err);
+ if (list.length === 1)
+ cb(undefined, list[0].date);
+ else
+ cb(new Error('File not found'));
+ }, true);
+ } else if (err)
+ return cb(err);
+ var val = XRegExp.exec(text, REX_TIMEVAL), ret;
+ if (!val)
+ return cb(new Error('Invalid date/time format from server'));
+ ret = new Date(val.year + '-' + val.month + '-' + val.date + 'T' + val.hour
+ + ':' + val.minute + ':' + val.second);
+ cb(undefined, ret);
+ });
+};
+
+FTP.prototype.restart = function(offset, cb) {
+ this._send('REST ' + offset, cb);
+};
+
+
+
+// Private/Internal methods
+FTP.prototype._pasv = function(cb) {
+ var self = this, first = true, ip, port;
+ this._send('PASV', function reentry(err, text) {
+ if (err)
+ return cb(err);
+
+ self._curReq = undefined;
+
+ if (first) {
+ var m = RE_PASV.exec(text);
+ if (!m)
+ return cb(new Error('Unable to parse PASV server response'));
+ ip = m[1];
+ ip += '.';
+ ip += m[2];
+ ip += '.';
+ ip += m[3];
+ ip += '.';
+ ip += m[4];
+ port = (parseInt(m[5], 10) * 256) + parseInt(m[6], 10);
+
+ first = false;
+ }
+ self._pasvConnect(ip, port, function(err, sock) {
+ if (err) {
+ // try the IP of the control connection if the server was somehow
+ // misconfigured and gave for example a LAN IP instead of WAN IP over
+ // the Internet
+ if (self._socket && ip !== self._socket.remoteAddress) {
+ ip = self._socket.remoteAddress;
+ return reentry();
+ }
+
+ // automatically abort PASV mode
+ self._send('ABOR', function() {
+ cb(err);
+ self._send();
+ }, true);
+
+ return;
+ }
+ cb(undefined, sock);
+ self._send();
+ });
+ });
+};
+
+FTP.prototype._pasvConnect = function(ip, port, cb) {
+ var self = this,
+ socket = new Socket(),
+ sockerr,
+ timedOut = false,
+ timer = setTimeout(function() {
+ timedOut = true;
+ socket.destroy();
+ cb(new Error('Timed out while making data connection'));
+ }, this.options.pasvTimeout);
+
+ socket.setTimeout(0);
+
+ socket.once('connect', function() {
+ self._debug&&self._debug('[connection] PASV socket connected');
+ if (self.options.secure === true) {
+ self.options.secureOptions.socket = socket;
+ self.options.secureOptions.session = self._socket.getSession();
+ //socket.removeAllListeners('error');
+ socket = tls.connect(self.options.secureOptions);
+ //socket.once('error', onerror);
+ socket.setTimeout(0);
+ }
+ clearTimeout(timer);
+ self._pasvSocket = socket;
+ cb(undefined, socket);
+ });
+ socket.once('error', onerror);
+ function onerror(err) {
+ sockerr = err;
+ }
+ socket.once('end', function() {
+ clearTimeout(timer);
+ });
+ socket.once('close', function(had_err) {
+ clearTimeout(timer);
+ if (!self._pasvSocket && !timedOut) {
+ var errmsg = 'Unable to make data connection';
+ if (sockerr) {
+ errmsg += '( ' + sockerr + ')';
+ sockerr = undefined;
+ }
+ cb(new Error(errmsg));
+ }
+ self._pasvSocket = undefined;
+ });
+
+ socket.connect(port, ip);
+};
+
+FTP.prototype._store = function(cmd, input, zcomp, cb) {
+ var isBuffer = Buffer.isBuffer(input);
+
+ if (!isBuffer && input.pause !== undefined)
+ input.pause();
+
+ if (typeof zcomp === 'function') {
+ cb = zcomp;
+ zcomp = false;
+ }
+
+ var self = this;
+ this._pasv(function(err, sock) {
+ if (err)
+ return cb(err);
+
+ if (self._queue[0] && self._queue[0].cmd === 'ABOR') {
+ sock.destroy();
+ return cb();
+ }
+
+ var sockerr, dest = sock;
+ sock.once('error', function(err) {
+ sockerr = err;
+ });
+
+ if (zcomp) {
+ self._send('MODE Z', function(err, text, code) {
+ if (err) {
+ sock.destroy();
+ return cb(makeError(code, 'Compression not supported'));
+ }
+ // draft-preston-ftpext-deflate-04 says min of 8 should be supported
+ dest = zlib.createDeflate({ level: 8 });
+ dest.pipe(sock);
+ sendStore();
+ }, true);
+ } else
+ sendStore();
+
+ function sendStore() {
+ // this callback will be executed multiple times, the first is when server
+ // replies with 150, then a final reply after the data connection closes
+ // to indicate whether the transfer was actually a success or not
+ self._send(cmd, function(err, text, code) {
+ if (sockerr || err) {
+ if (zcomp) {
+ self._send('MODE S', function() {
+ cb(sockerr || err);
+ }, true);
+ } else
+ cb(sockerr || err);
+ return;
+ }
+
+ if (code === 150 || code === 125) {
+ if (isBuffer)
+ dest.end(input);
+ else if (typeof input === 'string') {
+ // check if input is a file path or just string data to store
+ fs.stat(input, function(err, stats) {
+ if (err)
+ dest.end(input);
+ else
+ fs.createReadStream(input).pipe(dest);
+ });
+ } else {
+ input.pipe(dest);
+ input.resume();
+ }
+ } else {
+ if (zcomp)
+ self._send('MODE S', cb, true);
+ else
+ cb();
+ }
+ }, true);
+ }
+ });
+};
+
+FTP.prototype._send = function(cmd, cb, promote) {
+ clearTimeout(this._keepalive);
+ if (cmd !== undefined) {
+ if (promote)
+ this._queue.unshift({ cmd: cmd, cb: cb });
+ else
+ this._queue.push({ cmd: cmd, cb: cb });
+ }
+ var queueLen = this._queue.length;
+ if (!this._curReq && queueLen && this._socket && this._socket.readable) {
+ this._curReq = this._queue.shift();
+ if (this._curReq.cmd === 'ABOR' && this._pasvSocket)
+ this._pasvSocket.aborting = true;
+ this._debug&&this._debug('[connection] > ' + inspect(this._curReq.cmd));
+ this._socket.write(this._curReq.cmd + '\r\n');
+ } else if (!this._curReq && !queueLen && this._ending)
+ this._reset();
+};
+
+FTP.prototype._reset = function() {
+ if (this._pasvSock && this._pasvSock.writable)
+ this._pasvSock.end();
+ if (this._socket && this._socket.writable)
+ this._socket.end();
+ this._socket = undefined;
+ this._pasvSock = undefined;
+ this._feat = undefined;
+ this._curReq = undefined;
+ this._secstate = undefined;
+ clearTimeout(this._keepalive);
+ this._keepalive = undefined;
+ this._queue = [];
+ this._ending = false;
+ this._parser = undefined;
+ this.options.host = this.options.port = this.options.user
+ = this.options.password = this.options.secure
+ = this.options.connTimeout = this.options.pasvTimeout
+ = this.options.keepalive = this._debug = undefined;
+ this.connected = false;
+};
+
+// Utility functions
+function makeError(code, text) {
+ var err = new Error(text);
+ err.code = code;
+ return err;
+}
diff --git a/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/lib/parser.js b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/lib/parser.js
new file mode 100644
index 0000000..16af51b
--- /dev/null
+++ b/tests/node_modules/nightwatch/node_modules/proxy-agent/node_modules/pac-proxy-agent/node_modules/get-uri/node_modules/ftp/lib/parser.js
@@ -0,0 +1,216 @@
+var WritableStream = require('stream').Writable
+ || require('readable-stream').Writable,
+ inherits = require('util').inherits,
+ inspect = require('util').inspect;
+
+var XRegExp = require('xregexp').XRegExp;
+
+var REX_LISTUNIX = XRegExp.cache('^(?[\\-ld])(?([\\-r][\\-w][\\-xstT]){3})(?(\\+))?\\s+(?\\d+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)\\s+(?((?\\w{3})\\s+(?\\d{1,2})\\s+(?\\d{1,2}):(?\\d{2}))|((?\\w{3})\\s+(?\\d{1,2})\\s+(?\\d{4})))\\s+(?.+)$'),
+ REX_LISTMSDOS = XRegExp.cache('^(?\\d{2})(?:\\-|\\/)(?\\d{2})(?:\\-|\\/)(?\\d{2,4})\\s+(?\\d{2}):(?\\d{2})\\s{0,1}(?[AaMmPp]{1,2})\\s+(?:(?\\d+)|(?\\))\\s+(?