added unit testing, and started implementing unit tests...phew
This commit is contained in:
24
node_modules/assertion-error/History.md
generated
vendored
Normal file
24
node_modules/assertion-error/History.md
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
1.1.0 / 2018-01-02
|
||||
==================
|
||||
|
||||
* Add type definitions ([#11](https://github.com/chaijs/assertion-error/pull/11))
|
||||
|
||||
1.0.1 / 2015-03-04
|
||||
==================
|
||||
|
||||
* Merge pull request #2 from simonzack/master
|
||||
* fixes `.stack` on firefox
|
||||
|
||||
1.0.0 / 2013-06-08
|
||||
==================
|
||||
|
||||
* readme: change travis and component urls
|
||||
* refactor: [*] prepare for move to chaijs gh org
|
||||
|
||||
0.1.0 / 2013-04-07
|
||||
==================
|
||||
|
||||
* test: use vanilla test runner/assert
|
||||
* pgk: remove unused deps
|
||||
* lib: implement
|
||||
* "Initial commit"
|
41
node_modules/assertion-error/README.md
generated
vendored
Normal file
41
node_modules/assertion-error/README.md
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
# AssertionError [](https://travis-ci.org/chaijs/assertion-error)
|
||||
|
||||
> Error constructor for test and validation frameworks that implements standardized AssertionError specification.
|
||||
|
||||
## Installation
|
||||
|
||||
### Node.js
|
||||
|
||||
`assertion-error` is available on [npm](http://npmjs.org).
|
||||
|
||||
$ npm install assertion-error
|
||||
|
||||
### Component
|
||||
|
||||
`assertion-error` is available as a [component](https://github.com/component/component).
|
||||
|
||||
$ component install chaijs/assertion-error
|
||||
|
||||
## License
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2013 Jake Luer <jake@qualiancy.com> (http://qualiancy.com)
|
||||
|
||||
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.
|
11
node_modules/assertion-error/index.d.ts
generated
vendored
Normal file
11
node_modules/assertion-error/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
type AssertionError<T = {}> = Error & T & {
|
||||
showDiff: boolean;
|
||||
};
|
||||
|
||||
interface AssertionErrorConstructor {
|
||||
new<T = {}>(message: string, props?: T, ssf?: Function): AssertionError<T>;
|
||||
}
|
||||
|
||||
declare const AssertionError: AssertionErrorConstructor;
|
||||
|
||||
export = AssertionError;
|
116
node_modules/assertion-error/index.js
generated
vendored
Normal file
116
node_modules/assertion-error/index.js
generated
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
/*!
|
||||
* assertion-error
|
||||
* Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Return a function that will copy properties from
|
||||
* one object to another excluding any originally
|
||||
* listed. Returned function will create a new `{}`.
|
||||
*
|
||||
* @param {String} excluded properties ...
|
||||
* @return {Function}
|
||||
*/
|
||||
|
||||
function exclude () {
|
||||
var excludes = [].slice.call(arguments);
|
||||
|
||||
function excludeProps (res, obj) {
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
if (!~excludes.indexOf(key)) res[key] = obj[key];
|
||||
});
|
||||
}
|
||||
|
||||
return function extendExclude () {
|
||||
var args = [].slice.call(arguments)
|
||||
, i = 0
|
||||
, res = {};
|
||||
|
||||
for (; i < args.length; i++) {
|
||||
excludeProps(res, args[i]);
|
||||
}
|
||||
|
||||
return res;
|
||||
};
|
||||
};
|
||||
|
||||
/*!
|
||||
* Primary Exports
|
||||
*/
|
||||
|
||||
module.exports = AssertionError;
|
||||
|
||||
/**
|
||||
* ### AssertionError
|
||||
*
|
||||
* An extension of the JavaScript `Error` constructor for
|
||||
* assertion and validation scenarios.
|
||||
*
|
||||
* @param {String} message
|
||||
* @param {Object} properties to include (optional)
|
||||
* @param {callee} start stack function (optional)
|
||||
*/
|
||||
|
||||
function AssertionError (message, _props, ssf) {
|
||||
var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON')
|
||||
, props = extend(_props || {});
|
||||
|
||||
// default values
|
||||
this.message = message || 'Unspecified AssertionError';
|
||||
this.showDiff = false;
|
||||
|
||||
// copy from properties
|
||||
for (var key in props) {
|
||||
this[key] = props[key];
|
||||
}
|
||||
|
||||
// capture stack trace
|
||||
ssf = ssf || AssertionError;
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, ssf);
|
||||
} else {
|
||||
try {
|
||||
throw new Error();
|
||||
} catch(e) {
|
||||
this.stack = e.stack;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Inherit from Error.prototype
|
||||
*/
|
||||
|
||||
AssertionError.prototype = Object.create(Error.prototype);
|
||||
|
||||
/*!
|
||||
* Statically set name
|
||||
*/
|
||||
|
||||
AssertionError.prototype.name = 'AssertionError';
|
||||
|
||||
/*!
|
||||
* Ensure correct constructor
|
||||
*/
|
||||
|
||||
AssertionError.prototype.constructor = AssertionError;
|
||||
|
||||
/**
|
||||
* Allow errors to be converted to JSON for static transfer.
|
||||
*
|
||||
* @param {Boolean} include stack (default: `true`)
|
||||
* @return {Object} object that can be `JSON.stringify`
|
||||
*/
|
||||
|
||||
AssertionError.prototype.toJSON = function (stack) {
|
||||
var extend = exclude('constructor', 'toJSON', 'stack')
|
||||
, props = extend({ name: this.name }, this);
|
||||
|
||||
// include stack if exists and not turned off
|
||||
if (false !== stack && this.stack) {
|
||||
props.stack = this.stack;
|
||||
}
|
||||
|
||||
return props;
|
||||
};
|
62
node_modules/assertion-error/package.json
generated
vendored
Normal file
62
node_modules/assertion-error/package.json
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"_from": "assertion-error@^1.1.0",
|
||||
"_id": "assertion-error@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
|
||||
"_location": "/assertion-error",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "assertion-error@^1.1.0",
|
||||
"name": "assertion-error",
|
||||
"escapedName": "assertion-error",
|
||||
"rawSpec": "^1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/chai"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
|
||||
"_shasum": "e60b6b0e8f301bd97e5375215bda406c85118c0b",
|
||||
"_spec": "assertion-error@^1.1.0",
|
||||
"_where": "/Users/josh.burman/Projects/braid/node_modules/chai",
|
||||
"author": {
|
||||
"name": "Jake Luer",
|
||||
"email": "jake@qualiancy.com",
|
||||
"url": "http://qualiancy.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chaijs/assertion-error/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Error constructor for test and validation frameworks that implements standardized AssertionError specification.",
|
||||
"devDependencies": {
|
||||
"component": "*",
|
||||
"typescript": "^2.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"homepage": "https://github.com/chaijs/assertion-error#readme",
|
||||
"keywords": [
|
||||
"test",
|
||||
"assertion",
|
||||
"assertion-error"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./index",
|
||||
"name": "assertion-error",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/chaijs/assertion-error.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "make test"
|
||||
},
|
||||
"types": "./index.d.ts",
|
||||
"version": "1.1.0"
|
||||
}
|
Reference in New Issue
Block a user