Adopt strict mode throughout the codebase
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().CallTracker = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @namespace Spy#calls
|
||||
* @since 2.0.0
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().clearStack = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const maxInlineCallCount = 10;
|
||||
|
||||
function browserQueueMicrotaskImpl(global) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Clock = function() {
|
||||
'use strict';
|
||||
|
||||
/* global process */
|
||||
const NODE_JS =
|
||||
typeof process !== 'undefined' &&
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().CompleteOnFirstErrorSkipPolicy = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function CompleteOnFirstErrorSkipPolicy(queueableFns) {
|
||||
this.queueableFns_ = queueableFns;
|
||||
this.erroredFnIx_ = null;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Configuration = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* This represents the available options to configure Jasmine.
|
||||
* Options that are not provided will use their default values.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().CurrentRunableTracker = function() {
|
||||
'use strict';
|
||||
|
||||
class CurrentRunableTracker {
|
||||
#currentSpec;
|
||||
#currentlyExecutingSuites;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Deprecator = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function Deprecator(topSuite) {
|
||||
this.topSuite_ = topSuite;
|
||||
this.verbose_ = false;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Env = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @class Env
|
||||
* @since 2.0.0
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().ExceptionFormatter = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const ignoredProperties = [
|
||||
'name',
|
||||
'message',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Expectation = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Matchers that come with Jasmine out of the box.
|
||||
* @namespace matchers
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().ExpectationFilterChain = function() {
|
||||
'use strict';
|
||||
|
||||
function ExpectationFilterChain(maybeFilter, prev) {
|
||||
this.filter_ = maybeFilter;
|
||||
this.prev_ = prev;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Expector = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function Expector(options) {
|
||||
this.matchersUtil = options.matchersUtil || {
|
||||
buildFailureMessage: function() {}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().GlobalErrors = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class GlobalErrors {
|
||||
#getConfig;
|
||||
#adapter;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().JsApiReporter = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @name jsApiReporter
|
||||
* @classdesc {@link Reporter} added by default in `boot.js` to record results for retrieval in javascript code. An instance is made available as `jsApiReporter` on the global object.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().MockDate = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function MockDate(global) {
|
||||
let currentTime = 0;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().NeverSkipPolicy = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function NeverSkipPolicy(queueableFns) {}
|
||||
|
||||
NeverSkipPolicy.prototype.skipTo = function(lastRanFnIx) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Order = function() {
|
||||
'use strict';
|
||||
|
||||
function Order(options) {
|
||||
this.random = 'random' in options ? options.random : true;
|
||||
const seed = (this.seed = options.seed || generateSeed());
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().makePrettyPrinter = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class SinglePrettyPrintRun {
|
||||
constructor(customObjectFormatters, pp) {
|
||||
this.customObjectFormatters_ = customObjectFormatters;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().QueueRunner = function(j$) {
|
||||
'use strict';
|
||||
|
||||
let nextid = 1;
|
||||
|
||||
function StopExecutionError() {}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().RunableResources = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class RunableResources {
|
||||
constructor(options) {
|
||||
this.byRunableId_ = {};
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Runner = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class Runner {
|
||||
#topSuite;
|
||||
#getTotalSpecsDefined;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().SkipAfterBeforeAllErrorPolicy = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function SkipAfterBeforeAllErrorPolicy(queueableFns) {
|
||||
this.queueableFns_ = queueableFns;
|
||||
this.skipping_ = false;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Spec = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class Spec {
|
||||
#autoCleanClosures;
|
||||
#throwOnExpectationFailure;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Spy = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const nextOrder = (function() {
|
||||
let order = 0;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().SpyFactory = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function SpyFactory(
|
||||
getCustomStrategies,
|
||||
getDefaultStrategyFn,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().SpyStrategy = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @interface SpyStrategy
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().StackTrace = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function StackTrace(error) {
|
||||
let lines = error.stack.split('\n');
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Suite = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class Suite {
|
||||
#reportedParentSuiteId;
|
||||
#throwOnExpectationFailure;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().SuiteBuilder = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class SuiteBuilder {
|
||||
constructor(options) {
|
||||
this.env_ = options.env;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Timer = function() {
|
||||
'use strict';
|
||||
|
||||
const defaultNow = (function(Date) {
|
||||
return function() {
|
||||
return new Date().getTime();
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().TreeProcessor = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const defaultMin = Infinity;
|
||||
const defaultMax = 1 - Infinity;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().TreeRunner = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class TreeRunner {
|
||||
#executionTree;
|
||||
#setTimeout;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().UserContext = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function UserContext() {}
|
||||
|
||||
UserContext.fromExisting = function(oldContext) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Any = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function Any(expectedObject) {
|
||||
if (typeof expectedObject === 'undefined') {
|
||||
throw new TypeError(
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Anything = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function Anything() {}
|
||||
|
||||
Anything.prototype.asymmetricMatch = function(other) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().ArrayContaining = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function ArrayContaining(sample) {
|
||||
this.sample = sample;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().ArrayWithExactContents = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function ArrayWithExactContents(sample) {
|
||||
this.sample = sample;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Empty = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function Empty() {}
|
||||
|
||||
Empty.prototype.asymmetricMatch = function(other) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Falsy = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function Falsy() {}
|
||||
|
||||
Falsy.prototype.asymmetricMatch = function(other) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Is = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class Is {
|
||||
constructor(expected) {
|
||||
this.expected_ = expected;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().MapContaining = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function MapContaining(sample) {
|
||||
if (!j$.private.isMap(sample)) {
|
||||
throw new Error(
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().NotEmpty = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function NotEmpty() {}
|
||||
|
||||
NotEmpty.prototype.asymmetricMatch = function(other) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().ObjectContaining = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function ObjectContaining(sample) {
|
||||
this.sample = sample;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().SetContaining = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function SetContaining(sample) {
|
||||
if (!j$.private.isSet(sample)) {
|
||||
throw new Error(
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().StringContaining = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function StringContaining(expected) {
|
||||
if (!j$.private.isString(expected)) {
|
||||
throw new Error('Expected is not a String');
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().StringMatching = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function StringMatching(expected) {
|
||||
if (!j$.private.isString(expected) && !j$.private.isA('RegExp', expected)) {
|
||||
throw new Error('Expected is not a String or a RegExp');
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().Truthy = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function Truthy() {}
|
||||
|
||||
Truthy.prototype.asymmetricMatch = function(other) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Maximum object depth the pretty printer will print to.
|
||||
* Set this to a lower value to speed up pretty printing if you have large objects.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
//TODO: expectation result may make more sense as a presentation of an expectation.
|
||||
getJasmineRequireObj().buildExpectationResult = function(j$) {
|
||||
'use strict';
|
||||
|
||||
function buildExpectationResult(options) {
|
||||
const exceptionFormatter = new j$.private.ExceptionFormatter();
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().errors = function() {
|
||||
'use strict';
|
||||
|
||||
function ExpectationFailed() {}
|
||||
|
||||
ExpectationFailed.prototype = new Error();
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().formatErrorMsg = function() {
|
||||
'use strict';
|
||||
|
||||
function generateErrorMsg(domain, usage) {
|
||||
const usageDefinition = usage ? '\nUsage: ' + usage : '';
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().DiffBuilder = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class DiffBuilder {
|
||||
constructor(config) {
|
||||
this.prettyPrinter_ =
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().MismatchTree = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
To be able to apply custom object formatters at all possible levels of an
|
||||
object graph, DiffBuilder needs to be able to know not just where the
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().NullDiffBuilder = function(j$) {
|
||||
'use strict';
|
||||
|
||||
return function() {
|
||||
return {
|
||||
withPath: function(_, block) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().ObjectPath = function(j$) {
|
||||
'use strict';
|
||||
|
||||
class ObjectPath {
|
||||
constructor(components) {
|
||||
this.components = components || [];
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBePending = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Expect a promise to be pending, i.e. the promise is neither resolved nor rejected.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeRejected = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Expect a promise to be rejected.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeRejectedWith = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Expect a promise to be rejected with a value equal to the expected, using deep equality comparison.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeRejectedWithError = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Expect a promise to be rejected with a value matched to the expected
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeResolved = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Expect a promise to be resolved.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeResolvedTo = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Expect a promise to be resolved to a value equal to the expected, using deep equality comparison.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().MatchersUtil = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @class MatchersUtil
|
||||
* @classdesc Utilities for use in implementing matchers.<br>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().nothing = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} nothing explicitly.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().requireAsyncMatchers = function(jRequire, j$) {
|
||||
'use strict';
|
||||
|
||||
const availableMatchers = [
|
||||
'toBePending',
|
||||
'toBeResolved',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
|
||||
'use strict';
|
||||
|
||||
const availableMatchers = [
|
||||
'nothing',
|
||||
'toBe',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBe = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `===` to the expected value.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeCloseTo = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be within a specified precision of the expected value.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeDefined = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be defined. (Not `undefined`)
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeFalse = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `false`.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeFalsy = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be falsy
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeGreaterThan = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be greater than the expected value.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeGreaterThanOrEqual = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be greater than or equal to the expected value.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeInstanceOf = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const usageError = j$.private.formatErrorMsg(
|
||||
'<toBeInstanceOf>',
|
||||
'expect(value).toBeInstanceOf(<ConstructorFunction>)'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeLessThan = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be less than the expected value.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeLessThanOrEqual = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be less than or equal to the expected value.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeNaN = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `NaN` (Not a Number).
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeNegativeInfinity = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `-Infinity` (-infinity).
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeNull = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `null`.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeNullish = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `null` or `undefined`.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBePositiveInfinity = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `Infinity` (infinity).
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeTrue = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `true`.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeTruthy = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be truthy.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toBeUndefined = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be `undefined`.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toContain = function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to contain a specific value.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toEqual = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be equal to the expected, using deep equality comparison.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveBeenCalled = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toHaveBeenCalled>',
|
||||
'expect(<spyObj>).toHaveBeenCalled()'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveBeenCalledBefore = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toHaveBeenCalledBefore>',
|
||||
'expect(<spyObj>).toHaveBeenCalledBefore(<spyObj>)'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveBeenCalledOnceWith = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toHaveBeenCalledOnceWith>',
|
||||
'expect(<spyObj>).toHaveBeenCalledOnceWith(...arguments)'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toHaveBeenCalledTimes>',
|
||||
'expect(<spyObj>).toHaveBeenCalledTimes(<Number>)'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toHaveBeenCalledWith>',
|
||||
'expect(<spyObj>).toHaveBeenCalledWith(...arguments)'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveClass = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be a DOM element that has the expected class
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveClasses = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual value to be a DOM element that has the expected classes
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveNoOtherSpyInteractions = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toHaveNoOtherSpyInteractions>',
|
||||
'expect(<spyObj>).toHaveNoOtherSpyInteractions()'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveSize = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* {@link expect} the actual size to be equal to the expected, using array-like length or object keys size.
|
||||
* @function
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toHaveSpyInteractions = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toHaveSpyInteractions>',
|
||||
'expect(<spyObj>).toHaveSpyInteractions()'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toMatch = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toMatch>',
|
||||
'expect(<expectation>).toMatch(<string> || <regexp>)'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toThrow = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toThrow>',
|
||||
'expect(function() {<expectation>}).toThrow()'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toThrowError = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const getErrorMsg = j$.private.formatErrorMsg(
|
||||
'<toThrowError>',
|
||||
'expect(function() {<expectation>}).toThrowError(<ErrorConstructor>, <message>)'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().toThrowMatching = function(j$) {
|
||||
'use strict';
|
||||
|
||||
const usageError = j$.private.formatErrorMsg(
|
||||
'<toThrowMatching>',
|
||||
'expect(function() {<expectation>}).toThrowMatching(<Predicate>)'
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
getJasmineRequireObj().reporterEvents = function(j$) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Used to tell Jasmine what optional or uncommonly implemented features
|
||||
* the reporter supports. If not specified, the defaults described in
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user