Socket
Socket
Sign inDemoInstall

expect

Package Overview
Dependencies
3
Maintainers
1
Versions
236
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.14.0 to 1.15.0

3

CHANGES.md
## [v1.14.0]
> Feb 1, 2015
- Added `toBeGreaterThanOrEqualTo` and `toBeLessThanOrEqualTo` ([#11] and [#59])
- Added `spy.reset()` ([#57])

@@ -8,2 +10,3 @@ [v1.14.0]: https://github.com/mjackson/expect/compare/v1.13.4...v1.14.0

[#59]: https://github.com/mjackson/expect/issues/59
[#57]: https://github.com/mjackson/expect/pull/57

@@ -10,0 +13,0 @@ ## [v1.13.4]

13

lib/assert.js
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _objectInspect = require('object-inspect');

@@ -11,2 +11,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function assert(condition, messageFormat) {

@@ -22,7 +24,6 @@ for (var _len = arguments.length, extraArgs = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {

throw new Error(messageFormat.replace(/%s/g, function () {
return _objectInspect2['default'](extraArgs[index++]);
return (0, _objectInspect2.default)(extraArgs[index++]);
}));
}
exports['default'] = assert;
module.exports = exports['default'];
exports.default = assert;
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _isEqual = require('is-equal');

@@ -25,2 +25,6 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**

@@ -32,3 +36,3 @@ * An Expectation is a wrapper around an assertion that allows it to be written

var Expectation = (function () {
var Expectation = function () {
function Expectation(actual) {

@@ -39,3 +43,3 @@ _classCallCheck(this, Expectation);

if (_TestUtils.isFunction(actual)) {
if ((0, _TestUtils.isFunction)(actual)) {
this.context = null;

@@ -46,228 +50,253 @@ this.args = [];

Expectation.prototype.toExist = function toExist(message) {
_assert2['default'](this.actual, message || 'Expected %s to exist', this.actual);
_createClass(Expectation, [{
key: 'toExist',
value: function toExist(message) {
(0, _assert2.default)(this.actual, message || 'Expected %s to exist', this.actual);
return this;
};
return this;
}
}, {
key: 'toNotExist',
value: function toNotExist(message) {
(0, _assert2.default)(!this.actual, message || 'Expected %s to not exist', this.actual);
Expectation.prototype.toNotExist = function toNotExist(message) {
_assert2['default'](!this.actual, message || 'Expected %s to not exist', this.actual);
return this;
}
}, {
key: 'toBe',
value: function toBe(value, message) {
(0, _assert2.default)(this.actual === value, message || 'Expected %s to be %s', this.actual, value);
return this;
};
return this;
}
}, {
key: 'toNotBe',
value: function toNotBe(value, message) {
(0, _assert2.default)(this.actual !== value, message || 'Expected %s to not be %s', this.actual, value);
Expectation.prototype.toBe = function toBe(value, message) {
_assert2['default'](this.actual === value, message || 'Expected %s to be %s', this.actual, value);
return this;
}
}, {
key: 'toEqual',
value: function toEqual(value, message) {
try {
(0, _assert2.default)((0, _isEqual2.default)(this.actual, value), message || 'Expected %s to equal %s', this.actual, value);
} catch (e) {
// These attributes are consumed by Mocha to produce a diff output.
e.showDiff = true;
e.actual = this.actual;
e.expected = value;
throw e;
}
return this;
};
return this;
}
}, {
key: 'toNotEqual',
value: function toNotEqual(value, message) {
(0, _assert2.default)(!(0, _isEqual2.default)(this.actual, value), message || 'Expected %s to not equal %s', this.actual, value);
Expectation.prototype.toNotBe = function toNotBe(value, message) {
_assert2['default'](this.actual !== value, message || 'Expected %s to not be %s', this.actual, value);
return this;
}
}, {
key: 'toThrow',
value: function toThrow(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).toThrow() must be a function, %s was given', this.actual);
return this;
};
(0, _assert2.default)((0, _TestUtils.functionThrows)(this.actual, this.context, this.args, value), message || 'Expected %s to throw %s', this.actual, value || 'an error');
Expectation.prototype.toEqual = function toEqual(value, message) {
try {
_assert2['default'](_isEqual2['default'](this.actual, value), message || 'Expected %s to equal %s', this.actual, value);
} catch (e) {
// These attributes are consumed by Mocha to produce a diff output.
e.showDiff = true;
e.actual = this.actual;
e.expected = value;
throw e;
return this;
}
}, {
key: 'toNotThrow',
value: function toNotThrow(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given', this.actual);
return this;
};
(0, _assert2.default)(!(0, _TestUtils.functionThrows)(this.actual, this.context, this.args, value), message || 'Expected %s to not throw %s', this.actual, value || 'an error');
Expectation.prototype.toNotEqual = function toNotEqual(value, message) {
_assert2['default'](!_isEqual2['default'](this.actual, value), message || 'Expected %s to not equal %s', this.actual, value);
return this;
}
}, {
key: 'toBeA',
value: function toBeA(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(value) || typeof value === 'string', 'The "value" argument in toBeA(value) must be a function or a string');
return this;
};
(0, _assert2.default)((0, _TestUtils.isA)(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
Expectation.prototype.toThrow = function toThrow(value, message) {
_assert2['default'](_TestUtils.isFunction(this.actual), 'The "actual" argument in expect(actual).toThrow() must be a function, %s was given', this.actual);
return this;
}
}, {
key: 'toNotBeA',
value: function toNotBeA(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(value) || typeof value === 'string', 'The "value" argument in toNotBeA(value) must be a function or a string');
_assert2['default'](_TestUtils.functionThrows(this.actual, this.context, this.args, value), message || 'Expected %s to throw %s', this.actual, value || 'an error');
(0, _assert2.default)(!(0, _TestUtils.isA)(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
return this;
};
return this;
}
}, {
key: 'toMatch',
value: function toMatch(pattern, message) {
(0, _assert2.default)(typeof this.actual === 'string', 'The "actual" argument in expect(actual).toMatch() must be a string');
Expectation.prototype.toNotThrow = function toNotThrow(value, message) {
_assert2['default'](_TestUtils.isFunction(this.actual), 'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given', this.actual);
(0, _assert2.default)((0, _isRegex2.default)(pattern), 'The "value" argument in toMatch(value) must be a RegExp');
_assert2['default'](!_TestUtils.functionThrows(this.actual, this.context, this.args, value), message || 'Expected %s to not throw %s', this.actual, value || 'an error');
(0, _assert2.default)(pattern.test(this.actual), message || 'Expected %s to match %s', this.actual, pattern);
return this;
};
return this;
}
}, {
key: 'toNotMatch',
value: function toNotMatch(pattern, message) {
(0, _assert2.default)(typeof this.actual === 'string', 'The "actual" argument in expect(actual).toNotMatch() must be a string');
Expectation.prototype.toBeA = function toBeA(value, message) {
_assert2['default'](_TestUtils.isFunction(value) || typeof value === 'string', 'The "value" argument in toBeA(value) must be a function or a string');
(0, _assert2.default)((0, _isRegex2.default)(pattern), 'The "value" argument in toNotMatch(value) must be a RegExp');
_assert2['default'](_TestUtils.isA(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
(0, _assert2.default)(!pattern.test(this.actual), message || 'Expected %s to not match %s', this.actual, pattern);
return this;
};
return this;
}
}, {
key: 'toBeLessThan',
value: function toBeLessThan(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThan() must be a number');
Expectation.prototype.toNotBeA = function toNotBeA(value, message) {
_assert2['default'](_TestUtils.isFunction(value) || typeof value === 'string', 'The "value" argument in toNotBeA(value) must be a function or a string');
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeLessThan(value) must be a number');
_assert2['default'](!_TestUtils.isA(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
(0, _assert2.default)(this.actual < value, message || 'Expected %s to be less than %s', this.actual, value);
return this;
};
return this;
}
}, {
key: 'toBeLessThanOrEqualTo',
value: function toBeLessThanOrEqualTo(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number');
Expectation.prototype.toMatch = function toMatch(pattern, message) {
_assert2['default'](typeof this.actual === 'string', 'The "actual" argument in expect(actual).toMatch() must be a string');
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeLessThanOrEqualTo(value) must be a number');
_assert2['default'](_isRegex2['default'](pattern), 'The "value" argument in toMatch(value) must be a RegExp');
(0, _assert2.default)(this.actual <= value, message || 'Expected %s to be less than or equal to %s', this.actual, value);
_assert2['default'](pattern.test(this.actual), message || 'Expected %s to match %s', this.actual, pattern);
return this;
}
}, {
key: 'toBeGreaterThan',
value: function toBeGreaterThan(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThan() must be a number');
return this;
};
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeGreaterThan(value) must be a number');
Expectation.prototype.toNotMatch = function toNotMatch(pattern, message) {
_assert2['default'](typeof this.actual === 'string', 'The "actual" argument in expect(actual).toNotMatch() must be a string');
(0, _assert2.default)(this.actual > value, message || 'Expected %s to be greater than %s', this.actual, value);
_assert2['default'](_isRegex2['default'](pattern), 'The "value" argument in toNotMatch(value) must be a RegExp');
return this;
}
}, {
key: 'toBeGreaterThanOrEqualTo',
value: function toBeGreaterThanOrEqualTo(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number');
_assert2['default'](!pattern.test(this.actual), message || 'Expected %s to not match %s', this.actual, pattern);
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number');
return this;
};
(0, _assert2.default)(this.actual >= value, message || 'Expected %s to be greater than or equal to %s', this.actual, value);
Expectation.prototype.toBeLessThan = function toBeLessThan(value, message) {
_assert2['default'](typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThan() must be a number');
return this;
}
}, {
key: 'toInclude',
value: function toInclude(value, compareValues, message) {
(0, _assert2.default)((0, _TestUtils.isArray)(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toInclude() must be an array or a string');
_assert2['default'](typeof value === 'number', 'The "value" argument in toBeLessThan(value) must be a number');
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
}
_assert2['default'](this.actual < value, message || 'Expected %s to be less than %s', this.actual, value);
message = message || 'Expected %s to include %s';
return this;
};
if ((0, _TestUtils.isArray)(this.actual)) {
(0, _assert2.default)((0, _TestUtils.arrayContains)(this.actual, value, compareValues), message, this.actual, value);
} else {
(0, _assert2.default)((0, _TestUtils.stringContains)(this.actual, value), message, this.actual, value);
}
Expectation.prototype.toBeLessThanOrEqualTo = function toBeLessThanOrEqualTo(value, message) {
_assert2['default'](typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number');
return this;
}
}, {
key: 'toExclude',
value: function toExclude(value, compareValues, message) {
(0, _assert2.default)((0, _TestUtils.isArray)(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toExclude() must be an array or a string');
_assert2['default'](typeof value === 'number', 'The "value" argument in toBeLessThanOrEqualTo(value) must be a number');
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
}
_assert2['default'](this.actual <= value, message || 'Expected %s to be less than or equal to %s', this.actual, value);
message = message || 'Expected %s to exclude %s';
return this;
};
if ((0, _TestUtils.isArray)(this.actual)) {
(0, _assert2.default)(!(0, _TestUtils.arrayContains)(this.actual, value, compareValues), message, this.actual, value);
} else {
(0, _assert2.default)(!(0, _TestUtils.stringContains)(this.actual, value), message, this.actual, value);
}
Expectation.prototype.toBeGreaterThan = function toBeGreaterThan(value, message) {
_assert2['default'](typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThan() must be a number');
return this;
}
}, {
key: 'toHaveBeenCalled',
value: function toHaveBeenCalled(message) {
var spy = this.actual;
_assert2['default'](typeof value === 'number', 'The "value" argument in toBeGreaterThan(value) must be a number');
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy');
_assert2['default'](this.actual > value, message || 'Expected %s to be greater than %s', this.actual, value);
(0, _assert2.default)(spy.calls.length > 0, message || 'spy was not called');
return this;
};
return this;
}
}, {
key: 'toHaveBeenCalledWith',
value: function toHaveBeenCalledWith() {
var spy = this.actual;
Expectation.prototype.toBeGreaterThanOrEqualTo = function toBeGreaterThanOrEqualTo(value, message) {
_assert2['default'](typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number');
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy');
_assert2['default'](typeof value === 'number', 'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number');
var expectedArgs = Array.prototype.slice.call(arguments, 0);
_assert2['default'](this.actual >= value, message || 'Expected %s to be greater than or equal to %s', this.actual, value);
(0, _assert2.default)(spy.calls.some(function (call) {
return (0, _isEqual2.default)(call.arguments, expectedArgs);
}), 'spy was never called with %s', expectedArgs);
return this;
};
return this;
}
}, {
key: 'toNotHaveBeenCalled',
value: function toNotHaveBeenCalled(message) {
var spy = this.actual;
Expectation.prototype.toInclude = function toInclude(value, compareValues, message) {
_assert2['default'](_TestUtils.isArray(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toInclude() must be an array or a string');
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy');
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
}
(0, _assert2.default)(spy.calls.length === 0, message || 'spy was not supposed to be called');
message = message || 'Expected %s to include %s';
if (_TestUtils.isArray(this.actual)) {
_assert2['default'](_TestUtils.arrayContains(this.actual, value, compareValues), message, this.actual, value);
} else {
_assert2['default'](_TestUtils.stringContains(this.actual, value), message, this.actual, value);
return this;
}
}, {
key: 'withContext',
value: function withContext(context) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
return this;
};
this.context = context;
Expectation.prototype.toExclude = function toExclude(value, compareValues, message) {
_assert2['default'](_TestUtils.isArray(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toExclude() must be an array or a string');
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
return this;
}
}, {
key: 'withArgs',
value: function withArgs() {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
message = message || 'Expected %s to exclude %s';
if (arguments.length) this.args = this.args.concat(Array.prototype.slice.call(arguments, 0));
if (_TestUtils.isArray(this.actual)) {
_assert2['default'](!_TestUtils.arrayContains(this.actual, value, compareValues), message, this.actual, value);
} else {
_assert2['default'](!_TestUtils.stringContains(this.actual, value), message, this.actual, value);
return this;
}
}]);
return this;
};
Expectation.prototype.toHaveBeenCalled = function toHaveBeenCalled(message) {
var spy = this.actual;
_assert2['default'](_SpyUtils.isSpy(spy), 'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy');
_assert2['default'](spy.calls.length > 0, message || 'spy was not called');
return this;
};
Expectation.prototype.toHaveBeenCalledWith = function toHaveBeenCalledWith() {
var spy = this.actual;
_assert2['default'](_SpyUtils.isSpy(spy), 'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy');
var expectedArgs = Array.prototype.slice.call(arguments, 0);
_assert2['default'](spy.calls.some(function (call) {
return _isEqual2['default'](call.arguments, expectedArgs);
}), 'spy was never called with %s', expectedArgs);
return this;
};
Expectation.prototype.toNotHaveBeenCalled = function toNotHaveBeenCalled(message) {
var spy = this.actual;
_assert2['default'](_SpyUtils.isSpy(spy), 'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy');
_assert2['default'](spy.calls.length === 0, message || 'spy was not supposed to be called');
return this;
};
Expectation.prototype.withContext = function withContext(context) {
_assert2['default'](_TestUtils.isFunction(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
this.context = context;
return this;
};
Expectation.prototype.withArgs = function withArgs() {
_assert2['default'](_TestUtils.isFunction(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
if (arguments.length) this.args = this.args.concat(Array.prototype.slice.call(arguments, 0));
return this;
};
return Expectation;
})();
}();

@@ -287,3 +316,2 @@ var aliases = {

Expectation.prototype[alias] = Expectation.prototype[aliases[alias]];
}exports['default'] = Expectation;
module.exports = exports['default'];
}exports.default = Expectation;
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _Expectation = require('./Expectation');

@@ -11,2 +11,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Extensions = [];

@@ -19,3 +21,3 @@

for (var p in extension) {
if (extension.hasOwnProperty(p)) _Expectation2['default'].prototype[p] = extension[p];
if (extension.hasOwnProperty(p)) _Expectation2.default.prototype[p] = extension[p];
}

@@ -25,3 +27,2 @@ }

exports['default'] = extend;
module.exports = exports['default'];
exports.default = extend;
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.restoreSpies = exports.isSpy = exports.spyOn = exports.createSpy = exports.extend = exports.assert = undefined;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _Expectation = require('./Expectation');

@@ -21,14 +22,31 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* eslint-disable no-console */
function expect(actual) {
return new _Expectation2['default'](actual);
return new _Expectation2.default(actual);
}
expect.createSpy = _SpyUtils.createSpy;
expect.spyOn = _SpyUtils.spyOn;
expect.isSpy = _SpyUtils.isSpy;
expect.restoreSpies = _SpyUtils.restoreSpies;
expect.assert = _assert2['default'];
expect.extend = _extend2['default'];
function addDeprecatedExport(name, fn) {
expect[name] = function () {
console.warn('Calling expect.' + name + ' directly is deprecated; import { ' + name + ' } from "expect" instead');
return fn.apply(undefined, arguments);
};
}
exports['default'] = expect;
module.exports = exports['default'];
addDeprecatedExport('assert', _assert2.default);
addDeprecatedExport('extend', _extend2.default);
addDeprecatedExport('createSpy', _SpyUtils.createSpy);
addDeprecatedExport('spyOn', _SpyUtils.spyOn);
addDeprecatedExport('isSpy', _SpyUtils.isSpy);
addDeprecatedExport('restoreSpies', _SpyUtils.restoreSpies);
exports.default = expect;
exports.assert = _assert2.default;
exports.extend = _extend2.default;
exports.createSpy = _SpyUtils.createSpy;
exports.spyOn = _SpyUtils.spyOn;
exports.isSpy = _SpyUtils.isSpy;
exports.restoreSpies = _SpyUtils.restoreSpies;
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createSpy = createSpy;

@@ -9,4 +11,2 @@ exports.spyOn = spyOn;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _assert = require('./assert');

@@ -18,2 +18,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function noop() {}

@@ -28,7 +30,7 @@

_assert2['default'](_TestUtils.isFunction(fn), 'createSpy needs a function');
(0, _assert2.default)((0, _TestUtils.isFunction)(fn), 'createSpy needs a function');
var targetFn = undefined,
thrownValue = undefined,
returnValue = undefined;
var targetFn = void 0,
thrownValue = void 0,
returnValue = void 0;

@@ -90,3 +92,3 @@ var spy = function spy() {

if (!isSpy(original)) {
_assert2['default'](_TestUtils.isFunction(original), 'Cannot spyOn the %s property; it is not a function', methodName);
(0, _assert2.default)((0, _TestUtils.isFunction)(original), 'Cannot spyOn the %s property; it is not a function', methodName);

@@ -93,0 +95,0 @@ object[methodName] = createSpy(original, function () {

'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
exports.functionThrows = functionThrows;

@@ -11,4 +16,2 @@ exports.arrayContains = arrayContains;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isEqual = require('is-equal');

@@ -22,2 +25,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**

@@ -32,3 +37,2 @@ * Returns true if the given function throws the given value

*/
function functionThrows(fn, context, args, value) {

@@ -45,3 +49,3 @@ try {

if (typeof message === 'string') {
if (_isRegex2['default'](value) && value.test(error.message)) return true;
if ((0, _isRegex2.default)(value) && value.test(error.message)) return true;

@@ -60,5 +64,4 @@ if (typeof value === 'string' && message.indexOf(value) !== -1) return true;

*/
function arrayContains(array, value, compareValues) {
if (compareValues == null) compareValues = _isEqual2['default'];
if (compareValues == null) compareValues = _isEqual2.default;

@@ -73,3 +76,2 @@ return array.some(function (item) {

*/
function stringContains(string, value) {

@@ -82,3 +84,2 @@ return string.indexOf(value) !== -1;

*/
function isArray(object) {

@@ -91,3 +92,2 @@ return Array.isArray(object);

*/
function isFunction(object) {

@@ -101,3 +101,2 @@ return typeof object === 'function';

*/
function isA(object, value) {

@@ -108,3 +107,3 @@ if (isFunction(value)) return object instanceof value;

return typeof object === value;
return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === value;
}
{
"name": "expect",
"version": "1.14.0",
"version": "1.15.0",
"description": "Write better assertions",
"main": "lib/index",
"author": "Michael Jackson",
"license": "MIT",
"main": "lib",
"files": [
"lib",
"umd"
],
"dependencies": {

@@ -12,7 +18,9 @@ "is-equal": "^1.4.2",

"devDependencies": {
"babel": "^5.4.7",
"babel-core": "^5.4.7",
"babel-eslint": "^4.1.1",
"babel-loader": "^5.0.0",
"eslint": "^1.3.1",
"babel-cli": "^6.6.5",
"babel-eslint": "^5.0.0",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"eslint": "2.2.0",
"eslint-config-airbnb": "^6.1.0",
"eslint-plugin-react": "^4.2.1",
"gzip-size": "^3.0.0",

@@ -28,6 +36,8 @@ "karma": "^0.13.3",

"pretty-bytes": "^2.0.1",
"readline-sync": "^1.4.1",
"webpack": "^1.4.13"
},
"scripts": {
"build": "babel ./modules -d lib --stage 0 --loose all --ignore '__tests__'",
"build": "node ./scripts/build.js",
"build-cjs": "babel ./modules -d lib --ignore '__tests__'",
"build-umd": "NODE_ENV=production webpack modules/index.js umd/expect.js",

@@ -37,3 +47,3 @@ "build-min": "NODE_ENV=production webpack -p modules/index.js umd/expect.min.js",

"test": "npm run lint && karma start",
"postinstall": "node ./npm-scripts/postinstall.js"
"release": "node ./scripts/release.js"
},

@@ -46,12 +56,6 @@ "keywords": [

],
"author": "Michael Jackson",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/mjackson/expect.git"
},
"bugs": {
"url": "https://github.com/mjackson/expect/issues"
},
"homepage": "https://github.com/mjackson/expect"
"url": "https://github.com/mjackson/expect.git"
}
}

@@ -11,4 +11,6 @@ # expect [![Travis][build-badge]][build] [![npm package][npm-badge]][npm]

When you use expect, you write assertions similarly to how you would say them, e.g. "I expect this value to be equal to 3" or "I expect this array to contain 3". When you write assertions in this way, you don't need to remember the order of actual and expected arguments to functions like `assert.equal`, which helps you write better tests.
When you use `expect`, you write assertions similarly to how you would say them, e.g. "I expect this value to be equal to 3" or "I expect this array to contain 3". When you write assertions in this way, you don't need to remember the order of actual and expected arguments to functions like `assert.equal`, which helps you write better tests.
You can think of `expect` as a more compact alternative to [Chai](http://chaijs.com/) or [Sinon.JS](http://sinonjs.org/), just without the pretty website. ;)
## Installation

@@ -18,5 +20,5 @@

$ npm install expect
$ npm install --save expect
Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:
Then, use as you would anything else:

@@ -475,5 +477,1 @@ ```js

- [expect-jsx](https://github.com/algolia/expect-jsx) Adds things like `expect(ReactComponent).toEqualJSX(<TestComponent prop="yes" />)`
## Issues
Please file issues on the [issue tracker on GitHub](https://github.com/mjackson/expect/issues).

@@ -59,6 +59,7 @@ (function webpackUniversalModuleDefinition(root, factory) {

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.restoreSpies = exports.isSpy = exports.spyOn = exports.createSpy = exports.extend = exports.assert = undefined;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _Expectation = __webpack_require__(1);

@@ -68,26 +69,43 @@

var _SpyUtils = __webpack_require__(18);
var _SpyUtils = __webpack_require__(20);
var _assert = __webpack_require__(16);
var _assert = __webpack_require__(18);
var _assert2 = _interopRequireDefault(_assert);
var _extend = __webpack_require__(20);
var _extend = __webpack_require__(22);
var _extend2 = _interopRequireDefault(_extend);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* eslint-disable no-console */
function expect(actual) {
return new _Expectation2['default'](actual);
return new _Expectation2.default(actual);
}
expect.createSpy = _SpyUtils.createSpy;
expect.spyOn = _SpyUtils.spyOn;
expect.isSpy = _SpyUtils.isSpy;
expect.restoreSpies = _SpyUtils.restoreSpies;
expect.assert = _assert2['default'];
expect.extend = _extend2['default'];
function addDeprecatedExport(name, fn) {
expect[name] = function () {
console.warn('Calling expect.' + name + ' directly is deprecated; import { ' + name + ' } from "expect" instead');
return fn.apply(undefined, arguments);
};
}
exports['default'] = expect;
module.exports = exports['default'];
addDeprecatedExport('assert', _assert2.default);
addDeprecatedExport('extend', _extend2.default);
addDeprecatedExport('createSpy', _SpyUtils.createSpy);
addDeprecatedExport('spyOn', _SpyUtils.spyOn);
addDeprecatedExport('isSpy', _SpyUtils.isSpy);
addDeprecatedExport('restoreSpies', _SpyUtils.restoreSpies);
exports.default = expect;
exports.assert = _assert2.default;
exports.extend = _extend2.default;
exports.createSpy = _SpyUtils.createSpy;
exports.spyOn = _SpyUtils.spyOn;
exports.isSpy = _SpyUtils.isSpy;
exports.restoreSpies = _SpyUtils.restoreSpies;
/***/ },

@@ -99,8 +117,8 @@ /* 1 */

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _isEqual = __webpack_require__(2);

@@ -110,14 +128,18 @@

var _isRegex = __webpack_require__(11);
var _isRegex = __webpack_require__(13);
var _isRegex2 = _interopRequireDefault(_isRegex);
var _assert = __webpack_require__(16);
var _assert = __webpack_require__(18);
var _assert2 = _interopRequireDefault(_assert);
var _SpyUtils = __webpack_require__(18);
var _SpyUtils = __webpack_require__(20);
var _TestUtils = __webpack_require__(19);
var _TestUtils = __webpack_require__(21);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**

@@ -129,3 +151,3 @@ * An Expectation is a wrapper around an assertion that allows it to be written

var Expectation = (function () {
var Expectation = function () {
function Expectation(actual) {

@@ -136,3 +158,3 @@ _classCallCheck(this, Expectation);

if (_TestUtils.isFunction(actual)) {
if ((0, _TestUtils.isFunction)(actual)) {
this.context = null;

@@ -143,228 +165,253 @@ this.args = [];

Expectation.prototype.toExist = function toExist(message) {
_assert2['default'](this.actual, message || 'Expected %s to exist', this.actual);
_createClass(Expectation, [{
key: 'toExist',
value: function toExist(message) {
(0, _assert2.default)(this.actual, message || 'Expected %s to exist', this.actual);
return this;
};
return this;
}
}, {
key: 'toNotExist',
value: function toNotExist(message) {
(0, _assert2.default)(!this.actual, message || 'Expected %s to not exist', this.actual);
Expectation.prototype.toNotExist = function toNotExist(message) {
_assert2['default'](!this.actual, message || 'Expected %s to not exist', this.actual);
return this;
}
}, {
key: 'toBe',
value: function toBe(value, message) {
(0, _assert2.default)(this.actual === value, message || 'Expected %s to be %s', this.actual, value);
return this;
};
return this;
}
}, {
key: 'toNotBe',
value: function toNotBe(value, message) {
(0, _assert2.default)(this.actual !== value, message || 'Expected %s to not be %s', this.actual, value);
Expectation.prototype.toBe = function toBe(value, message) {
_assert2['default'](this.actual === value, message || 'Expected %s to be %s', this.actual, value);
return this;
}
}, {
key: 'toEqual',
value: function toEqual(value, message) {
try {
(0, _assert2.default)((0, _isEqual2.default)(this.actual, value), message || 'Expected %s to equal %s', this.actual, value);
} catch (e) {
// These attributes are consumed by Mocha to produce a diff output.
e.showDiff = true;
e.actual = this.actual;
e.expected = value;
throw e;
}
return this;
};
return this;
}
}, {
key: 'toNotEqual',
value: function toNotEqual(value, message) {
(0, _assert2.default)(!(0, _isEqual2.default)(this.actual, value), message || 'Expected %s to not equal %s', this.actual, value);
Expectation.prototype.toNotBe = function toNotBe(value, message) {
_assert2['default'](this.actual !== value, message || 'Expected %s to not be %s', this.actual, value);
return this;
}
}, {
key: 'toThrow',
value: function toThrow(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).toThrow() must be a function, %s was given', this.actual);
return this;
};
(0, _assert2.default)((0, _TestUtils.functionThrows)(this.actual, this.context, this.args, value), message || 'Expected %s to throw %s', this.actual, value || 'an error');
Expectation.prototype.toEqual = function toEqual(value, message) {
try {
_assert2['default'](_isEqual2['default'](this.actual, value), message || 'Expected %s to equal %s', this.actual, value);
} catch (e) {
// These attributes are consumed by Mocha to produce a diff output.
e.showDiff = true;
e.actual = this.actual;
e.expected = value;
throw e;
return this;
}
}, {
key: 'toNotThrow',
value: function toNotThrow(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given', this.actual);
return this;
};
(0, _assert2.default)(!(0, _TestUtils.functionThrows)(this.actual, this.context, this.args, value), message || 'Expected %s to not throw %s', this.actual, value || 'an error');
Expectation.prototype.toNotEqual = function toNotEqual(value, message) {
_assert2['default'](!_isEqual2['default'](this.actual, value), message || 'Expected %s to not equal %s', this.actual, value);
return this;
}
}, {
key: 'toBeA',
value: function toBeA(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(value) || typeof value === 'string', 'The "value" argument in toBeA(value) must be a function or a string');
return this;
};
(0, _assert2.default)((0, _TestUtils.isA)(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
Expectation.prototype.toThrow = function toThrow(value, message) {
_assert2['default'](_TestUtils.isFunction(this.actual), 'The "actual" argument in expect(actual).toThrow() must be a function, %s was given', this.actual);
return this;
}
}, {
key: 'toNotBeA',
value: function toNotBeA(value, message) {
(0, _assert2.default)((0, _TestUtils.isFunction)(value) || typeof value === 'string', 'The "value" argument in toNotBeA(value) must be a function or a string');
_assert2['default'](_TestUtils.functionThrows(this.actual, this.context, this.args, value), message || 'Expected %s to throw %s', this.actual, value || 'an error');
(0, _assert2.default)(!(0, _TestUtils.isA)(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
return this;
};
return this;
}
}, {
key: 'toMatch',
value: function toMatch(pattern, message) {
(0, _assert2.default)(typeof this.actual === 'string', 'The "actual" argument in expect(actual).toMatch() must be a string');
Expectation.prototype.toNotThrow = function toNotThrow(value, message) {
_assert2['default'](_TestUtils.isFunction(this.actual), 'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given', this.actual);
(0, _assert2.default)((0, _isRegex2.default)(pattern), 'The "value" argument in toMatch(value) must be a RegExp');
_assert2['default'](!_TestUtils.functionThrows(this.actual, this.context, this.args, value), message || 'Expected %s to not throw %s', this.actual, value || 'an error');
(0, _assert2.default)(pattern.test(this.actual), message || 'Expected %s to match %s', this.actual, pattern);
return this;
};
return this;
}
}, {
key: 'toNotMatch',
value: function toNotMatch(pattern, message) {
(0, _assert2.default)(typeof this.actual === 'string', 'The "actual" argument in expect(actual).toNotMatch() must be a string');
Expectation.prototype.toBeA = function toBeA(value, message) {
_assert2['default'](_TestUtils.isFunction(value) || typeof value === 'string', 'The "value" argument in toBeA(value) must be a function or a string');
(0, _assert2.default)((0, _isRegex2.default)(pattern), 'The "value" argument in toNotMatch(value) must be a RegExp');
_assert2['default'](_TestUtils.isA(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
(0, _assert2.default)(!pattern.test(this.actual), message || 'Expected %s to not match %s', this.actual, pattern);
return this;
};
return this;
}
}, {
key: 'toBeLessThan',
value: function toBeLessThan(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThan() must be a number');
Expectation.prototype.toNotBeA = function toNotBeA(value, message) {
_assert2['default'](_TestUtils.isFunction(value) || typeof value === 'string', 'The "value" argument in toNotBeA(value) must be a function or a string');
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeLessThan(value) must be a number');
_assert2['default'](!_TestUtils.isA(this.actual, value), message || 'Expected %s to be a %s', this.actual, value);
(0, _assert2.default)(this.actual < value, message || 'Expected %s to be less than %s', this.actual, value);
return this;
};
return this;
}
}, {
key: 'toBeLessThanOrEqualTo',
value: function toBeLessThanOrEqualTo(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number');
Expectation.prototype.toMatch = function toMatch(pattern, message) {
_assert2['default'](typeof this.actual === 'string', 'The "actual" argument in expect(actual).toMatch() must be a string');
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeLessThanOrEqualTo(value) must be a number');
_assert2['default'](_isRegex2['default'](pattern), 'The "value" argument in toMatch(value) must be a RegExp');
(0, _assert2.default)(this.actual <= value, message || 'Expected %s to be less than or equal to %s', this.actual, value);
_assert2['default'](pattern.test(this.actual), message || 'Expected %s to match %s', this.actual, pattern);
return this;
}
}, {
key: 'toBeGreaterThan',
value: function toBeGreaterThan(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThan() must be a number');
return this;
};
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeGreaterThan(value) must be a number');
Expectation.prototype.toNotMatch = function toNotMatch(pattern, message) {
_assert2['default'](typeof this.actual === 'string', 'The "actual" argument in expect(actual).toNotMatch() must be a string');
(0, _assert2.default)(this.actual > value, message || 'Expected %s to be greater than %s', this.actual, value);
_assert2['default'](_isRegex2['default'](pattern), 'The "value" argument in toNotMatch(value) must be a RegExp');
return this;
}
}, {
key: 'toBeGreaterThanOrEqualTo',
value: function toBeGreaterThanOrEqualTo(value, message) {
(0, _assert2.default)(typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number');
_assert2['default'](!pattern.test(this.actual), message || 'Expected %s to not match %s', this.actual, pattern);
(0, _assert2.default)(typeof value === 'number', 'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number');
return this;
};
(0, _assert2.default)(this.actual >= value, message || 'Expected %s to be greater than or equal to %s', this.actual, value);
Expectation.prototype.toBeLessThan = function toBeLessThan(value, message) {
_assert2['default'](typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThan() must be a number');
return this;
}
}, {
key: 'toInclude',
value: function toInclude(value, compareValues, message) {
(0, _assert2.default)((0, _TestUtils.isArray)(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toInclude() must be an array or a string');
_assert2['default'](typeof value === 'number', 'The "value" argument in toBeLessThan(value) must be a number');
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
}
_assert2['default'](this.actual < value, message || 'Expected %s to be less than %s', this.actual, value);
message = message || 'Expected %s to include %s';
return this;
};
if ((0, _TestUtils.isArray)(this.actual)) {
(0, _assert2.default)((0, _TestUtils.arrayContains)(this.actual, value, compareValues), message, this.actual, value);
} else {
(0, _assert2.default)((0, _TestUtils.stringContains)(this.actual, value), message, this.actual, value);
}
Expectation.prototype.toBeLessThanOrEqualTo = function toBeLessThanOrEqualTo(value, message) {
_assert2['default'](typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number');
return this;
}
}, {
key: 'toExclude',
value: function toExclude(value, compareValues, message) {
(0, _assert2.default)((0, _TestUtils.isArray)(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toExclude() must be an array or a string');
_assert2['default'](typeof value === 'number', 'The "value" argument in toBeLessThanOrEqualTo(value) must be a number');
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
}
_assert2['default'](this.actual <= value, message || 'Expected %s to be less than or equal to %s', this.actual, value);
message = message || 'Expected %s to exclude %s';
return this;
};
if ((0, _TestUtils.isArray)(this.actual)) {
(0, _assert2.default)(!(0, _TestUtils.arrayContains)(this.actual, value, compareValues), message, this.actual, value);
} else {
(0, _assert2.default)(!(0, _TestUtils.stringContains)(this.actual, value), message, this.actual, value);
}
Expectation.prototype.toBeGreaterThan = function toBeGreaterThan(value, message) {
_assert2['default'](typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThan() must be a number');
return this;
}
}, {
key: 'toHaveBeenCalled',
value: function toHaveBeenCalled(message) {
var spy = this.actual;
_assert2['default'](typeof value === 'number', 'The "value" argument in toBeGreaterThan(value) must be a number');
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy');
_assert2['default'](this.actual > value, message || 'Expected %s to be greater than %s', this.actual, value);
(0, _assert2.default)(spy.calls.length > 0, message || 'spy was not called');
return this;
};
return this;
}
}, {
key: 'toHaveBeenCalledWith',
value: function toHaveBeenCalledWith() {
var spy = this.actual;
Expectation.prototype.toBeGreaterThanOrEqualTo = function toBeGreaterThanOrEqualTo(value, message) {
_assert2['default'](typeof this.actual === 'number', 'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number');
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy');
_assert2['default'](typeof value === 'number', 'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number');
var expectedArgs = Array.prototype.slice.call(arguments, 0);
_assert2['default'](this.actual >= value, message || 'Expected %s to be greater than or equal to %s', this.actual, value);
(0, _assert2.default)(spy.calls.some(function (call) {
return (0, _isEqual2.default)(call.arguments, expectedArgs);
}), 'spy was never called with %s', expectedArgs);
return this;
};
return this;
}
}, {
key: 'toNotHaveBeenCalled',
value: function toNotHaveBeenCalled(message) {
var spy = this.actual;
Expectation.prototype.toInclude = function toInclude(value, compareValues, message) {
_assert2['default'](_TestUtils.isArray(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toInclude() must be an array or a string');
(0, _assert2.default)((0, _SpyUtils.isSpy)(spy), 'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy');
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
}
(0, _assert2.default)(spy.calls.length === 0, message || 'spy was not supposed to be called');
message = message || 'Expected %s to include %s';
if (_TestUtils.isArray(this.actual)) {
_assert2['default'](_TestUtils.arrayContains(this.actual, value, compareValues), message, this.actual, value);
} else {
_assert2['default'](_TestUtils.stringContains(this.actual, value), message, this.actual, value);
return this;
}
}, {
key: 'withContext',
value: function withContext(context) {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
return this;
};
this.context = context;
Expectation.prototype.toExclude = function toExclude(value, compareValues, message) {
_assert2['default'](_TestUtils.isArray(this.actual) || typeof this.actual === 'string', 'The "actual" argument in expect(actual).toExclude() must be an array or a string');
if (typeof compareValues === 'string') {
message = compareValues;
compareValues = null;
return this;
}
}, {
key: 'withArgs',
value: function withArgs() {
(0, _assert2.default)((0, _TestUtils.isFunction)(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
message = message || 'Expected %s to exclude %s';
if (arguments.length) this.args = this.args.concat(Array.prototype.slice.call(arguments, 0));
if (_TestUtils.isArray(this.actual)) {
_assert2['default'](!_TestUtils.arrayContains(this.actual, value, compareValues), message, this.actual, value);
} else {
_assert2['default'](!_TestUtils.stringContains(this.actual, value), message, this.actual, value);
return this;
}
}]);
return this;
};
Expectation.prototype.toHaveBeenCalled = function toHaveBeenCalled(message) {
var spy = this.actual;
_assert2['default'](_SpyUtils.isSpy(spy), 'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy');
_assert2['default'](spy.calls.length > 0, message || 'spy was not called');
return this;
};
Expectation.prototype.toHaveBeenCalledWith = function toHaveBeenCalledWith() {
var spy = this.actual;
_assert2['default'](_SpyUtils.isSpy(spy), 'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy');
var expectedArgs = Array.prototype.slice.call(arguments, 0);
_assert2['default'](spy.calls.some(function (call) {
return _isEqual2['default'](call.arguments, expectedArgs);
}), 'spy was never called with %s', expectedArgs);
return this;
};
Expectation.prototype.toNotHaveBeenCalled = function toNotHaveBeenCalled(message) {
var spy = this.actual;
_assert2['default'](_SpyUtils.isSpy(spy), 'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy');
_assert2['default'](spy.calls.length === 0, message || 'spy was not supposed to be called');
return this;
};
Expectation.prototype.withContext = function withContext(context) {
_assert2['default'](_TestUtils.isFunction(this.actual), 'The "actual" argument in expect(actual).withContext() must be a function');
this.context = context;
return this;
};
Expectation.prototype.withArgs = function withArgs() {
_assert2['default'](_TestUtils.isFunction(this.actual), 'The "actual" argument in expect(actual).withArgs() must be a function');
if (arguments.length) this.args = this.args.concat(Array.prototype.slice.call(arguments, 0));
return this;
};
return Expectation;
})();
}();

@@ -384,4 +431,3 @@ var aliases = {

Expectation.prototype[alias] = Expectation.prototype[aliases[alias]];
}exports['default'] = Expectation;
module.exports = exports['default'];
}exports.default = Expectation;

@@ -394,15 +440,28 @@ /***/ },

var whyNotEqual = __webpack_require__(3);
module.exports = function isEqual(value, other) {
return whyNotEqual(value, other) === '';
};
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var ObjectPrototype = Object.prototype;
var toStr = ObjectPrototype.toString;
var booleanValue = Boolean.prototype.valueOf;
var has = __webpack_require__(3);
var isArrowFunction = __webpack_require__(5);
var isBoolean = __webpack_require__(7);
var isDate = __webpack_require__(8);
var isGenerator = __webpack_require__(9);
var isNumber = __webpack_require__(10);
var isRegex = __webpack_require__(11);
var isString = __webpack_require__(12);
var isSymbol = __webpack_require__(13);
var isCallable = __webpack_require__(6);
var has = __webpack_require__(4);
var isArrowFunction = __webpack_require__(7);
var isBoolean = __webpack_require__(9);
var isDate = __webpack_require__(10);
var isGenerator = __webpack_require__(11);
var isNumber = __webpack_require__(12);
var isRegex = __webpack_require__(13);
var isString = __webpack_require__(14);
var isSymbol = __webpack_require__(15);
var isCallable = __webpack_require__(8);

@@ -415,5 +474,5 @@ var isProto = Object.prototype.isPrototypeOf;

var symbolValue = typeof Symbol === 'function' ? Symbol.prototype.valueOf : null;
var symbolIterator = __webpack_require__(14)();
var symbolIterator = __webpack_require__(16)();
var collectionsForEach = __webpack_require__(15)();
var collectionsForEach = __webpack_require__(17)();

@@ -472,7 +531,13 @@ var getPrototypeOf = Object.getPrototypeOf;

module.exports = function isEqual(value, other) {
if (value === other) { return true; }
if (value == null || other == null) { return value === other; }
module.exports = function whyNotEqual(value, other) {
if (value === other) { return ''; }
if (value == null || other == null) {
return value === other ? '' : String(value) + ' !== ' + String(other);
}
if (toStr.call(value) !== toStr.call(other)) { return false; }
var valToStr = toStr.call(value);
var otherToStr = toStr.call(value);
if (valToStr !== otherToStr) {
return 'toStringTag is not the same: ' + valToStr + ' !== ' + otherToStr;
}

@@ -482,3 +547,8 @@ var valIsBool = isBoolean(value);

if (valIsBool || otherIsBool) {
return valIsBool && otherIsBool && booleanValue.call(value) === booleanValue.call(other);
if (!valIsBool) { return 'first argument is not a boolean; second argument is'; }
if (!otherIsBool) { return 'second argument is not a boolean; first argument is'; }
var valBoolVal = booleanValue.call(value);
var otherBoolVal = booleanValue.call(other);
if (valBoolVal === otherBoolVal) { return ''; }
return 'primitive value of boolean arguments do not match: ' + valBoolVal + ' !== ' + otherBoolVal;
}

@@ -489,3 +559,17 @@

if (valIsNumber || otherIsNumber) {
return valIsNumber && otherIsNumber && (Number(value) === Number(other) || (isNaN(value) && isNaN(other)));
if (!valIsNumber) { return 'first argument is not a number; second argument is'; }
if (!otherIsNumber) { return 'second argument is not a number; first argument is'; }
var valNum = Number(value);
var otherNum = Number(other);
if (valNum === otherNum) { return ''; }
var valIsNaN = isNaN(value);
var otherIsNaN = isNaN(other);
if (valIsNaN && !otherIsNaN) {
return 'first argument is NaN; second is not';
} else if (!valIsNaN && otherIsNaN) {
return 'second argument is NaN; first is not';
} else if (valIsNaN && otherIsNaN) {
return '';
}
return 'numbers are different: ' + value + ' !== ' + other;
}

@@ -496,3 +580,8 @@

if (valIsString || otherIsString) {
return valIsString && otherIsString && String(value) === String(other);
if (!valIsString) { return 'second argument is string; first is not'; }
if (!otherIsString) { return 'first argument is string; second is not'; }
var stringVal = String(value);
var otherVal = String(other);
if (stringVal === otherVal) { return ''; }
return 'string values are different: "' + stringVal + '" !== "' + otherVal + '"';
}

@@ -503,3 +592,8 @@

if (valIsDate || otherIsDate) {
return valIsDate && otherIsDate && +value === +other;
if (!valIsDate) { return 'second argument is Date, first is not'; }
if (!otherIsDate) { return 'first argument is Date, second is not'; }
var valTime = +value;
var otherTime = +other;
if (valTime === otherTime) { return ''; }
return 'Dates have different time values: ' + valTime + ' !== ' + otherTime;
}

@@ -510,3 +604,8 @@

if (valIsRegex || otherIsRegex) {
return valIsRegex && otherIsRegex && String(value) === String(other);
if (!valIsRegex) { return 'second argument is RegExp, first is not'; }
if (!otherIsRegex) { return 'first argument is RegExp, second is not'; }
var regexStringVal = String(value);
var regexStringOther = String(other);
if (regexStringVal === regexStringOther) { return ''; }
return 'regular expressions differ: ' + regexStringVal + ' !== ' + regexStringOther;
}

@@ -517,10 +616,18 @@

if (valIsArray || otherIsArray) {
if (!valIsArray || !otherIsArray) { return false; }
if (value.length !== other.length) { return false; }
if (String(value) !== String(other)) { return false; }
if (!valIsArray) { return 'second argument is an Array, first is not'; }
if (!otherIsArray) { return 'first argument is an Array, second is not'; }
if (value.length !== other.length) {
return 'arrays have different length: ' + value.length + ' !== ' + other.length;
}
if (String(value) !== String(other)) { return 'stringified Arrays differ'; }
var index = value.length - 1;
var equal = true;
while (equal && index >= 0) {
equal = has(value, index) && has(other, index) && isEqual(value[index], other[index]);
var equal = '';
var valHasIndex, otherHasIndex;
while (equal === '' && index >= 0) {
valHasIndex = has(value, index);
otherHasIndex = has(other, index);
if (!valHasIndex && otherHasIndex) { return 'second argument has index ' + index + '; first does not'; }
if (valHasIndex && !otherHasIndex) { return 'first argument has index ' + index + '; second does not'; }
equal = whyNotEqual(value[index], other[index]);
index -= 1;

@@ -533,5 +640,8 @@ }

var otherIsSym = isSymbol(other);
if (valueIsSym !== otherIsSym) { return false; }
if (valueIsSym !== otherIsSym) {
if (valueIsSym) { return 'first argument is Symbol; second is not'; }
return 'second argument is Symbol; first is not';
}
if (valueIsSym && otherIsSym) {
return symbolValue.call(value) === symbolValue.call(other);
return symbolValue.call(value) === symbolValue.call(other) ? '' : 'first Symbol value !== second Symbol value';
}

@@ -541,26 +651,37 @@

var otherIsGen = isGenerator(other);
if (valueIsGen !== otherIsGen) { return false; }
if (valueIsGen !== otherIsGen) {
if (valueIsGen) { return 'first argument is a Generator; second is not'; }
return 'second argument is a Generator; first is not';
}
var valueIsArrow = isArrowFunction(value);
var otherIsArrow = isArrowFunction(other);
if (valueIsArrow !== otherIsArrow) { return false; }
if (valueIsArrow !== otherIsArrow) {
if (valueIsArrow) { return 'first argument is an Arrow function; second is not'; }
return 'second argument is an Arrow function; first is not';
}
if (isCallable(value) || isCallable(other)) {
if (functionsHaveNames && !isEqual(value.name, other.name)) { return false; }
if (!isEqual(value.length, other.length)) { return false; }
if (functionsHaveNames && whyNotEqual(value.name, other.name) !== '') {
return 'Function names differ: "' + value.name + '" !== "' + other.name + '"';
}
if (whyNotEqual(value.length, other.length) !== '') {
return 'Function lengths differ: ' + value.length + ' !== ' + other.length;
}
var valueStr = normalizeFnWhitespace(String(value));
var otherStr = normalizeFnWhitespace(String(other));
if (isEqual(valueStr, otherStr)) { return true; }
if (whyNotEqual(valueStr, otherStr) === '') { return ''; }
if (!valueIsGen && !valueIsArrow) {
return isEqual(valueStr.replace(/\)\s*\{/, '){'), otherStr.replace(/\)\s*\{/, '){'));
return whyNotEqual(valueStr.replace(/\)\s*\{/, '){'), otherStr.replace(/\)\s*\{/, '){')) === '' ? '' : 'Function string representations differ';
}
return isEqual(valueStr, otherStr);
return whyNotEqual(valueStr, otherStr) === '' ? '' : 'Function string representations differ';
}
if (typeof value === 'object' || typeof other === 'object') {
if (typeof value !== typeof other) { return false; }
if (isProto.call(value, other) || isProto.call(other, value)) { return false; }
if (getPrototypeOf(value) !== getPrototypeOf(other)) { return false; }
if (typeof value !== typeof other) { return 'arguments have a different typeof: ' + typeof value + ' !== ' + typeof other; }
if (isProto.call(value, other)) { return 'first argument is the [[Prototype]] of the second'; }
if (isProto.call(other, value)) { return 'second argument is the [[Prototype]] of the first'; }
if (getPrototypeOf(value) !== getPrototypeOf(other)) { return 'arguments have a different [[Prototype]]'; }

@@ -573,3 +694,4 @@ if (symbolIterator) {

if (valueIsIterable !== otherIsIterable) {
return false;
if (valueIsIterable) { return 'first argument is iterable; second is not'; }
return 'second argument is iterable; first is not';
}

@@ -579,11 +701,16 @@ if (valueIsIterable && otherIsIterable) {

var otherIterator = otherIteratorFn.call(other);
var valueNext, otherNext;
var valueNext, otherNext, nextWhy;
do {
valueNext = valueIterator.next();
otherNext = otherIterator.next();
if (!valueNext.done && !otherNext.done && !isEqual(valueNext, otherNext)) {
return false;
if (!valueNext.done && !otherNext.done) {
nextWhy = whyNotEqual(valueNext, otherNext);
if (nextWhy !== '') {
return 'iteration results are not equal: ' + nextWhy;
}
}
} while (!valueNext.done && !otherNext.done);
return valueNext.done === otherNext.done;
if (valueNext.done && !otherNext.done) { return 'first argument finished iterating before second'; }
if (!valueNext.done && otherNext.done) { return 'second argument finished iterating before first'; }
return '';
}

@@ -593,21 +720,27 @@ } else if (collectionsForEach.Map || collectionsForEach.Set) {

var otherEntries = tryMapSetEntries(other);
if (isArray(valueEntries) !== isArray(otherEntries)) {
return false; // either: neither is a Map/Set, or one is and the other isn't.
var valueEntriesIsArray = isArray(valueEntries);
var otherEntriesIsArray = isArray(otherEntries);
if (valueEntriesIsArray && !otherEntriesIsArray) { return 'first argument has Collection entries, second does not'; }
if (!valueEntriesIsArray && otherEntriesIsArray) { return 'second argument has Collection entries, first does not'; }
if (valueEntriesIsArray && otherEntriesIsArray) {
var entriesWhy = whyNotEqual(valueEntries, otherEntries);
return entriesWhy === '' ? '' : 'Collection entries differ: ' + entriesWhy;
}
if (valueEntries && otherEntries) {
return isEqual(valueEntries, otherEntries);
}
}
var key, valueKeyIsRecursive, otherKeyIsRecursive;
var key, valueKeyIsRecursive, otherKeyIsRecursive, keyWhy;
for (key in value) {
if (has(value, key)) {
if (!has(other, key)) { return false; }
if (!has(other, key)) { return 'first argument has key "' + key + '"; second does not'; }
valueKeyIsRecursive = value[key] && value[key][key] === value;
otherKeyIsRecursive = other[key] && other[key][key] === other;
if (valueKeyIsRecursive !== otherKeyIsRecursive) {
return false;
if (valueKeyIsRecursive) { return 'first argument has a circular reference at key "' + key + '"; second does not'; }
return 'second argument has a circular reference at key "' + key + '"; first does not';
}
if (!valueKeyIsRecursive && !otherKeyIsRecursive && !isEqual(value[key], other[key])) {
return false;
if (!valueKeyIsRecursive && !otherKeyIsRecursive) {
keyWhy = whyNotEqual(value[key], other[key]);
if (keyWhy !== '') {
return 'value at key "' + key + '" differs: ' + keyWhy;
}
}

@@ -617,15 +750,5 @@ }

for (key in other) {
if (has(other, key)) {
if (!has(value, key)) { return false; }
valueKeyIsRecursive = value[key] && value[key][key] === value;
otherKeyIsRecursive = other[key] && other[key][key] === other;
if (valueKeyIsRecursive !== otherKeyIsRecursive) {
return false;
}
if (!valueKeyIsRecursive && !otherKeyIsRecursive && !isEqual(other[key], value[key])) {
return false;
}
}
if (has(other, key) && !has(value, key)) { return 'second argument has key "' + key + '"; first does not'; }
}
return true;
return '';
}

@@ -638,6 +761,6 @@

/***/ },
/* 3 */
/* 4 */
/***/ function(module, exports, __webpack_require__) {
var bind = __webpack_require__(4);
var bind = __webpack_require__(5);

@@ -648,3 +771,12 @@ module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);

/***/ },
/* 4 */
/* 5 */
/***/ function(module, exports, __webpack_require__) {
var implementation = __webpack_require__(6);
module.exports = Function.prototype.bind || implementation;
/***/ },
/* 6 */
/***/ function(module, exports) {

@@ -664,2 +796,3 @@

var bound;
var binder = function () {

@@ -689,3 +822,3 @@ if (this instanceof bound) {

var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);

@@ -703,5 +836,4 @@ if (target.prototype) {

/***/ },
/* 5 */
/* 7 */
/***/ function(module, exports, __webpack_require__) {

@@ -711,3 +843,3 @@

var isCallable = __webpack_require__(6);
var isCallable = __webpack_require__(8);
var fnToStr = Function.prototype.toString;

@@ -728,3 +860,3 @@ var isNonArrowFnRegex = /^\s*function/;

/***/ },
/* 6 */
/* 8 */
/***/ function(module, exports) {

@@ -734,6 +866,12 @@

var constructorRegex = /\s*class /;
var isNonES6ClassFn = function isNonES6ClassFn(value) {
var fnToStr = Function.prototype.toString;
var constructorRegex = /^\s*class /;
var isES6ClassFn = function isES6ClassFn(value) {
try {
return !constructorRegex.test(value);
var fnStr = fnToStr.call(value);
var singleStripped = fnStr.replace(/\/\/.*\n/g, '');
var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, '');
var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' ');
return constructorRegex.test(spaceStripped);
} catch (e) {

@@ -744,6 +882,5 @@ return false; // not a function

var fnToStr = Function.prototype.toString;
var tryFunctionObject = function tryFunctionObject(value) {
try {
if (constructorRegex.test(value)) { return false; }
if (isES6ClassFn(value)) { return false; }
fnToStr.call(value);

@@ -764,3 +901,3 @@ return true;

if (hasToStringTag) { return tryFunctionObject(value); }
if (!isNonES6ClassFn(value)) { return false; }
if (isES6ClassFn(value)) { return false; }
var strClass = toStr.call(value);

@@ -772,3 +909,3 @@ return strClass === fnClass || strClass === genClass;

/***/ },
/* 7 */
/* 9 */
/***/ function(module, exports) {

@@ -800,3 +937,3 @@

/***/ },
/* 8 */
/* 10 */
/***/ function(module, exports) {

@@ -827,3 +964,3 @@

/***/ },
/* 9 */
/* 11 */
/***/ function(module, exports) {

@@ -846,3 +983,3 @@

/***/ },
/* 10 */
/* 12 */
/***/ function(module, exports) {

@@ -873,3 +1010,3 @@

/***/ },
/* 11 */
/* 13 */
/***/ function(module, exports) {

@@ -899,3 +1036,3 @@

/***/ },
/* 12 */
/* 14 */
/***/ function(module, exports) {

@@ -926,3 +1063,3 @@

/***/ },
/* 13 */
/* 15 */
/***/ function(module, exports) {

@@ -960,3 +1097,3 @@

/***/ },
/* 14 */
/* 16 */
/***/ function(module, exports, __webpack_require__) {

@@ -966,3 +1103,3 @@

var isSymbol = __webpack_require__(13);
var isSymbol = __webpack_require__(15);

@@ -985,3 +1122,3 @@ module.exports = function getSymbolIterator() {

/***/ },
/* 15 */
/* 17 */
/***/ function(module, exports) {

@@ -1017,3 +1154,3 @@

/***/ },
/* 16 */
/* 18 */
/***/ function(module, exports, __webpack_require__) {

@@ -1023,10 +1160,12 @@

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _objectInspect = __webpack_require__(19);
var _objectInspect = __webpack_require__(17);
var _objectInspect2 = _interopRequireDefault(_objectInspect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function assert(condition, messageFormat) {

@@ -1042,11 +1181,10 @@ for (var _len = arguments.length, extraArgs = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {

throw new Error(messageFormat.replace(/%s/g, function () {
return _objectInspect2['default'](extraArgs[index++]);
return (0, _objectInspect2.default)(extraArgs[index++]);
}));
}
exports['default'] = assert;
module.exports = exports['default'];
exports.default = assert;
/***/ },
/* 17 */
/* 19 */
/***/ function(module, exports) {

@@ -1249,3 +1387,3 @@

/***/ },
/* 18 */
/* 20 */
/***/ function(module, exports, __webpack_require__) {

@@ -1255,3 +1393,5 @@

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createSpy = createSpy;

@@ -1262,10 +1402,10 @@ exports.spyOn = spyOn;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _assert = __webpack_require__(18);
var _assert = __webpack_require__(16);
var _assert2 = _interopRequireDefault(_assert);
var _TestUtils = __webpack_require__(19);
var _TestUtils = __webpack_require__(21);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function noop() {}

@@ -1280,7 +1420,7 @@

_assert2['default'](_TestUtils.isFunction(fn), 'createSpy needs a function');
(0, _assert2.default)((0, _TestUtils.isFunction)(fn), 'createSpy needs a function');
var targetFn = undefined,
thrownValue = undefined,
returnValue = undefined;
var targetFn = void 0,
thrownValue = void 0,
returnValue = void 0;

@@ -1342,3 +1482,3 @@ var spy = function spy() {

if (!isSpy(original)) {
_assert2['default'](_TestUtils.isFunction(original), 'Cannot spyOn the %s property; it is not a function', methodName);
(0, _assert2.default)((0, _TestUtils.isFunction)(original), 'Cannot spyOn the %s property; it is not a function', methodName);

@@ -1364,3 +1504,3 @@ object[methodName] = createSpy(original, function () {

/***/ },
/* 19 */
/* 21 */
/***/ function(module, exports, __webpack_require__) {

@@ -1370,3 +1510,8 @@

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
exports.functionThrows = functionThrows;

@@ -1379,4 +1524,2 @@ exports.arrayContains = arrayContains;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _isEqual = __webpack_require__(2);

@@ -1386,6 +1529,8 @@

var _isRegex = __webpack_require__(11);
var _isRegex = __webpack_require__(13);
var _isRegex2 = _interopRequireDefault(_isRegex);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**

@@ -1400,3 +1545,2 @@ * Returns true if the given function throws the given value

*/
function functionThrows(fn, context, args, value) {

@@ -1413,3 +1557,3 @@ try {

if (typeof message === 'string') {
if (_isRegex2['default'](value) && value.test(error.message)) return true;
if ((0, _isRegex2.default)(value) && value.test(error.message)) return true;

@@ -1428,5 +1572,4 @@ if (typeof value === 'string' && message.indexOf(value) !== -1) return true;

*/
function arrayContains(array, value, compareValues) {
if (compareValues == null) compareValues = _isEqual2['default'];
if (compareValues == null) compareValues = _isEqual2.default;

@@ -1441,3 +1584,2 @@ return array.some(function (item) {

*/
function stringContains(string, value) {

@@ -1450,3 +1592,2 @@ return string.indexOf(value) !== -1;

*/
function isArray(object) {

@@ -1459,3 +1600,2 @@ return Array.isArray(object);

*/
function isFunction(object) {

@@ -1469,3 +1609,2 @@ return typeof object === 'function';

*/
function isA(object, value) {

@@ -1476,7 +1615,7 @@ if (isFunction(value)) return object instanceof value;

return typeof object === value;
return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === value;
}
/***/ },
/* 20 */
/* 22 */
/***/ function(module, exports, __webpack_require__) {

@@ -1486,6 +1625,6 @@

exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _Expectation = __webpack_require__(1);

@@ -1495,2 +1634,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Extensions = [];

@@ -1503,3 +1644,3 @@

for (var p in extension) {
if (extension.hasOwnProperty(p)) _Expectation2['default'].prototype[p] = extension[p];
if (extension.hasOwnProperty(p)) _Expectation2.default.prototype[p] = extension[p];
}

@@ -1509,4 +1650,3 @@ }

exports['default'] = extend;
module.exports = exports['default'];
exports.default = extend;

@@ -1513,0 +1653,0 @@ /***/ }

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.expect=e():t.expect=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return new a["default"](t)}e.__esModule=!0;var u=n(3),a=r(u),i=n(4),c=n(1),l=r(c),s=n(9),f=r(s);o.createSpy=i.createSpy,o.spyOn=i.spyOn,o.isSpy=i.isSpy,o.restoreSpies=i.restoreSpies,o.assert=l["default"],o.extend=f["default"],e["default"]=o,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];if(!t){var u=0;throw new Error(e.replace(/%s/g,function(){return a["default"](r[u++])}))}}e.__esModule=!0;var u=n(20),a=r(u);e["default"]=o,t.exports=e["default"]},function(t,e){"use strict";var n=RegExp.prototype.exec,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object RegExp]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"!=typeof t?!1:a?r(t):o.call(t)===u}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var u=n(7),a=r(u),i=n(2),c=r(i),l=n(1),s=r(l),f=n(4),p=n(5),y=function(){function t(e){o(this,t),this.actual=e,p.isFunction(e)&&(this.context=null,this.args=[])}return t.prototype.toExist=function(t){return s["default"](this.actual,t||"Expected %s to exist",this.actual),this},t.prototype.toNotExist=function(t){return s["default"](!this.actual,t||"Expected %s to not exist",this.actual),this},t.prototype.toBe=function(t,e){return s["default"](this.actual===t,e||"Expected %s to be %s",this.actual,t),this},t.prototype.toNotBe=function(t,e){return s["default"](this.actual!==t,e||"Expected %s to not be %s",this.actual,t),this},t.prototype.toEqual=function(t,e){try{s["default"](a["default"](this.actual,t),e||"Expected %s to equal %s",this.actual,t)}catch(n){throw n.showDiff=!0,n.actual=this.actual,n.expected=t,n}return this},t.prototype.toNotEqual=function(t,e){return s["default"](!a["default"](this.actual,t),e||"Expected %s to not equal %s",this.actual,t),this},t.prototype.toThrow=function(t,e){return s["default"](p.isFunction(this.actual),'The "actual" argument in expect(actual).toThrow() must be a function, %s was given',this.actual),s["default"](p.functionThrows(this.actual,this.context,this.args,t),e||"Expected %s to throw %s",this.actual,t||"an error"),this},t.prototype.toNotThrow=function(t,e){return s["default"](p.isFunction(this.actual),'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given',this.actual),s["default"](!p.functionThrows(this.actual,this.context,this.args,t),e||"Expected %s to not throw %s",this.actual,t||"an error"),this},t.prototype.toBeA=function(t,e){return s["default"](p.isFunction(t)||"string"==typeof t,'The "value" argument in toBeA(value) must be a function or a string'),s["default"](p.isA(this.actual,t),e||"Expected %s to be a %s",this.actual,t),this},t.prototype.toNotBeA=function(t,e){return s["default"](p.isFunction(t)||"string"==typeof t,'The "value" argument in toNotBeA(value) must be a function or a string'),s["default"](!p.isA(this.actual,t),e||"Expected %s to be a %s",this.actual,t),this},t.prototype.toMatch=function(t,e){return s["default"]("string"==typeof this.actual,'The "actual" argument in expect(actual).toMatch() must be a string'),s["default"](c["default"](t),'The "value" argument in toMatch(value) must be a RegExp'),s["default"](t.test(this.actual),e||"Expected %s to match %s",this.actual,t),this},t.prototype.toNotMatch=function(t,e){return s["default"]("string"==typeof this.actual,'The "actual" argument in expect(actual).toNotMatch() must be a string'),s["default"](c["default"](t),'The "value" argument in toNotMatch(value) must be a RegExp'),s["default"](!t.test(this.actual),e||"Expected %s to not match %s",this.actual,t),this},t.prototype.toBeLessThan=function(t,e){return s["default"]("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeLessThan() must be a number'),s["default"]("number"==typeof t,'The "value" argument in toBeLessThan(value) must be a number'),s["default"](this.actual<t,e||"Expected %s to be less than %s",this.actual,t),this},t.prototype.toBeLessThanOrEqualTo=function(t,e){return s["default"]("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number'),s["default"]("number"==typeof t,'The "value" argument in toBeLessThanOrEqualTo(value) must be a number'),s["default"](this.actual<=t,e||"Expected %s to be less than or equal to %s",this.actual,t),this},t.prototype.toBeGreaterThan=function(t,e){return s["default"]("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeGreaterThan() must be a number'),s["default"]("number"==typeof t,'The "value" argument in toBeGreaterThan(value) must be a number'),s["default"](this.actual>t,e||"Expected %s to be greater than %s",this.actual,t),this},t.prototype.toBeGreaterThanOrEqualTo=function(t,e){return s["default"]("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number'),s["default"]("number"==typeof t,'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number'),s["default"](this.actual>=t,e||"Expected %s to be greater than or equal to %s",this.actual,t),this},t.prototype.toInclude=function(t,e,n){return s["default"](p.isArray(this.actual)||"string"==typeof this.actual,'The "actual" argument in expect(actual).toInclude() must be an array or a string'),"string"==typeof e&&(n=e,e=null),n=n||"Expected %s to include %s",p.isArray(this.actual)?s["default"](p.arrayContains(this.actual,t,e),n,this.actual,t):s["default"](p.stringContains(this.actual,t),n,this.actual,t),this},t.prototype.toExclude=function(t,e,n){return s["default"](p.isArray(this.actual)||"string"==typeof this.actual,'The "actual" argument in expect(actual).toExclude() must be an array or a string'),"string"==typeof e&&(n=e,e=null),n=n||"Expected %s to exclude %s",p.isArray(this.actual)?s["default"](!p.arrayContains(this.actual,t,e),n,this.actual,t):s["default"](!p.stringContains(this.actual,t),n,this.actual,t),this},t.prototype.toHaveBeenCalled=function(t){var e=this.actual;return s["default"](f.isSpy(e),'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy'),s["default"](e.calls.length>0,t||"spy was not called"),this},t.prototype.toHaveBeenCalledWith=function(){var t=this.actual;s["default"](f.isSpy(t),'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy');var e=Array.prototype.slice.call(arguments,0);return s["default"](t.calls.some(function(t){return a["default"](t.arguments,e)}),"spy was never called with %s",e),this},t.prototype.toNotHaveBeenCalled=function(t){var e=this.actual;return s["default"](f.isSpy(e),'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy'),s["default"](0===e.calls.length,t||"spy was not supposed to be called"),this},t.prototype.withContext=function(t){return s["default"](p.isFunction(this.actual),'The "actual" argument in expect(actual).withContext() must be a function'),this.context=t,this},t.prototype.withArgs=function(){return s["default"](p.isFunction(this.actual),'The "actual" argument in expect(actual).withArgs() must be a function'),arguments.length&&(this.args=this.args.concat(Array.prototype.slice.call(arguments,0))),this},t}(),h={toBeAn:"toBeA",toNotBeAn:"toNotBeA",toBeTruthy:"toExist",toBeFalsy:"toNotExist",toBeFewerThan:"toBeLessThan",toBeMoreThan:"toBeGreaterThan",toContain:"toInclude",toNotContain:"toExclude"};for(var d in h)y.prototype[d]=y.prototype[h[d]];e["default"]=y,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){}function u(t){var e=arguments.length<=1||void 0===arguments[1]?o:arguments[1];null==t&&(t=o),s["default"](f.isFunction(t),"createSpy needs a function");var n=void 0,r=void 0,u=void 0,a=function i(){if(i.calls.push({context:this,arguments:Array.prototype.slice.call(arguments,0)}),n)return n.apply(this,arguments);if(r)throw r;return u};return a.calls=[],a.andCall=function(t){return n=t,a},a.andCallThrough=function(){return a.andCall(t)},a.andThrow=function(t){return r=t,a},a.andReturn=function(t){return u=t,a},a.getLastCall=function(){return a.calls[a.calls.length-1]},a.reset=function(){a.calls=[]},a.restore=a.destroy=e,a.__isSpy=!0,p.push(a),a}function a(t,e){var n=t[e];return i(n)||(s["default"](f.isFunction(n),"Cannot spyOn the %s property; it is not a function",e),t[e]=u(n,function(){t[e]=n})),t[e]}function i(t){return t&&t.__isSpy===!0}function c(){for(var t=p.length-1;t>=0;t--)p[t].restore();p=[]}e.__esModule=!0,e.createSpy=u,e.spyOn=a,e.isSpy=i,e.restoreSpies=c;var l=n(1),s=r(l),f=n(5),p=[]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n,r){try{t.apply(e,n)}catch(o){if(null==r)return!0;if(c(r)&&o instanceof r)return!0;var u=o.message||o;if("string"==typeof u){if(y["default"](r)&&r.test(o.message))return!0;if("string"==typeof r&&-1!==u.indexOf(r))return!0}}return!1}function u(t,e,n){return null==n&&(n=f["default"]),t.some(function(t){return n(t,e)!==!1})}function a(t,e){return-1!==t.indexOf(e)}function i(t){return Array.isArray(t)}function c(t){return"function"==typeof t}function l(t,e){return c(e)?t instanceof e:"array"===e?Array.isArray(t):typeof t===e}e.__esModule=!0,e.functionThrows=o,e.arrayContains=u,e.stringContains=a,e.isArray=i,e.isFunction=c,e.isA=l;var s=n(7),f=r(s),p=n(2),y=r(p)},function(t,e){"use strict";var n=/\s*class /,r=function(t){try{return!n.test(t)}catch(e){return!1}},o=Function.prototype.toString,u=function(t){try{return n.test(t)?!1:(o.call(t),!0)}catch(e){return!1}},a=Object.prototype.toString,i="[object Function]",c="[object GeneratorFunction]",l="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(l)return u(t);if(!r(t))return!1;var e=a.call(t);return e===i||e===c}},function(t,e,n){"use strict";var r=Object.prototype,o=r.toString,u=Boolean.prototype.valueOf,a=n(11),i=n(12),c=n(13),l=n(14),s=n(17),f=n(18),p=n(2),y=n(19),h=n(8),d=n(6),g=Object.prototype.isPrototypeOf,b=function(){},m="foo"===b.name,v="function"==typeof Symbol?Symbol.prototype.valueOf:null,x=n(16)(),S=n(15)(),T=Object.getPrototypeOf;T||(T="object"==typeof"test".__proto__?function(t){return t.__proto__}:function(t){var e,n=t.constructor;if(a(t,"constructor")){if(e=n,!delete t.constructor)return null;n=t.constructor,t.constructor=e}return n?n.prototype:r});var j=Array.isArray||function(t){return"[object Array]"===o.call(t)},O=function(t){return t.replace(/^function ?\(/,"function (").replace("){",") {")},E=function(t){var e=[];try{S.Map.call(t,function(t,n){e.push([t,n])})}catch(n){try{S.Set.call(t,function(t){e.push([t])})}catch(r){return!1}}return e};t.exports=function w(t,e){if(t===e)return!0;if(null==t||null==e)return t===e;if(o.call(t)!==o.call(e))return!1;var n=c(t),r=c(e);if(n||r)return n&&r&&u.call(t)===u.call(e);var b=f(t),M=f(t);if(b||M)return b&&M&&(Number(t)===Number(e)||isNaN(t)&&isNaN(e));var B=y(t),_=y(e);if(B||_)return B&&_&&String(t)===String(e);var A=l(t),N=l(e);if(A||N)return A&&N&&+t===+e;var C=p(t),F=p(e);if(C||F)return C&&F&&String(t)===String(e);var q=j(t),L=j(e);if(q||L){if(!q||!L)return!1;if(t.length!==e.length)return!1;if(String(t)!==String(e))return!1;for(var P=t.length-1,D=!0;D&&P>=0;)D=a(t,P)&&a(e,P)&&w(t[P],e[P]),P-=1;return D}var G=h(t),H=h(e);if(G!==H)return!1;if(G&&H)return v.call(t)===v.call(e);var R=s(t),$=s(e);if(R!==$)return!1;var z=i(t),I=i(e);if(z!==I)return!1;if(d(t)||d(e)){if(m&&!w(t.name,e.name))return!1;if(!w(t.length,e.length))return!1;var W=O(String(t)),k=O(String(e));return w(W,k)?!0:R||z?w(W,k):w(W.replace(/\)\s*\{/,"){"),k.replace(/\)\s*\{/,"){"))}if("object"==typeof t||"object"==typeof e){if(typeof t!=typeof e)return!1;if(g.call(t,e)||g.call(e,t))return!1;if(T(t)!==T(e))return!1;if(x){var J=t[x],K=d(J),Q=e[x],U=d(Q);if(K!==U)return!1;if(K&&U){var V,X,Y=J.call(t),Z=Q.call(e);do if(V=Y.next(),X=Z.next(),!V.done&&!X.done&&!w(V,X))return!1;while(!V.done&&!X.done);return V.done===X.done}}else if(S.Map||S.Set){var tt=E(t),et=E(e);if(j(tt)!==j(et))return!1;if(tt&&et)return w(tt,et)}var nt,rt,ot;for(nt in t)if(a(t,nt)){if(!a(e,nt))return!1;if(rt=t[nt]&&t[nt][nt]===t,ot=e[nt]&&e[nt][nt]===e,rt!==ot)return!1;if(!rt&&!ot&&!w(t[nt],e[nt]))return!1}for(nt in e)if(a(e,nt)){if(!a(t,nt))return!1;if(rt=t[nt]&&t[nt][nt]===t,ot=e[nt]&&e[nt][nt]===e,rt!==ot)return!1;if(!rt&&!ot&&!w(e[nt],t[nt]))return!1}return!0}return!1}},function(t,e){"use strict";var n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol();if(r){var o=Symbol.prototype.toString,u=/^Symbol\(.*\)$/,a=function(t){return"symbol"!=typeof t.valueOf()?!1:u.test(o.call(t))};t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return a(t)}catch(e){return!1}}}else t.exports=function(t){return!1}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(-1===i.indexOf(t)){i.push(t);for(var e in t)t.hasOwnProperty(e)&&(a["default"].prototype[e]=t[e])}}e.__esModule=!0;var u=n(3),a=r(u),i=[];e["default"]=o,t.exports=e["default"]},function(t,e){var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,u="[object Function]";t.exports=function(t){var e=this;if("function"!=typeof e||o.call(e)!==u)throw new TypeError(n+e);for(var a=r.call(arguments,1),i=function(){if(this instanceof f){var n=e.apply(this,a.concat(r.call(arguments)));return Object(n)===n?n:this}return e.apply(t,a.concat(r.call(arguments)))},c=Math.max(0,e.length-a.length),l=[],s=0;c>s;s++)l.push("$"+s);var f=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(i);if(e.prototype){var p=function(){};p.prototype=e.prototype,f.prototype=new p,p.prototype=null}return f}},function(t,e,n){var r=n(10);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,n){"use strict";var r=n(6),o=Function.prototype.toString,u=/^\s*function/,a=/^\([^\)]*\) *=>/,i=/^[^=]*=>/;t.exports=function(t){if(!r(t))return!1;var e=o.call(t);return e.length>0&&!u.test(e)&&(a.test(e)||i.test(e))}},function(t,e){"use strict";var n=Boolean.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object Boolean]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"boolean"==typeof t?!0:"object"!=typeof t?!1:a?r(t):o.call(t)===u}},function(t,e){"use strict";var n=Date.prototype.getDay,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object Date]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"!=typeof t||null===t?!1:a?r(t):o.call(t)===u}},function(t,e){"use strict";t.exports=function(){var t=function(){if("function"!=typeof Map)return null;try{Map.prototype.forEach.call({},function(){})}catch(t){return Map.prototype.forEach}return null}(),e=function(){if("function"!=typeof Set)return null;try{Set.prototype.forEach.call({},function(){})}catch(t){return Set.prototype.forEach}return null}();return{Map:t,Set:e}}},function(t,e,n){"use strict";var r=n(8);t.exports=function(){var t="function"==typeof Symbol&&r(Symbol.iterator)?Symbol.iterator:null;return"function"==typeof Object.getOwnPropertyNames&&"function"==typeof Map&&"function"==typeof Map.prototype.entries&&Object.getOwnPropertyNames(Map.prototype).forEach(function(e){"entries"!==e&&"size"!==e&&Map.prototype[e]===Map.prototype.entries&&(t=e)}),t}},function(t,e){"use strict";var n=Object.prototype.toString,r=Function.prototype.toString,o=/^\s*function\*/;t.exports=function(t){if("function"!=typeof t)return!1;var e=n.call(t);return("[object Function]"===e||"[object GeneratorFunction]"===e)&&o.test(r.call(t))}},function(t,e){"use strict";var n=Number.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object Number]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"number"==typeof t?!0:"object"!=typeof t?!1:a?r(t):o.call(t)===u}},function(t,e){"use strict";var n=String.prototype.valueOf,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,u="[object String]",a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"string"==typeof t?!0:"object"!=typeof t?!1:a?r(t):o.call(t)===u}},function(t,e){function n(t){return String(t).replace(/"/g,"&quot;")}function r(t){return"[object Array]"===l(t)}function o(t){return"[object Date]"===l(t)}function u(t){return"[object RegExp]"===l(t)}function a(t){return"[object Error]"===l(t)}function i(t){return"[object Symbol]"===l(t)}function c(t,e){return O.call(t,e)}function l(t){return Object.prototype.toString.call(t)}function s(t){if(t.name)return t.name;var e=t.toString().match(/^function\s*([\w$]+)/);return e?e[1]:void 0}function f(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1}function p(t){if(!m)return!1;try{return m.call(t),!0}catch(e){}return!1}function y(t){if(!T)return!1;try{return T.call(t),!0}catch(e){}return!1}function h(t){return t&&"object"==typeof t?"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?!0:"string"==typeof t.nodeName&&"function"==typeof t.getAttribute:!1}function d(t){function e(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(16>e?"0":"")+e.toString(16)}var n=t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,e);return"'"+n+"'"}var g="function"==typeof Map&&Map.prototype,b=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,m=g&&b&&"function"==typeof b.get?b.get:null,v=g&&Map.prototype.forEach,x="function"==typeof Set&&Set.prototype,S=Object.getOwnPropertyDescriptor&&x?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,T=x&&S&&"function"==typeof S.get?S.get:null,j=x&&Set.prototype.forEach;t.exports=function E(t,e,l,g){function b(t,n){return n&&(g=g.slice(),g.push(n)),E(t,e,l+1,g)}e||(e={});var x=void 0===e.depth?5:e.depth;if(void 0===l&&(l=0),l>=x&&x>0&&t&&"object"==typeof t)return"[Object]";if(void 0===g)g=[];else if(f(g,t)>=0)return"[Circular]";if("string"==typeof t)return d(t);if("function"==typeof t){var S=s(t);return"[Function"+(S?": "+S:"")+"]"}if(null===t)return"null";if(i(t)){var O=Symbol.prototype.toString.call(t);return"object"==typeof t?"Object("+O+")":O}if(h(t)){for(var w="<"+String(t.nodeName).toLowerCase(),M=t.attributes||[],B=0;B<M.length;B++)w+=" "+M[B].name+'="'+n(M[B].value)+'"';return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+String(t.nodeName).toLowerCase()+">"}if(r(t)){if(0===t.length)return"[]";for(var _=Array(t.length),B=0;B<t.length;B++)_[B]=c(t,B)?b(t[B],t):"";return"[ "+_.join(", ")+" ]"}if(a(t)){var A=[];for(var N in t)c(t,N)&&(/[^\w$]/.test(N)?A.push(b(N)+": "+b(t[N])):A.push(N+": "+b(t[N])));return 0===A.length?"["+t+"]":"{ ["+t+"] "+A.join(", ")+" }"}if("object"==typeof t&&"function"==typeof t.inspect)return t.inspect();if(p(t)){var A=[];return v.call(t,function(e,n){A.push(b(n,t)+" => "+b(e,t))}),"Map ("+m.call(t)+") {"+A.join(", ")+"}"}if(y(t)){var A=[];return j.call(t,function(e){A.push(b(e,t))}),"Set ("+T.call(t)+") {"+A.join(", ")+"}"}if("object"!=typeof t||o(t)||u(t))return String(t);var _=[],C=[];for(var N in t)c(t,N)&&C.push(N);C.sort();for(var B=0;B<C.length;B++){var N=C[B];/[^\w$]/.test(N)?_.push(b(N)+": "+b(t[N],t)):_.push(N+": "+b(t[N],t))}return 0===_.length?"{}":"{ "+_.join(", ")+" }"};var O=Object.prototype.hasOwnProperty||function(t){return t in this}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.expect=e():t.expect=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return new i["default"](t)}function a(t,e){o[t]=function(){return console.warn("Calling expect."+t+" directly is deprecated; import { "+t+' } from "expect" instead'),e.apply(void 0,arguments)}}Object.defineProperty(e,"__esModule",{value:!0}),e.restoreSpies=e.isSpy=e.spyOn=e.createSpy=e.extend=e.assert=void 0;var u=n(3),i=r(u),c=n(4),s=n(1),l=r(s),f=n(9),p=r(f);a("assert",l["default"]),a("extend",p["default"]),a("createSpy",c.createSpy),a("spyOn",c.spyOn),a("isSpy",c.isSpy),a("restoreSpies",c.restoreSpies),e["default"]=o,e.assert=l["default"],e.extend=p["default"],e.createSpy=c.createSpy,e.spyOn=c.spyOn,e.isSpy=c.isSpy,e.restoreSpies=c.restoreSpies},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];if(!t){var a=0;throw new Error(e.replace(/%s/g,function(){return(0,u["default"])(r[a++])}))}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(22),u=r(a);e["default"]=o},function(t,e){"use strict";var n=RegExp.prototype.exec,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object RegExp]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"!=typeof t?!1:u?r(t):o.call(t)===a}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(7),i=r(u),c=n(2),s=r(c),l=n(1),f=r(l),p=n(4),y=n(5),h=function(){function t(e){o(this,t),this.actual=e,(0,y.isFunction)(e)&&(this.context=null,this.args=[])}return a(t,[{key:"toExist",value:function(t){return(0,f["default"])(this.actual,t||"Expected %s to exist",this.actual),this}},{key:"toNotExist",value:function(t){return(0,f["default"])(!this.actual,t||"Expected %s to not exist",this.actual),this}},{key:"toBe",value:function(t,e){return(0,f["default"])(this.actual===t,e||"Expected %s to be %s",this.actual,t),this}},{key:"toNotBe",value:function(t,e){return(0,f["default"])(this.actual!==t,e||"Expected %s to not be %s",this.actual,t),this}},{key:"toEqual",value:function(t,e){try{(0,f["default"])((0,i["default"])(this.actual,t),e||"Expected %s to equal %s",this.actual,t)}catch(n){throw n.showDiff=!0,n.actual=this.actual,n.expected=t,n}return this}},{key:"toNotEqual",value:function(t,e){return(0,f["default"])(!(0,i["default"])(this.actual,t),e||"Expected %s to not equal %s",this.actual,t),this}},{key:"toThrow",value:function(t,e){return(0,f["default"])((0,y.isFunction)(this.actual),'The "actual" argument in expect(actual).toThrow() must be a function, %s was given',this.actual),(0,f["default"])((0,y.functionThrows)(this.actual,this.context,this.args,t),e||"Expected %s to throw %s",this.actual,t||"an error"),this}},{key:"toNotThrow",value:function(t,e){return(0,f["default"])((0,y.isFunction)(this.actual),'The "actual" argument in expect(actual).toNotThrow() must be a function, %s was given',this.actual),(0,f["default"])(!(0,y.functionThrows)(this.actual,this.context,this.args,t),e||"Expected %s to not throw %s",this.actual,t||"an error"),this}},{key:"toBeA",value:function(t,e){return(0,f["default"])((0,y.isFunction)(t)||"string"==typeof t,'The "value" argument in toBeA(value) must be a function or a string'),(0,f["default"])((0,y.isA)(this.actual,t),e||"Expected %s to be a %s",this.actual,t),this}},{key:"toNotBeA",value:function(t,e){return(0,f["default"])((0,y.isFunction)(t)||"string"==typeof t,'The "value" argument in toNotBeA(value) must be a function or a string'),(0,f["default"])(!(0,y.isA)(this.actual,t),e||"Expected %s to be a %s",this.actual,t),this}},{key:"toMatch",value:function(t,e){return(0,f["default"])("string"==typeof this.actual,'The "actual" argument in expect(actual).toMatch() must be a string'),(0,f["default"])((0,s["default"])(t),'The "value" argument in toMatch(value) must be a RegExp'),(0,f["default"])(t.test(this.actual),e||"Expected %s to match %s",this.actual,t),this}},{key:"toNotMatch",value:function(t,e){return(0,f["default"])("string"==typeof this.actual,'The "actual" argument in expect(actual).toNotMatch() must be a string'),(0,f["default"])((0,s["default"])(t),'The "value" argument in toNotMatch(value) must be a RegExp'),(0,f["default"])(!t.test(this.actual),e||"Expected %s to not match %s",this.actual,t),this}},{key:"toBeLessThan",value:function(t,e){return(0,f["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeLessThan() must be a number'),(0,f["default"])("number"==typeof t,'The "value" argument in toBeLessThan(value) must be a number'),(0,f["default"])(this.actual<t,e||"Expected %s to be less than %s",this.actual,t),this}},{key:"toBeLessThanOrEqualTo",value:function(t,e){return(0,f["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeLessThanOrEqualTo() must be a number'),(0,f["default"])("number"==typeof t,'The "value" argument in toBeLessThanOrEqualTo(value) must be a number'),(0,f["default"])(this.actual<=t,e||"Expected %s to be less than or equal to %s",this.actual,t),this}},{key:"toBeGreaterThan",value:function(t,e){return(0,f["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeGreaterThan() must be a number'),(0,f["default"])("number"==typeof t,'The "value" argument in toBeGreaterThan(value) must be a number'),(0,f["default"])(this.actual>t,e||"Expected %s to be greater than %s",this.actual,t),this}},{key:"toBeGreaterThanOrEqualTo",value:function(t,e){return(0,f["default"])("number"==typeof this.actual,'The "actual" argument in expect(actual).toBeGreaterThanOrEqualTo() must be a number'),(0,f["default"])("number"==typeof t,'The "value" argument in toBeGreaterThanOrEqualTo(value) must be a number'),(0,f["default"])(this.actual>=t,e||"Expected %s to be greater than or equal to %s",this.actual,t),this}},{key:"toInclude",value:function(t,e,n){return(0,f["default"])((0,y.isArray)(this.actual)||"string"==typeof this.actual,'The "actual" argument in expect(actual).toInclude() must be an array or a string'),"string"==typeof e&&(n=e,e=null),n=n||"Expected %s to include %s",(0,y.isArray)(this.actual)?(0,f["default"])((0,y.arrayContains)(this.actual,t,e),n,this.actual,t):(0,f["default"])((0,y.stringContains)(this.actual,t),n,this.actual,t),this}},{key:"toExclude",value:function(t,e,n){return(0,f["default"])((0,y.isArray)(this.actual)||"string"==typeof this.actual,'The "actual" argument in expect(actual).toExclude() must be an array or a string'),"string"==typeof e&&(n=e,e=null),n=n||"Expected %s to exclude %s",(0,y.isArray)(this.actual)?(0,f["default"])(!(0,y.arrayContains)(this.actual,t,e),n,this.actual,t):(0,f["default"])(!(0,y.stringContains)(this.actual,t),n,this.actual,t),this}},{key:"toHaveBeenCalled",value:function(t){var e=this.actual;return(0,f["default"])((0,p.isSpy)(e),'The "actual" argument in expect(actual).toHaveBeenCalled() must be a spy'),(0,f["default"])(e.calls.length>0,t||"spy was not called"),this}},{key:"toHaveBeenCalledWith",value:function(){var t=this.actual;(0,f["default"])((0,p.isSpy)(t),'The "actual" argument in expect(actual).toHaveBeenCalledWith() must be a spy');var e=Array.prototype.slice.call(arguments,0);return(0,f["default"])(t.calls.some(function(t){return(0,i["default"])(t.arguments,e)}),"spy was never called with %s",e),this}},{key:"toNotHaveBeenCalled",value:function(t){var e=this.actual;return(0,f["default"])((0,p.isSpy)(e),'The "actual" argument in expect(actual).toNotHaveBeenCalled() must be a spy'),(0,f["default"])(0===e.calls.length,t||"spy was not supposed to be called"),this}},{key:"withContext",value:function(t){return(0,f["default"])((0,y.isFunction)(this.actual),'The "actual" argument in expect(actual).withContext() must be a function'),this.context=t,this}},{key:"withArgs",value:function(){return(0,f["default"])((0,y.isFunction)(this.actual),'The "actual" argument in expect(actual).withArgs() must be a function'),arguments.length&&(this.args=this.args.concat(Array.prototype.slice.call(arguments,0))),this}}]),t}(),d={toBeAn:"toBeA",toNotBeAn:"toNotBeA",toBeTruthy:"toExist",toBeFalsy:"toNotExist",toBeFewerThan:"toBeLessThan",toBeMoreThan:"toBeGreaterThan",toContain:"toInclude",toNotContain:"toExclude"};for(var g in d)h.prototype[g]=h.prototype[d[g]];e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){}function a(t){var e=arguments.length<=1||void 0===arguments[1]?o:arguments[1];null==t&&(t=o),(0,l["default"])((0,f.isFunction)(t),"createSpy needs a function");var n=void 0,r=void 0,a=void 0,u=function i(){if(i.calls.push({context:this,arguments:Array.prototype.slice.call(arguments,0)}),n)return n.apply(this,arguments);if(r)throw r;return a};return u.calls=[],u.andCall=function(t){return n=t,u},u.andCallThrough=function(){return u.andCall(t)},u.andThrow=function(t){return r=t,u},u.andReturn=function(t){return a=t,u},u.getLastCall=function(){return u.calls[u.calls.length-1]},u.reset=function(){u.calls=[]},u.restore=u.destroy=e,u.__isSpy=!0,p.push(u),u}function u(t,e){var n=t[e];return i(n)||((0,l["default"])((0,f.isFunction)(n),"Cannot spyOn the %s property; it is not a function",e),t[e]=a(n,function(){t[e]=n})),t[e]}function i(t){return t&&t.__isSpy===!0}function c(){for(var t=p.length-1;t>=0;t--)p[t].restore();p=[]}Object.defineProperty(e,"__esModule",{value:!0}),e.createSpy=a,e.spyOn=u,e.isSpy=i,e.restoreSpies=c;var s=n(1),l=r(s),f=n(5),p=[]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n,r){try{t.apply(e,n)}catch(o){if(null==r)return!0;if(c(r)&&o instanceof r)return!0;var a=o.message||o;if("string"==typeof a){if((0,h["default"])(r)&&r.test(o.message))return!0;if("string"==typeof r&&-1!==a.indexOf(r))return!0}}return!1}function a(t,e,n){return null==n&&(n=p["default"]),t.some(function(t){return n(t,e)!==!1})}function u(t,e){return-1!==t.indexOf(e)}function i(t){return Array.isArray(t)}function c(t){return"function"==typeof t}function s(t,e){return c(e)?t instanceof e:"array"===e?Array.isArray(t):("undefined"==typeof t?"undefined":l(t))===e}Object.defineProperty(e,"__esModule",{value:!0});var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.functionThrows=o,e.arrayContains=a,e.stringContains=u,e.isArray=i,e.isFunction=c,e.isA=s;var f=n(7),p=r(f),y=n(2),h=r(y)},function(t,e){"use strict";var n=Function.prototype.toString,r=/^\s*class /,o=function(t){try{var e=n.call(t),o=e.replace(/\/\/.*\n/g,""),a=o.replace(/\/\*[.\s\S]*\*\//g,""),u=a.replace(/\n/gm," ").replace(/ {2}/g," ");return r.test(u)}catch(i){return!1}},a=function(t){try{return o(t)?!1:(n.call(t),!0)}catch(e){return!1}},u=Object.prototype.toString,i="[object Function]",c="[object GeneratorFunction]",s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(s)return a(t);if(o(t))return!1;var e=u.call(t);return e===i||e===c}},function(t,e,n){"use strict";var r=n(18);t.exports=function(t,e){return""===r(t,e)}},function(t,e){"use strict";var n=Object.prototype.toString,r="function"==typeof Symbol&&"symbol"==typeof Symbol();if(r){var o=Symbol.prototype.toString,a=/^Symbol\(.*\)$/,u=function(t){return"symbol"!=typeof t.valueOf()?!1:a.test(o.call(t))};t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return u(t)}catch(e){return!1}}}else t.exports=function(t){return!1}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(-1===i.indexOf(t)){i.push(t);for(var e in t)t.hasOwnProperty(e)&&(u["default"].prototype[e]=t[e])}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(3),u=r(a),i=[];e["default"]=o},function(t,e){var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,a="[object Function]";t.exports=function(t){var e=this;if("function"!=typeof e||o.call(e)!==a)throw new TypeError(n+e);for(var u,i=r.call(arguments,1),c=function(){if(this instanceof u){var n=e.apply(this,i.concat(r.call(arguments)));return Object(n)===n?n:this}return e.apply(t,i.concat(r.call(arguments)))},s=Math.max(0,e.length-i.length),l=[],f=0;s>f;f++)l.push("$"+f);if(u=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(c),e.prototype){var p=function(){};p.prototype=e.prototype,u.prototype=new p,p.prototype=null}return u}},function(t,e,n){var r=n(10);t.exports=Function.prototype.bind||r},function(t,e,n){var r=n(11);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,n){"use strict";var r=n(6),o=Function.prototype.toString,a=/^\s*function/,u=/^\([^\)]*\) *=>/,i=/^[^=]*=>/;t.exports=function(t){if(!r(t))return!1;var e=o.call(t);return e.length>0&&!a.test(e)&&(u.test(e)||i.test(e))}},function(t,e){"use strict";var n=Boolean.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object Boolean]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"boolean"==typeof t?!0:"object"!=typeof t?!1:u?r(t):o.call(t)===a}},function(t,e){"use strict";var n=Date.prototype.getDay,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object Date]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"!=typeof t||null===t?!1:u?r(t):o.call(t)===a}},function(t,e){"use strict";t.exports=function(){var t=function(){if("function"!=typeof Map)return null;try{Map.prototype.forEach.call({},function(){})}catch(t){return Map.prototype.forEach}return null}(),e=function(){if("function"!=typeof Set)return null;try{Set.prototype.forEach.call({},function(){})}catch(t){return Set.prototype.forEach}return null}();return{Map:t,Set:e}}},function(t,e,n){"use strict";var r=n(8);t.exports=function(){var t="function"==typeof Symbol&&r(Symbol.iterator)?Symbol.iterator:null;return"function"==typeof Object.getOwnPropertyNames&&"function"==typeof Map&&"function"==typeof Map.prototype.entries&&Object.getOwnPropertyNames(Map.prototype).forEach(function(e){"entries"!==e&&"size"!==e&&Map.prototype[e]===Map.prototype.entries&&(t=e)}),t}},function(t,e,n){"use strict";var r=Object.prototype,o=r.toString,a=Boolean.prototype.valueOf,u=n(12),i=n(13),c=n(14),s=n(15),l=n(19),f=n(20),p=n(2),y=n(21),h=n(8),d=n(6),g=Object.prototype.isPrototypeOf,m=function(){},b="foo"===m.name,v="function"==typeof Symbol?Symbol.prototype.valueOf:null,S=n(17)(),x=n(16)(),j=Object.getPrototypeOf;j||(j="object"==typeof"test".__proto__?function(t){return t.__proto__}:function(t){var e,n=t.constructor;if(u(t,"constructor")){if(e=n,!delete t.constructor)return null;n=t.constructor,t.constructor=e}return n?n.prototype:r});var T=Array.isArray||function(t){return"[object Array]"===o.call(t)},O=function(t){return t.replace(/^function ?\(/,"function (").replace("){",") {")},E=function(t){var e=[];try{x.Map.call(t,function(t,n){e.push([t,n])})}catch(n){try{x.Set.call(t,function(t){e.push([t])})}catch(r){return!1}}return e};t.exports=function w(t,e){if(t===e)return"";if(null==t||null==e)return t===e?"":String(t)+" !== "+String(e);var n=o.call(t),r=o.call(t);if(n!==r)return"toStringTag is not the same: "+n+" !== "+r;var m=c(t),A=c(e);if(m||A){if(!m)return"first argument is not a boolean; second argument is";if(!A)return"second argument is not a boolean; first argument is";var M=a.call(t),B=a.call(e);return M===B?"":"primitive value of boolean arguments do not match: "+M+" !== "+B}var _=f(t),N=f(t);if(_||N){if(!_)return"first argument is not a number; second argument is";if(!N)return"second argument is not a number; first argument is";var C=Number(t),k=Number(e);if(C===k)return"";var F=isNaN(t),P=isNaN(e);return F&&!P?"first argument is NaN; second is not":!F&&P?"second argument is NaN; first is not":F&&P?"":"numbers are different: "+t+" !== "+e}var q=y(t),D=y(e);if(q||D){if(!q)return"second argument is string; first is not";if(!D)return"first argument is string; second is not";var L=String(t),G=String(e);return L===G?"":'string values are different: "'+L+'" !== "'+G+'"'}var H=s(t),R=s(e);if(H||R){if(!H)return"second argument is Date, first is not";if(!R)return"first argument is Date, second is not";var $=+t,z=+e;return $===z?"":"Dates have different time values: "+$+" !== "+z}var I=p(t),W=p(e);if(I||W){if(!I)return"second argument is RegExp, first is not";if(!W)return"first argument is RegExp, second is not";var J=String(t),K=String(e);return J===K?"":"regular expressions differ: "+J+" !== "+K}var Q=T(t),U=T(e);if(Q||U){if(!Q)return"second argument is an Array, first is not";if(!U)return"first argument is an Array, second is not";if(t.length!==e.length)return"arrays have different length: "+t.length+" !== "+e.length;if(String(t)!==String(e))return"stringified Arrays differ";for(var V,X,Y=t.length-1,Z="";""===Z&&Y>=0;){if(V=u(t,Y),X=u(e,Y),!V&&X)return"second argument has index "+Y+"; first does not";if(V&&!X)return"first argument has index "+Y+"; second does not";Z=w(t[Y],e[Y]),Y-=1}return Z}var tt=h(t),et=h(e);if(tt!==et)return tt?"first argument is Symbol; second is not":"second argument is Symbol; first is not";if(tt&&et)return v.call(t)===v.call(e)?"":"first Symbol value !== second Symbol value";var nt=l(t),rt=l(e);if(nt!==rt)return nt?"first argument is a Generator; second is not":"second argument is a Generator; first is not";var ot=i(t),at=i(e);if(ot!==at)return ot?"first argument is an Arrow function; second is not":"second argument is an Arrow function; first is not";if(d(t)||d(e)){if(b&&""!==w(t.name,e.name))return'Function names differ: "'+t.name+'" !== "'+e.name+'"';if(""!==w(t.length,e.length))return"Function lengths differ: "+t.length+" !== "+e.length;var ut=O(String(t)),it=O(String(e));return""===w(ut,it)?"":nt||ot?""===w(ut,it)?"":"Function string representations differ":""===w(ut.replace(/\)\s*\{/,"){"),it.replace(/\)\s*\{/,"){"))?"":"Function string representations differ"}if("object"==typeof t||"object"==typeof e){if(typeof t!=typeof e)return"arguments have a different typeof: "+typeof t+" !== "+typeof e;if(g.call(t,e))return"first argument is the [[Prototype]] of the second";if(g.call(e,t))return"second argument is the [[Prototype]] of the first";if(j(t)!==j(e))return"arguments have a different [[Prototype]]";if(S){var ct=t[S],st=d(ct),lt=e[S],ft=d(lt);if(st!==ft)return st?"first argument is iterable; second is not":"second argument is iterable; first is not";if(st&&ft){var pt,yt,ht,dt=ct.call(t),gt=lt.call(e);do if(pt=dt.next(),yt=gt.next(),!pt.done&&!yt.done&&(ht=w(pt,yt),""!==ht))return"iteration results are not equal: "+ht;while(!pt.done&&!yt.done);return pt.done&&!yt.done?"first argument finished iterating before second":!pt.done&&yt.done?"second argument finished iterating before first":""}}else if(x.Map||x.Set){var mt=E(t),bt=E(e),vt=T(mt),St=T(bt);if(vt&&!St)return"first argument has Collection entries, second does not";if(!vt&&St)return"second argument has Collection entries, first does not";if(vt&&St){var xt=w(mt,bt);return""===xt?"":"Collection entries differ: "+xt}}var jt,Tt,Ot,Et;for(jt in t)if(u(t,jt)){if(!u(e,jt))return'first argument has key "'+jt+'"; second does not';if(Tt=t[jt]&&t[jt][jt]===t,Ot=e[jt]&&e[jt][jt]===e,Tt!==Ot)return Tt?'first argument has a circular reference at key "'+jt+'"; second does not':'second argument has a circular reference at key "'+jt+'"; first does not';if(!Tt&&!Ot&&(Et=w(t[jt],e[jt]),""!==Et))return'value at key "'+jt+'" differs: '+Et}for(jt in e)if(u(e,jt)&&!u(t,jt))return'second argument has key "'+jt+'"; first does not';return""}return!1}},function(t,e){"use strict";var n=Object.prototype.toString,r=Function.prototype.toString,o=/^\s*function\*/;t.exports=function(t){if("function"!=typeof t)return!1;var e=n.call(t);return("[object Function]"===e||"[object GeneratorFunction]"===e)&&o.test(r.call(t))}},function(t,e){"use strict";var n=Number.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object Number]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"number"==typeof t?!0:"object"!=typeof t?!1:u?r(t):o.call(t)===a}},function(t,e){"use strict";var n=String.prototype.valueOf,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,a="[object String]",u="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"string"==typeof t?!0:"object"!=typeof t?!1:u?r(t):o.call(t)===a}},function(t,e){function n(t){return String(t).replace(/"/g,"&quot;")}function r(t){return"[object Array]"===s(t)}function o(t){return"[object Date]"===s(t)}function a(t){return"[object RegExp]"===s(t)}function u(t){return"[object Error]"===s(t)}function i(t){return"[object Symbol]"===s(t)}function c(t,e){return O.call(t,e)}function s(t){return Object.prototype.toString.call(t)}function l(t){if(t.name)return t.name;var e=t.toString().match(/^function\s*([\w$]+)/);return e?e[1]:void 0}function f(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1}function p(t){if(!b)return!1;try{return b.call(t),!0}catch(e){}return!1}function y(t){if(!j)return!1;try{return j.call(t),!0}catch(e){}return!1}function h(t){return t&&"object"==typeof t?"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?!0:"string"==typeof t.nodeName&&"function"==typeof t.getAttribute:!1}function d(t){function e(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(16>e?"0":"")+e.toString(16)}var n=t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,e);return"'"+n+"'"}var g="function"==typeof Map&&Map.prototype,m=Object.getOwnPropertyDescriptor&&g?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,b=g&&m&&"function"==typeof m.get?m.get:null,v=g&&Map.prototype.forEach,S="function"==typeof Set&&Set.prototype,x=Object.getOwnPropertyDescriptor&&S?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,j=S&&x&&"function"==typeof x.get?x.get:null,T=S&&Set.prototype.forEach;t.exports=function E(t,e,s,g){function m(t,n){return n&&(g=g.slice(),g.push(n)),E(t,e,s+1,g)}e||(e={});var S=void 0===e.depth?5:e.depth;if(void 0===s&&(s=0),s>=S&&S>0&&t&&"object"==typeof t)return"[Object]";if(void 0===g)g=[];else if(f(g,t)>=0)return"[Circular]";if("string"==typeof t)return d(t);if("function"==typeof t){var x=l(t);return"[Function"+(x?": "+x:"")+"]"}if(null===t)return"null";if(i(t)){var O=Symbol.prototype.toString.call(t);return"object"==typeof t?"Object("+O+")":O}if(h(t)){for(var w="<"+String(t.nodeName).toLowerCase(),A=t.attributes||[],M=0;M<A.length;M++)w+=" "+A[M].name+'="'+n(A[M].value)+'"';return w+=">",t.childNodes&&t.childNodes.length&&(w+="..."),w+="</"+String(t.nodeName).toLowerCase()+">"}if(r(t)){if(0===t.length)return"[]";for(var B=Array(t.length),M=0;M<t.length;M++)B[M]=c(t,M)?m(t[M],t):"";return"[ "+B.join(", ")+" ]"}if(u(t)){var _=[];for(var N in t)c(t,N)&&(/[^\w$]/.test(N)?_.push(m(N)+": "+m(t[N])):_.push(N+": "+m(t[N])));return 0===_.length?"["+t+"]":"{ ["+t+"] "+_.join(", ")+" }"}if("object"==typeof t&&"function"==typeof t.inspect)return t.inspect();if(p(t)){var _=[];return v.call(t,function(e,n){_.push(m(n,t)+" => "+m(e,t))}),"Map ("+b.call(t)+") {"+_.join(", ")+"}"}if(y(t)){var _=[];return T.call(t,function(e){_.push(m(e,t))}),"Set ("+j.call(t)+") {"+_.join(", ")+"}"}if("object"!=typeof t||o(t)||a(t))return String(t);var B=[],C=[];for(var N in t)c(t,N)&&C.push(N);C.sort();for(var M=0;M<C.length;M++){var N=C[M];/[^\w$]/.test(N)?B.push(m(N)+": "+m(t[N],t)):B.push(N+": "+m(t[N],t))}return 0===B.length?"{}":"{ "+B.join(", ")+" }"};var O=Object.prototype.hasOwnProperty||function(t){return t in this}}])});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc