jellyfin-web/dashboard-ui/bower_components/fingerprintjs2/specs/lib/jasmine-2.3.4/jasmine-matchers.js

1758 lines
50 KiB
JavaScript
Raw Normal View History

2016-04-18 11:50:29 -07:00
(function e(t, n, r) {
function s(o, u) {
if (!n[o]) {
if (!t[o]) {
var a = typeof require == 'function' && require;
if (!u && a) {
return a(o, !0);
}
if (i) {
return i(o, !0);
}
var f = new Error('Cannot find module \'' + o + '\'');
throw f.code = 'MODULE_NOT_FOUND', f
}
var l = n[o] = {
exports: {}
};
t[o][0].call(l.exports, function(e) {
var n = t[o][1][e];
return s(n ? n : e);
}, l, l.exports, e, t, n, r);
}
return n[o].exports;
}
var i = typeof require == 'function' && require;
for (var o = 0; o < r.length; o++) {
s(r[o]);
}
return s;
})({
1: [function(require, module, exports) {
'use strict';
/*
* Copyright © Jamie Mason, @fold_left,
* https://github.com/JamieMason
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var factory = require('./lib/factory');
var matchers = {
toBeAfter: require('./toBeAfter'),
toBeArray: require('./toBeArray'),
toBeArrayOfBooleans: require('./toBeArrayOfBooleans'),
toBeArrayOfNumbers: require('./toBeArrayOfNumbers'),
toBeArrayOfObjects: require('./toBeArrayOfObjects'),
toBeArrayOfSize: require('./toBeArrayOfSize'),
toBeArrayOfStrings: require('./toBeArrayOfStrings'),
toBeBefore: require('./toBeBefore'),
toBeBoolean: require('./toBeBoolean'),
toBeCalculable: require('./toBeCalculable'),
toBeDate: require('./toBeDate'),
toBeEmptyArray: require('./toBeEmptyArray'),
toBeEmptyObject: require('./toBeEmptyObject'),
toBeEmptyString: require('./toBeEmptyString'),
toBeEvenNumber: require('./toBeEvenNumber'),
toBeFalse: require('./toBeFalse'),
toBeFunction: require('./toBeFunction'),
toBeHtmlString: require('./toBeHtmlString'),
toBeIso8601: require('./toBeIso8601'),
toBeJsonString: require('./toBeJsonString'),
toBeLongerThan: require('./toBeLongerThan'),
toBeNonEmptyArray: require('./toBeNonEmptyArray'),
toBeNonEmptyObject: require('./toBeNonEmptyObject'),
toBeNonEmptyString: require('./toBeNonEmptyString'),
toBeNumber: require('./toBeNumber'),
toBeObject: require('./toBeObject'),
toBeOddNumber: require('./toBeOddNumber'),
toBeSameLengthAs: require('./toBeSameLengthAs'),
toBeShorterThan: require('./toBeShorterThan'),
toBeString: require('./toBeString'),
toBeTrue: require('./toBeTrue'),
toBeWhitespace: require('./toBeWhitespace'),
toBeWholeNumber: require('./toBeWholeNumber'),
toBeWithinRange: require('./toBeWithinRange'),
toEndWith: require('./toEndWith'),
toImplement: require('./toImplement'),
toStartWith: require('./toStartWith'),
toThrowAnyError: require('./toThrowAnyError'),
toThrowErrorOfType: require('./toThrowErrorOfType'),
toHaveArray: require('./toHaveArray'),
toHaveArrayOfBooleans: require('./toHaveArrayOfBooleans'),
toHaveArrayOfNumbers: require('./toHaveArrayOfNumbers'),
toHaveArrayOfObjects: require('./toHaveArrayOfObjects'),
toHaveArrayOfSize: require('./toHaveArrayOfSize'),
toHaveArrayOfStrings: require('./toHaveArrayOfStrings'),
toHaveBoolean: require('./toHaveBoolean'),
toHaveCalculable: require('./toHaveCalculable'),
toHaveDate: require('./toHaveDate'),
toHaveDateAfter: require('./toHaveDateAfter'),
toHaveDateBefore: require('./toHaveDateBefore'),
toHaveEmptyArray: require('./toHaveEmptyArray'),
toHaveEmptyObject: require('./toHaveEmptyObject'),
toHaveEmptyString: require('./toHaveEmptyString'),
toHaveEvenNumber: require('./toHaveEvenNumber'),
toHaveFalse: require('./toHaveFalse'),
toHaveHtmlString: require('./toHaveHtmlString'),
toHaveIso8601: require('./toHaveIso8601'),
toHaveJsonString: require('./toHaveJsonString'),
toHaveMember: require('./toHaveMember'),
toHaveMethod: require('./toHaveMethod'),
toHaveNonEmptyArray: require('./toHaveNonEmptyArray'),
toHaveNonEmptyObject: require('./toHaveNonEmptyObject'),
toHaveNonEmptyString: require('./toHaveNonEmptyString'),
toHaveNumber: require('./toHaveNumber'),
toHaveNumberWithinRange: require('./toHaveNumberWithinRange'),
toHaveObject: require('./toHaveObject'),
toHaveOddNumber: require('./toHaveOddNumber'),
toHaveString: require('./toHaveString'),
toHaveStringLongerThan: require('./toHaveStringLongerThan'),
toHaveStringSameLengthAs: require('./toHaveStringSameLengthAs'),
toHaveStringShorterThan: require('./toHaveStringShorterThan'),
toHaveTrue: require('./toHaveTrue'),
toHaveWhitespaceString: require('./toHaveWhitespaceString'),
toHaveWholeNumber: require('./toHaveWholeNumber')
};
for (var matcherName in matchers) {
factory(matcherName, matchers[matcherName]);
}
module.exports = matchers;
}, {
'./lib/factory': 3,
'./toBeAfter': 10,
'./toBeArray': 11,
'./toBeArrayOfBooleans': 12,
'./toBeArrayOfNumbers': 13,
'./toBeArrayOfObjects': 14,
'./toBeArrayOfSize': 15,
'./toBeArrayOfStrings': 16,
'./toBeBefore': 17,
'./toBeBoolean': 18,
'./toBeCalculable': 19,
'./toBeDate': 20,
'./toBeEmptyArray': 21,
'./toBeEmptyObject': 22,
'./toBeEmptyString': 23,
'./toBeEvenNumber': 24,
'./toBeFalse': 25,
'./toBeFunction': 26,
'./toBeHtmlString': 27,
'./toBeIso8601': 28,
'./toBeJsonString': 29,
'./toBeLongerThan': 30,
'./toBeNonEmptyArray': 31,
'./toBeNonEmptyObject': 32,
'./toBeNonEmptyString': 33,
'./toBeNumber': 34,
'./toBeObject': 35,
'./toBeOddNumber': 36,
'./toBeSameLengthAs': 37,
'./toBeShorterThan': 38,
'./toBeString': 39,
'./toBeTrue': 40,
'./toBeWhitespace': 41,
'./toBeWholeNumber': 42,
'./toBeWithinRange': 43,
'./toEndWith': 44,
'./toHaveArray': 45,
'./toHaveArrayOfBooleans': 46,
'./toHaveArrayOfNumbers': 47,
'./toHaveArrayOfObjects': 48,
'./toHaveArrayOfSize': 49,
'./toHaveArrayOfStrings': 50,
'./toHaveBoolean': 51,
'./toHaveCalculable': 52,
'./toHaveDate': 53,
'./toHaveDateAfter': 54,
'./toHaveDateBefore': 55,
'./toHaveEmptyArray': 56,
'./toHaveEmptyObject': 57,
'./toHaveEmptyString': 58,
'./toHaveEvenNumber': 59,
'./toHaveFalse': 60,
'./toHaveHtmlString': 61,
'./toHaveIso8601': 62,
'./toHaveJsonString': 63,
'./toHaveMember': 64,
'./toHaveMethod': 65,
'./toHaveNonEmptyArray': 66,
'./toHaveNonEmptyObject': 67,
'./toHaveNonEmptyString': 68,
'./toHaveNumber': 69,
'./toHaveNumberWithinRange': 70,
'./toHaveObject': 71,
'./toHaveOddNumber': 72,
'./toHaveString': 73,
'./toHaveStringLongerThan': 74,
'./toHaveStringSameLengthAs': 75,
'./toHaveStringShorterThan': 76,
'./toHaveTrue': 77,
'./toHaveWhitespaceString': 78,
'./toHaveWholeNumber': 79,
'./toImplement': 80,
'./toStartWith': 81,
'./toThrowAnyError': 82,
'./toThrowErrorOfType': 83
}],
2: [function(require, module, exports) {
'use strict';
module.exports = every;
function every(array, truthTest) {
for (var i = 0, len = array.length; i < len; i++) {
if (!truthTest(array[i])) {
return false;
}
}
return true;
}
}, {}],
3: [function(require, module, exports) {
'use strict';
var adapters = typeof jasmine.addMatchers === 'function' ?
require('./jasmine-v2') :
require('./jasmine-v1');
module.exports = function(name, matcher) {
var adapter = adapters[matcher.length];
return adapter(name, matcher);
};
}, {
'./jasmine-v1': 4,
'./jasmine-v2': 5
}],
4: [function(require, module, exports) {
'use strict';
module.exports = {
1: createFactory(forActual),
2: createFactory(forActualAndExpected),
3: createFactory(forActualAndTwoExpected),
4: createFactory(forKeyAndActualAndTwoExpected)
};
function createFactory(adapter) {
return function jasmineV1MatcherFactory(name, matcher) {
var matcherByName = new JasmineV1Matcher(name, adapter, matcher);
beforeEach(function() {
this.addMatchers(matcherByName);
});
return matcherByName;
};
}
function JasmineV1Matcher(name, adapter, matcher) {
this[name] = adapter(name, matcher);
}
function forActual(name, matcher) {
return function(optionalMessage) {
return matcher(this.actual, optionalMessage);
};
}
function forActualAndExpected(name, matcher) {
return function(expected, optionalMessage) {
return matcher(expected, this.actual, optionalMessage);
};
}
function forActualAndTwoExpected(name, matcher) {
return function(expected1, expected2, optionalMessage) {
return matcher(expected1, expected2, this.actual, optionalMessage);
};
}
function forKeyAndActualAndTwoExpected(name, matcher) {
return function(key, expected1, expected2, optionalMessage) {
return matcher(key, expected1, expected2, this.actual, optionalMessage);
};
}
}, {}],
5: [function(require, module, exports) {
'use strict';
var matcherFactory = require('./matcherFactory');
var memberMatcherFactory = require('./memberMatcherFactory');
module.exports = {
1: createFactory(getAdapter(1)),
2: createFactory(getAdapter(2)),
3: createFactory(getAdapter(3)),
4: createFactory(getAdapter(4))
};
function createFactory(adapter) {
return function jasmineV2MatcherFactory(name, matcher) {
var matcherByName = new JasmineV2Matcher(name, adapter, matcher);
beforeEach(function() {
jasmine.addMatchers(matcherByName);
});
return matcherByName;
};
}
function JasmineV2Matcher(name, adapter, matcher) {
this[name] = adapter(name, matcher);
}
function getAdapter(argsCount) {
return function adapter(name, matcher) {
var factory = isMemberMatcher(name) ? memberMatcherFactory : matcherFactory;
return factory[argsCount](name, matcher);
};
}
function isMemberMatcher(name) {
return name.search(/^toHave/) !== -1;
}
}, {
'./matcherFactory': 6,
'./memberMatcherFactory': 7
}],
6: [function(require, module, exports) {
'use strict';
module.exports = {
1: forActual,
2: forActualAndExpected,
3: forActualAndTwoExpected
};
function forActual(name, matcher) {
return function(util) {
return {
compare: function(actual, optionalMessage) {
var passes = matcher(actual);
return {
pass: passes,
message: (
optionalMessage ?
util.buildFailureMessage(name, passes, actual, optionalMessage) :
util.buildFailureMessage(name, passes, actual)
)
};
}
};
};
}
function forActualAndExpected(name, matcher) {
return function(util) {
return {
compare: function(actual, expected, optionalMessage) {
var passes = matcher(expected, actual);
return {
pass: passes,
message: (
optionalMessage ?
util.buildFailureMessage(name, passes, actual, expected, optionalMessage) :
util.buildFailureMessage(name, passes, actual, expected)
)
};
}
};
};
}
function forActualAndTwoExpected(name, matcher) {
return function(util) {
return {
compare: function(actual, expected1, expected2, optionalMessage) {
var passes = matcher(expected1, expected2, actual);
return {
pass: passes,
message: (
optionalMessage ?
util.buildFailureMessage(name, passes, actual, expected1, expected2, optionalMessage) :
util.buildFailureMessage(name, passes, actual, expected1, expected2)
)
};
}
};
};
}
}, {}],
7: [function(require, module, exports) {
'use strict';
module.exports = {
2: forKeyAndActual,
3: forKeyAndActualAndExpected,
4: forKeyAndActualAndTwoExpected
};
function forKeyAndActual(name, matcher) {
return function(util) {
return {
compare: function(actual, key, optionalMessage) {
var passes = matcher(key, actual);
return {
pass: passes,
message: (
optionalMessage ?
util.buildFailureMessage(name, passes, actual, optionalMessage) :
util.buildFailureMessage(name, passes, actual)
)
};
}
};
};
}
function forKeyAndActualAndExpected(name, matcher) {
return function(util) {
return {
compare: function(actual, key, expected, optionalMessage) {
var passes = matcher(key, expected, actual);
return {
pass: passes,
message: (
optionalMessage ?
util.buildFailureMessage(name, passes, actual, expected, optionalMessage) :
util.buildFailureMessage(name, passes, actual, expected)
)
};
}
};
};
}
function forKeyAndActualAndTwoExpected(name, matcher) {
return function(util) {
return {
compare: function(actual, key, expected1, expected2, optionalMessage) {
var passes = matcher(key, expected1, expected2, actual);
return {
pass: passes,
message: (
optionalMessage ?
util.buildFailureMessage(name, passes, actual, expected1, expected2, optionalMessage) :
util.buildFailureMessage(name, passes, actual, expected1, expected2)
)
};
}
};
};
}
}, {}],
8: [function(require, module, exports) {
'use strict';
module.exports = is;
function is(value, type) {
return Object.prototype.toString.call(value) === '[object ' + type + ']';
}
}, {}],
9: [function(require, module, exports) {
'use strict';
module.exports = keys;
function keys(object) {
var list = [];
for (var key in object) {
if (object.hasOwnProperty(key)) {
list.push(key);
}
}
return list;
}
}, {}],
10: [function(require, module, exports) {
'use strict';
var toBeBefore = require('./toBeBefore');
module.exports = toBeAfter;
function toBeAfter(otherDate, actual) {
return toBeBefore(actual, otherDate);
}
}, {
'./toBeBefore': 17
}],
11: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeArray;
function toBeArray(actual) {
return is(actual, 'Array');
}
}, {
'./lib/is': 8
}],
12: [function(require, module, exports) {
'use strict';
var every = require('./lib/every');
var toBeArray = require('./toBeArray');
var toBeBoolean = require('./toBeBoolean');
module.exports = toBeArrayOfBooleans;
function toBeArrayOfBooleans(actual) {
return toBeArray(actual) &&
every(actual, toBeBoolean);
}
}, {
'./lib/every': 2,
'./toBeArray': 11,
'./toBeBoolean': 18
}],
13: [function(require, module, exports) {
'use strict';
var every = require('./lib/every');
var toBeArray = require('./toBeArray');
var toBeNumber = require('./toBeNumber');
module.exports = toBeArrayOfBooleans;
function toBeArrayOfBooleans(actual) {
return toBeArray(actual) &&
every(actual, toBeNumber);
}
}, {
'./lib/every': 2,
'./toBeArray': 11,
'./toBeNumber': 34
}],
14: [function(require, module, exports) {
'use strict';
var every = require('./lib/every');
var toBeArray = require('./toBeArray');
var toBeObject = require('./toBeObject');
module.exports = toBeArrayOfBooleans;
function toBeArrayOfBooleans(actual) {
return toBeArray(actual) &&
every(actual, toBeObject);
}
}, {
'./lib/every': 2,
'./toBeArray': 11,
'./toBeObject': 35
}],
15: [function(require, module, exports) {
'use strict';
var toBeArray = require('./toBeArray');
module.exports = toBeArrayOfSize;
function toBeArrayOfSize(size, actual) {
return toBeArray(actual) &&
actual.length === size;
}
}, {
'./toBeArray': 11
}],
16: [function(require, module, exports) {
'use strict';
var every = require('./lib/every');
var toBeArray = require('./toBeArray');
var toBeString = require('./toBeString');
module.exports = toBeArrayOfStrings;
function toBeArrayOfStrings(actual) {
return toBeArray(actual) &&
every(actual, toBeString);
}
}, {
'./lib/every': 2,
'./toBeArray': 11,
'./toBeString': 39
}],
17: [function(require, module, exports) {
'use strict';
var toBeDate = require('./toBeDate');
module.exports = toBeBefore;
function toBeBefore(otherDate, actual) {
return toBeDate(actual) &&
toBeDate(otherDate) &&
actual.getTime() < otherDate.getTime();
}
}, {
'./toBeDate': 20
}],
18: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeBoolean;
function toBeBoolean(actual) {
return is(actual, 'Boolean');
}
}, {
'./lib/is': 8
}],
19: [function(require, module, exports) {
'use strict';
module.exports = toBeCalculable;
// Assert subject can be used in Mathemetic
// calculations despite not being a Number,
// for example `"1" * "2" === 2` whereas
// `"wut?" * 2 === NaN`.
function toBeCalculable(actual) {
return !isNaN(actual * 2);
}
}, {}],
20: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeDate;
function toBeDate(actual) {
return is(actual, 'Date');
}
}, {
'./lib/is': 8
}],
21: [function(require, module, exports) {
'use strict';
var toBeArrayOfSize = require('./toBeArrayOfSize');
module.exports = toBeEmptyArray;
function toBeEmptyArray(actual) {
return toBeArrayOfSize(0, actual);
}
}, {
'./toBeArrayOfSize': 15
}],
22: [function(require, module, exports) {
'use strict';
var keys = require('./lib/keys');
var is = require('./lib/is');
module.exports = toBeEmptyObject;
function toBeEmptyObject(actual) {
return is(actual, 'Object') &&
keys(actual).length === 0;
}
}, {
'./lib/is': 8,
'./lib/keys': 9
}],
23: [function(require, module, exports) {
'use strict';
module.exports = toBeEmptyString;
function toBeEmptyString(actual) {
return actual === '';
}
}, {}],
24: [function(require, module, exports) {
'use strict';
var toBeNumber = require('./toBeNumber');
module.exports = toBeEvenNumber;
function toBeEvenNumber(actual) {
return toBeNumber(actual) &&
actual % 2 === 0;
}
}, {
'./toBeNumber': 34
}],
25: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeFalse;
function toBeFalse(actual) {
return actual === false ||
is(actual, 'Boolean') &&
!actual.valueOf();
}
}, {
'./lib/is': 8
}],
26: [function(require, module, exports) {
'use strict';
module.exports = toBeFunction;
function toBeFunction(actual) {
return typeof actual === 'function';
}
}, {}],
27: [function(require, module, exports) {
'use strict';
var toBeString = require('./toBeString');
module.exports = toBeHtmlString;
function toBeHtmlString(actual) {
// < start with opening tag "<"
// ( start group 1
// "[^"]*" allow string in "double quotes"
// | OR
// '[^']*' allow string in "single quotes"
// | OR
// [^'">] cant contains one single quotes, double quotes and ">"
// ) end group 1
// * 0 or more
// > end with closing tag ">"
return toBeString(actual) &&
actual.search(/<("[^"]*"|'[^']*'|[^'">])*>/) !== -1;
}
}, {
'./toBeString': 39
}],
28: [function(require, module, exports) {
'use strict';
var toBeString = require('./toBeString');
module.exports = toBeIso8601;
function toBeIso8601(actual) {
if (!toBeString(actual)) {
return false;
}
if (
isIso8601(actual, [
// 2013-07-08
4, '-', 2, '-', 2
]) || isIso8601(actual, [
// 2013-07-08T07:29
4, '-', 2, '-', 2, 'T', 2, ':', 2
]) || isIso8601(actual, [
// 2013-07-08T07:29:15
4, '-', 2, '-', 2, 'T', 2, ':', 2, ':', 2
]) || isIso8601(actual, [
// 2013-07-08T07:29:15.863
4, '-', 2, '-', 2, 'T', 2, ':', 2, ':', 2, '.', 3
]) || isIso8601(actual, [
// 2013-07-08T07:29:15.863Z
4, '-', 2, '-', 2, 'T', 2, ':', 2, ':', 2, '.', 3, 'Z'
])
) {
return new Date(actual).toString() !== 'Invalid Date';
}
return false;
}
function isIso8601(string, pattern) {
var returnValue = string.search(
new RegExp('^' + pattern.map(function(term) {
if (term === '-') {
return '\\-';
} else if (typeof term === 'string') {
return term;
} else {
return '([0-9]{' + term + '})';
}
}).join('') + '$')
) !== -1;
return returnValue;
}
}, {
'./toBeString': 39
}],
29: [function(require, module, exports) {
'use strict';
module.exports = toBeJsonString;
function toBeJsonString(actual) {
var isParseable;
var json;
try {
json = JSON.parse(actual);
} catch (e) {
isParseable = false;
}
return isParseable !== false &&
json !== null;
}
}, {}],
30: [function(require, module, exports) {
'use strict';
var toBeString = require('./toBeString');
module.exports = toBeLongerThan;
function toBeLongerThan(otherString, actual) {
return toBeString(actual) &&
toBeString(otherString) &&
actual.length > otherString.length;
}
}, {
'./toBeString': 39
}],
31: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeNonEmptyArray;
function toBeNonEmptyArray(actual) {
return is(actual, 'Array') &&
actual.length > 0;
}
}, {
'./lib/is': 8
}],
32: [function(require, module, exports) {
'use strict';
var keys = require('./lib/keys');
var is = require('./lib/is');
module.exports = toBeNonEmptyObject;
function toBeNonEmptyObject(actual) {
return is(actual, 'Object') &&
keys(actual).length > 0;
}
}, {
'./lib/is': 8,
'./lib/keys': 9
}],
33: [function(require, module, exports) {
'use strict';
var toBeString = require('./toBeString');
module.exports = toBeNonEmptyString;
function toBeNonEmptyString(actual) {
return toBeString(actual) &&
actual.length > 0;
}
}, {
'./toBeString': 39
}],
34: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeNumber;
function toBeNumber(actual) {
return !isNaN(parseFloat(actual)) &&
!is(actual, 'String');
}
}, {
'./lib/is': 8
}],
35: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeObject;
function toBeObject(actual) {
return is(actual, 'Object');
}
}, {
'./lib/is': 8
}],
36: [function(require, module, exports) {
'use strict';
var toBeNumber = require('./toBeNumber');
module.exports = toBeOddNumber;
function toBeOddNumber(actual) {
return toBeNumber(actual) &&
actual % 2 !== 0;
}
}, {
'./toBeNumber': 34
}],
37: [function(require, module, exports) {
'use strict';
var toBeString = require('./toBeString');
module.exports = toBeSameLengthAs;
function toBeSameLengthAs(otherString, actual) {
return toBeString(actual) &&
toBeString(otherString) &&
actual.length === otherString.length;
}
}, {
'./toBeString': 39
}],
38: [function(require, module, exports) {
'use strict';
var toBeString = require('./toBeString');
module.exports = toBeShorterThan;
function toBeShorterThan(otherString, actual) {
return toBeString(actual) &&
toBeString(otherString) &&
actual.length < otherString.length;
}
}, {
'./toBeString': 39
}],
39: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeString;
function toBeString(actual) {
return is(actual, 'String');
}
}, {
'./lib/is': 8
}],
40: [function(require, module, exports) {
'use strict';
var is = require('./lib/is');
module.exports = toBeTrue;
function toBeTrue(actual) {
return actual === true ||
is(actual, 'Boolean') &&
actual.valueOf();
}
}, {
'./lib/is': 8
}],
41: [function(require, module, exports) {
'use strict';
var toBeString = require('./toBeString');
module.exports = toBeWhitespace;
function toBeWhitespace(actual) {
return toBeString(actual) &&
actual.search(/\S/) === -1;
}
}, {
'./toBeString': 39
}],
42: [function(require, module, exports) {
'use strict';
var toBeNumber = require('./toBeNumber');
module.exports = toBeWholeNumber;
function toBeWholeNumber(actual) {
return toBeNumber(actual) && (
actual === 0 || actual % 1 === 0
);
}
}, {
'./toBeNumber': 34
}],
43: [function(require, module, exports) {
'use strict';
var toBeNumber = require('./toBeNumber');
module.exports = toBeWithinRange;
function toBeWithinRange(floor, ceiling, actual) {
return toBeNumber(actual) &&
actual >= floor &&
actual <= ceiling;
}
}, {
'./toBeNumber': 34
}],
44: [function(require, module, exports) {
'use strict';
var toBeNonEmptyString = require('./toBeNonEmptyString');
module.exports = toEndWith;
function toEndWith(subString, actual) {
if (!toBeNonEmptyString(actual) || !toBeNonEmptyString(subString)) {
return false;
}
return actual.slice(actual.length - subString.length, actual.length) === subString;
}
}, {
'./toBeNonEmptyString': 33
}],
45: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeArray = require('./toBeArray');
module.exports = toHaveArray;
function toHaveArray(key, actual) {
return toBeObject(actual) &&
toBeArray(actual[key]);
}
}, {
'./toBeArray': 11,
'./toBeObject': 35
}],
46: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeArrayOfBooleans = require('./toBeArrayOfBooleans');
module.exports = toHaveArrayOfBooleans;
function toHaveArrayOfBooleans(key, actual) {
return toBeObject(actual) &&
toBeArrayOfBooleans(actual[key]);
}
}, {
'./toBeArrayOfBooleans': 12,
'./toBeObject': 35
}],
47: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeArrayOfNumbers = require('./toBeArrayOfNumbers');
module.exports = toHaveArrayOfNumbers;
function toHaveArrayOfNumbers(key, actual) {
return toBeObject(actual) &&
toBeArrayOfNumbers(actual[key]);
}
}, {
'./toBeArrayOfNumbers': 13,
'./toBeObject': 35
}],
48: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeArrayOfObjects = require('./toBeArrayOfObjects');
module.exports = toHaveArrayOfObjects;
function toHaveArrayOfObjects(key, actual) {
return toBeObject(actual) &&
toBeArrayOfObjects(actual[key]);
}
}, {
'./toBeArrayOfObjects': 14,
'./toBeObject': 35
}],
49: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeArrayOfSize = require('./toBeArrayOfSize');
module.exports = toHaveArrayOfSize;
function toHaveArrayOfSize(key, size, actual) {
return toBeObject(actual) &&
toBeArrayOfSize(size, actual[key]);
}
}, {
'./toBeArrayOfSize': 15,
'./toBeObject': 35
}],
50: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeArrayOfStrings = require('./toBeArrayOfStrings');
module.exports = toHaveArrayOfStrings;
function toHaveArrayOfStrings(key, actual) {
return toBeObject(actual) &&
toBeArrayOfStrings(actual[key]);
}
}, {
'./toBeArrayOfStrings': 16,
'./toBeObject': 35
}],
51: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeBoolean = require('./toBeBoolean');
module.exports = toHaveBoolean;
function toHaveBoolean(key, actual) {
return toBeObject(actual) &&
toBeBoolean(actual[key]);
}
}, {
'./toBeBoolean': 18,
'./toBeObject': 35
}],
52: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeCalculable = require('./toBeCalculable');
module.exports = toHaveCalculable;
function toHaveCalculable(key, actual) {
return toBeObject(actual) &&
toBeCalculable(actual[key]);
}
}, {
'./toBeCalculable': 19,
'./toBeObject': 35
}],
53: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeDate = require('./toBeDate');
module.exports = toHaveDate;
function toHaveDate(key, actual) {
return toBeObject(actual) &&
toBeDate(actual[key]);
}
}, {
'./toBeDate': 20,
'./toBeObject': 35
}],
54: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeAfter = require('./toBeAfter');
module.exports = toHaveDateAfter;
function toHaveDateAfter(key, date, actual) {
return toBeObject(actual) &&
toBeAfter(date, actual[key]);
}
}, {
'./toBeAfter': 10,
'./toBeObject': 35
}],
55: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeBefore = require('./toBeBefore');
module.exports = toHaveDateBefore;
function toHaveDateBefore(key, date, actual) {
return toBeObject(actual) &&
toBeBefore(date, actual[key]);
}
}, {
'./toBeBefore': 17,
'./toBeObject': 35
}],
56: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeEmptyArray = require('./toBeEmptyArray');
module.exports = toHaveEmptyArray;
function toHaveEmptyArray(key, actual) {
return toBeObject(actual) &&
toBeEmptyArray(actual[key]);
}
}, {
'./toBeEmptyArray': 21,
'./toBeObject': 35
}],
57: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeEmptyObject = require('./toBeEmptyObject');
module.exports = toHaveEmptyObject;
function toHaveEmptyObject(key, actual) {
return toBeObject(actual) &&
toBeEmptyObject(actual[key]);
}
}, {
'./toBeEmptyObject': 22,
'./toBeObject': 35
}],
58: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeEmptyString = require('./toBeEmptyString');
module.exports = toHaveEmptyString;
function toHaveEmptyString(key, actual) {
return toBeObject(actual) &&
toBeEmptyString(actual[key]);
}
}, {
'./toBeEmptyString': 23,
'./toBeObject': 35
}],
59: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeEvenNumber = require('./toBeEvenNumber');
module.exports = toHaveEvenNumber;
function toHaveEvenNumber(key, actual) {
return toBeObject(actual) &&
toBeEvenNumber(actual[key]);
}
}, {
'./toBeEvenNumber': 24,
'./toBeObject': 35
}],
60: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeFalse = require('./toBeFalse');
module.exports = toHaveFalse;
function toHaveFalse(key, actual) {
return toBeObject(actual) &&
toBeFalse(actual[key]);
}
}, {
'./toBeFalse': 25,
'./toBeObject': 35
}],
61: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeHtmlString = require('./toBeHtmlString');
module.exports = toHaveHtmlString;
function toHaveHtmlString(key, actual) {
return toBeObject(actual) &&
toBeHtmlString(actual[key]);
}
}, {
'./toBeHtmlString': 27,
'./toBeObject': 35
}],
62: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeIso8601 = require('./toBeIso8601');
module.exports = toHaveIso8601;
function toHaveIso8601(key, actual) {
return toBeObject(actual) &&
toBeIso8601(actual[key]);
}
}, {
'./toBeIso8601': 28,
'./toBeObject': 35
}],
63: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeJsonString = require('./toBeJsonString');
module.exports = toHaveJsonString;
function toHaveJsonString(key, actual) {
return toBeObject(actual) &&
toBeJsonString(actual[key]);
}
}, {
'./toBeJsonString': 29,
'./toBeObject': 35
}],
64: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeString = require('./toBeString');
module.exports = toHaveMember;
function toHaveMember(key, actual) {
return toBeString(key) &&
toBeObject(actual) &&
key in actual;
}
}, {
'./toBeObject': 35,
'./toBeString': 39
}],
65: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeFunction = require('./toBeFunction');
module.exports = toHaveMethod;
function toHaveMethod(key, actual) {
return toBeObject(actual) &&
toBeFunction(actual[key]);
}
}, {
'./toBeFunction': 26,
'./toBeObject': 35
}],
66: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeNonEmptyArray = require('./toBeNonEmptyArray');
module.exports = toHaveNonEmptyArray;
function toHaveNonEmptyArray(key, actual) {
return toBeObject(actual) &&
toBeNonEmptyArray(actual[key]);
}
}, {
'./toBeNonEmptyArray': 31,
'./toBeObject': 35
}],
67: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeNonEmptyObject = require('./toBeNonEmptyObject');
module.exports = toHaveNonEmptyObject;
function toHaveNonEmptyObject(key, actual) {
return toBeObject(actual) &&
toBeNonEmptyObject(actual[key]);
}
}, {
'./toBeNonEmptyObject': 32,
'./toBeObject': 35
}],
68: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeNonEmptyString = require('./toBeNonEmptyString');
module.exports = toHaveNonEmptyString;
function toHaveNonEmptyString(key, actual) {
return toBeObject(actual) &&
toBeNonEmptyString(actual[key]);
}
}, {
'./toBeNonEmptyString': 33,
'./toBeObject': 35
}],
69: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeNumber = require('./toBeNumber');
module.exports = toHaveNumber;
function toHaveNumber(key, actual) {
return toBeObject(actual) &&
toBeNumber(actual[key]);
}
}, {
'./toBeNumber': 34,
'./toBeObject': 35
}],
70: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeWithinRange = require('./toBeWithinRange');
module.exports = toHaveNumberWithinRange;
function toHaveNumberWithinRange(key, floor, ceiling, actual) {
return toBeObject(actual) &&
toBeWithinRange(floor, ceiling, actual[key]);
}
}, {
'./toBeObject': 35,
'./toBeWithinRange': 43
}],
71: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
module.exports = toHaveObject;
function toHaveObject(key, actual) {
return toBeObject(actual) &&
toBeObject(actual[key]);
}
}, {
'./toBeObject': 35
}],
72: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeOddNumber = require('./toBeOddNumber');
module.exports = toHaveOddNumber;
function toHaveOddNumber(key, actual) {
return toBeObject(actual) &&
toBeOddNumber(actual[key]);
}
}, {
'./toBeObject': 35,
'./toBeOddNumber': 36
}],
73: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeString = require('./toBeString');
module.exports = toHaveString;
function toHaveString(key, actual) {
return toBeObject(actual) &&
toBeString(actual[key]);
}
}, {
'./toBeObject': 35,
'./toBeString': 39
}],
74: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeLongerThan = require('./toBeLongerThan');
module.exports = toHaveStringLongerThan;
function toHaveStringLongerThan(key, other, actual) {
return toBeObject(actual) &&
toBeLongerThan(other, actual[key]);
}
}, {
'./toBeLongerThan': 30,
'./toBeObject': 35
}],
75: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeSameLengthAs = require('./toBeSameLengthAs');
module.exports = toHaveStringSameLengthAs;
function toHaveStringSameLengthAs(key, other, actual) {
return toBeObject(actual) &&
toBeSameLengthAs(other, actual[key]);
}
}, {
'./toBeObject': 35,
'./toBeSameLengthAs': 37
}],
76: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeShorterThan = require('./toBeShorterThan');
module.exports = toHaveStringShorterThan;
function toHaveStringShorterThan(key, other, actual) {
return toBeObject(actual) &&
toBeShorterThan(other, actual[key]);
}
}, {
'./toBeObject': 35,
'./toBeShorterThan': 38
}],
77: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeTrue = require('./toBeTrue');
module.exports = toHaveTrue;
function toHaveTrue(key, actual) {
return toBeObject(actual) &&
toBeTrue(actual[key]);
}
}, {
'./toBeObject': 35,
'./toBeTrue': 40
}],
78: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeWhitespace = require('./toBeWhitespace');
module.exports = toHaveWhitespaceString;
function toHaveWhitespaceString(key, actual) {
return toBeObject(actual) &&
toBeWhitespace(actual[key]);
}
}, {
'./toBeObject': 35,
'./toBeWhitespace': 41
}],
79: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
var toBeWholeNumber = require('./toBeWholeNumber');
module.exports = toHaveWholeNumber;
function toHaveWholeNumber(key, actual) {
return toBeObject(actual) &&
toBeWholeNumber(actual[key]);
}
}, {
'./toBeObject': 35,
'./toBeWholeNumber': 42
}],
80: [function(require, module, exports) {
'use strict';
var toBeObject = require('./toBeObject');
module.exports = toImplement;
function toImplement(api, actual) {
return toBeObject(api) &&
toBeObject(actual) &&
featuresAll(api, actual);
}
function featuresAll(api, actual) {
for (var key in api) {
if (api.hasOwnProperty(key) &&
key in actual === false) {
return false;
}
}
return true;
}
}, {
'./toBeObject': 35
}],
81: [function(require, module, exports) {
'use strict';
var toBeNonEmptyString = require('./toBeNonEmptyString');
module.exports = toStartWith;
function toStartWith(subString, actual) {
if (!toBeNonEmptyString(actual) || !toBeNonEmptyString(subString)) {
return false;
}
return actual.slice(0, subString.length) === subString;
}
}, {
'./toBeNonEmptyString': 33
}],
82: [function(require, module, exports) {
'use strict';
module.exports = toThrowAnyError;
function toThrowAnyError(actual) {
var threwError = false;
try {
actual();
} catch (e) {
threwError = true;
}
return threwError;
}
}, {}],
83: [function(require, module, exports) {
'use strict';
module.exports = toThrowErrorOfType;
function toThrowErrorOfType(type, actual) {
var threwErrorOfType = false;
try {
actual();
} catch (e) {
threwErrorOfType = (e.name === type);
}
return threwErrorOfType;
}
}, {}]
}, {}, [1]);