Add @since to most JSDoc comments

- See jasmine/jasmine.github.io#117
This commit is contained in:
Gregg Van Hove
2019-06-12 16:23:12 -07:00
parent 984018bfdf
commit 15f969bee7
44 changed files with 254 additions and 0 deletions

View File

@@ -162,6 +162,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* 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.
* @name jasmine.MAX_PRETTY_PRINT_DEPTH
* @since 1.3.0
*/
j$.MAX_PRETTY_PRINT_DEPTH = 8;
/**
@@ -169,17 +170,20 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* This will also limit the number of keys and values displayed for an object.
* Elements past this number will be ellipised.
* @name jasmine.MAX_PRETTY_PRINT_ARRAY_LENGTH
* @since 2.7.0
*/
j$.MAX_PRETTY_PRINT_ARRAY_LENGTH = 50;
/**
* Maximum number of characters to display when pretty printing objects.
* Characters past this number will be ellipised.
* @name jasmine.MAX_PRETTY_PRINT_CHARS
* @since 2.9.0
*/
j$.MAX_PRETTY_PRINT_CHARS = 1000;
/**
* Default number of milliseconds Jasmine will wait for an asynchronous spec to complete.
* @name jasmine.DEFAULT_TIMEOUT_INTERVAL
* @since 1.3.0
*/
j$.DEFAULT_TIMEOUT_INTERVAL = 5000;
@@ -191,6 +195,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get the currently booted Jasmine Environment.
*
* @name jasmine.getEnv
* @since 1.3.0
* @function
* @return {Env}
*/
@@ -318,6 +323,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is an instance of the specified class/constructor.
* @name jasmine.any
* @since 1.3.0
* @function
* @param {Constructor} clazz - The constructor to check against.
*/
@@ -329,6 +335,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is not `null` and not `undefined`.
* @name jasmine.anything
* @since 2.2.0
* @function
*/
j$.anything = function() {
@@ -339,6 +346,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is `true` or anything truthy.
* @name jasmine.truthy
* @since 3.1.0
* @function
*/
j$.truthy = function() {
@@ -349,6 +357,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is `null`, `undefined`, `0`, `false` or anything falsey.
* @name jasmine.falsy
* @since 3.1.0
* @function
*/
j$.falsy = function() {
@@ -359,6 +368,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is empty.
* @name jasmine.empty
* @since 3.1.0
* @function
*/
j$.empty = function() {
@@ -369,6 +379,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is not empty.
* @name jasmine.notEmpty
* @since 3.1.0
* @function
*/
j$.notEmpty = function() {
@@ -379,6 +390,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared contains at least the keys and values.
* @name jasmine.objectContaining
* @since 1.3.0
* @function
* @param {Object} sample - The subset of properties that _must_ be in the actual.
*/
@@ -390,6 +402,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value is a `String` that matches the `RegExp` or `String`.
* @name jasmine.stringMatching
* @since 2.2.0
* @function
* @param {RegExp|String} expected
*/
@@ -401,6 +414,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value is an `Array` that contains at least the elements in the sample.
* @name jasmine.arrayContaining
* @since 2.2.0
* @function
* @param {Array} sample
*/
@@ -412,6 +426,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value is an `Array` that contains all of the elements in the sample in any order.
* @name jasmine.arrayWithExactContents
* @since 2.8.0
* @function
* @param {Array} sample
*/
@@ -842,6 +857,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* _Note:_ Do not construct this directly, Jasmine will make one during booting.
* @name Env
* @since 2.0.0
* @classdesc The Jasmine environment
* @constructor
*/
@@ -876,11 +892,13 @@ getJasmineRequireObj().Env = function(j$) {
* This represents the available options to configure Jasmine.
* Options that are not provided will use their default values
* @interface Configuration
* @since 3.3.0
*/
var config = {
/**
* Whether to randomize spec execution order
* @name Configuration#random
* @since 3.3.0
* @type Boolean
* @default true
*/
@@ -889,6 +907,7 @@ getJasmineRequireObj().Env = function(j$) {
* Seed to use as the basis of randomization.
* Null causes the seed to be determined randomly at the start of execution.
* @name Configuration#seed
* @since 3.3.0
* @type function
* @default null
*/
@@ -896,6 +915,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Whether to stop execution of the suite after the first spec failure
* @name Configuration#failFast
* @since 3.3.0
* @type Boolean
* @default false
*/
@@ -903,6 +923,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Whether to cause specs to only have one expectation failure.
* @name Configuration#oneFailurePerSpec
* @since 3.3.0
* @type Boolean
* @default false
*/
@@ -910,6 +931,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Function to use to filter specs
* @name Configuration#specFilter
* @since 3.3.0
* @type function
* @default true
*/
@@ -920,6 +942,7 @@ getJasmineRequireObj().Env = function(j$) {
* Whether or not reporters should hide disabled specs from their output.
* Currently only supported by Jasmine's HTMLReporter
* @name Configuration#hideDisabled
* @since 3.3.0
* @type Boolean
* @default false
*/
@@ -929,6 +952,7 @@ getJasmineRequireObj().Env = function(j$) {
* to create a promise. If not set, it will default to whatever global Promise
* library is available (if any).
* @name Configuration#Promise
* @since 3.5.0
* @type function
* @default undefined
*/
@@ -977,6 +1001,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Configure your jasmine environment
* @name Env#configure
* @since 3.3.0
* @argument {Configuration} configuration
* @function
*/
@@ -1022,6 +1047,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Get the current configuration for your jasmine environment
* @name Env#configuration
* @since 3.3.0
* @function
* @returns {Configuration}
*/
@@ -1189,6 +1215,7 @@ getJasmineRequireObj().Env = function(j$) {
* Sets whether Jasmine should throw an Error when an expectation fails.
* This causes a spec to only have one expectation failure.
* @name Env#throwOnExpectationFailure
* @since 2.3.0
* @function
* @param {Boolean} value Whether to throw when a expectation fails
* @deprecated Use the `oneFailurePerSpec` option with {@link Env#configure}
@@ -1210,6 +1237,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Set whether to stop suite execution when a spec fails
* @name Env#stopOnSpecFailure
* @since 2.7.0
* @function
* @param {Boolean} value Whether to stop suite execution when a spec fails
* @deprecated Use the `failFast` option with {@link Env#configure}
@@ -1231,6 +1259,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Set whether to randomize test execution order
* @name Env#randomizeTests
* @since 2.4.0
* @function
* @param {Boolean} value Whether to randomize execution order
* @deprecated Use the `random` option with {@link Env#configure}
@@ -1252,6 +1281,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Set the random number seed for spec randomization
* @name Env#seed
* @since 2.4.0
* @function
* @param {Number} value The seed value
* @deprecated Use the `seed` option with {@link Env#configure}
@@ -1275,6 +1305,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* @name Env#hideDisabled
* @since 3.2.0
* @function
*/
this.hideDisabled = function(value) {
@@ -1522,6 +1553,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Add a custom reporter to the Jasmine environment.
* @name Env#addReporter
* @since 2.0.0
* @function
* @param {Reporter} reporterToAdd The reporter to be added.
* @see custom_reporter
@@ -1533,6 +1565,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Provide a fallback reporter if no other reporters have been specified.
* @name Env#provideFallbackReporter
* @since 2.5.0
* @function
* @param {Reporter} reporterToAdd The reporter
* @see custom_reporter
@@ -1544,6 +1577,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Clear all registered reporters
* @name Env#clearReporters
* @since 2.5.2
* @function
*/
this.clearReporters = function() {
@@ -1946,6 +1980,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
/**
* Get the current status for the Jasmine environment.
* @name jsApiReporter#status
* @since 2.0.0
* @function
* @return {String} - One of `loaded`, `started`, or `done`
*/
@@ -1969,6 +2004,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
*
* Retrievable in slices for easier serialization.
* @name jsApiReporter#suiteResults
* @since 2.1.0
* @function
* @param {Number} index - The position in the suites list to start from.
* @param {Number} length - Maximum number of suite results to return.
@@ -1986,6 +2022,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
/**
* Get all of the suites in a single object, with their `id` as the key.
* @name jsApiReporter#suites
* @since 2.0.0
* @function
* @return {Object} - Map of suite id to {@link SuiteResult}
*/
@@ -2004,6 +2041,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
*
* Retrievable in slices for easier serialization.
* @name jsApiReporter#specResults
* @since 2.0.0
* @function
* @param {Number} index - The position in the specs list to start from.
* @param {Number} length - Maximum number of specs results to return.
@@ -2016,6 +2054,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
/**
* Get all spec results.
* @name jsApiReporter#specs
* @since 2.0.0
* @function
* @return {SpecResult[]}
*/
@@ -2026,6 +2065,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
/**
* Get the number of milliseconds it took for the full Jasmine suite to run.
* @name jsApiReporter#executionTime
* @since 2.0.0
* @function
* @return {Number}
*/
@@ -2318,6 +2358,7 @@ getJasmineRequireObj().Truthy = function(j$) {
getJasmineRequireObj().CallTracker = function(j$) {
/**
* @namespace Spy#calls
* @since 2.0.0
*/
function CallTracker() {
var calls = [];
@@ -2333,6 +2374,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Check whether this spy has been invoked.
* @name Spy#calls#any
* @since 2.0.0
* @function
* @return {Boolean}
*/
@@ -2343,6 +2385,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the number of invocations of this spy.
* @name Spy#calls#count
* @since 2.0.0
* @function
* @return {Integer}
*/
@@ -2353,6 +2396,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the arguments that were passed to a specific invocation of this spy.
* @name Spy#calls#argsFor
* @since 2.0.0
* @function
* @param {Integer} index The 0-based invocation index.
* @return {Array}
@@ -2365,6 +2409,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the raw calls array for this spy.
* @name Spy#calls#all
* @since 2.0.0
* @function
* @return {Spy.callData[]}
*/
@@ -2375,6 +2420,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get all of the arguments for each invocation of this spy in the order they were received.
* @name Spy#calls#allArgs
* @since 2.0.0
* @function
* @return {Array}
*/
@@ -2390,6 +2436,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the first invocation of this spy.
* @name Spy#calls#first
* @since 2.0.0
* @function
* @return {ObjecSpy.callData}
*/
@@ -2400,6 +2447,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the most recent invocation of this spy.
* @name Spy#calls#mostRecent
* @since 2.0.0
* @function
* @return {ObjecSpy.callData}
*/
@@ -2410,6 +2458,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Reset this spy as if it has never been called.
* @name Spy#calls#reset
* @since 2.0.0
* @function
*/
this.reset = function() {
@@ -2419,6 +2468,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Set this spy to do a shallow clone of arguments passed to each invocation.
* @name Spy#calls#saveArgumentsByValue
* @since 2.5.0
* @function
*/
this.saveArgumentsByValue = function() {
@@ -2534,6 +2584,7 @@ getJasmineRequireObj().Clock = function() {
/**
* Install the mock clock over the built-in methods.
* @name Clock#install
* @since 2.0.0
* @function
* @return {Clock}
*/
@@ -2554,6 +2605,7 @@ getJasmineRequireObj().Clock = function() {
/**
* Uninstall the mock clock, returning the built-in methods to their places.
* @name Clock#uninstall
* @since 2.0.0
* @function
*/
self.uninstall = function() {
@@ -2570,6 +2622,7 @@ getJasmineRequireObj().Clock = function() {
*
* The clock will be {@link Clock#install|install}ed before the function is called and {@link Clock#uninstall|uninstall}ed in a `finally` after the function completes.
* @name Clock#withMock
* @since 2.3.0
* @function
* @param {Function} closure The function to be called.
*/
@@ -2585,6 +2638,7 @@ getJasmineRequireObj().Clock = function() {
/**
* Instruct the installed Clock to also mock the date returned by `new Date()`
* @name Clock#mockDate
* @since 2.1.0
* @function
* @param {Date} [initialDate=now] The `Date` to provide.
*/
@@ -2617,6 +2671,7 @@ getJasmineRequireObj().Clock = function() {
/**
* Tick the Clock forward, running any enqueued timeouts along the way
* @name Clock#tick
* @since 1.3.0
* @function
* @param {int} millis The number of milliseconds to tick.
*/
@@ -3042,6 +3097,7 @@ getJasmineRequireObj().Expectation = function(j$) {
* Add some context for an {@link expect}
* @function
* @name matchers#withContext
* @since 3.3.0
* @param {String} message - Additional context to show when the matcher fails
* @return {matchers}
*/
@@ -3053,6 +3109,7 @@ getJasmineRequireObj().Expectation = function(j$) {
* Invert the matcher following this {@link expect}
* @member
* @name matchers#not
* @since 1.3.0
* @type {matchers}
* @example
* expect(something).not.toBe(true);
@@ -3086,6 +3143,7 @@ getJasmineRequireObj().Expectation = function(j$) {
* Add some context for an {@link expectAsync}
* @function
* @name async-matchers#withContext
* @since 3.3.0
* @param {String} message - Additional context to show when the async matcher fails
* @return {async-matchers}
*/
@@ -3526,6 +3584,7 @@ getJasmineRequireObj().toBeRejected = function(j$) {
* @function
* @async
* @name async-matchers#toBeRejected
* @since 3.1.0
* @example
* await expectAsync(aPromise).toBeRejected();
* @example
@@ -3549,6 +3608,7 @@ getJasmineRequireObj().toBeRejectedWith = function(j$) {
* @function
* @async
* @name async-matchers#toBeRejectedWith
* @since 3.3.0
* @param {Object} expected - Value that the promise is expected to be rejected with
* @example
* await expectAsync(aPromise).toBeRejectedWith({prop: 'value'});
@@ -3596,6 +3656,7 @@ getJasmineRequireObj().toBeRejectedWithError = function(j$) {
* @function
* @async
* @name async-matchers#toBeRejectedWithError
* @since 3.5.0
* @param {Error} [expected] - `Error` constructor the object that was thrown needs to be an instance of. If not provided, `Error` will be used.
* @param {RegExp|String} [message] - The message that should be set on the thrown `Error`
* @example
@@ -3685,6 +3746,7 @@ getJasmineRequireObj().toBeResolved = function(j$) {
* @function
* @async
* @name async-matchers#toBeResolved
* @since 3.1.0
* @example
* await expectAsync(aPromise).toBeResolved();
* @example
@@ -3708,6 +3770,7 @@ getJasmineRequireObj().toBeResolvedTo = function(j$) {
* @function
* @async
* @name async-matchers#toBeResolvedTo
* @since 3.1.0
* @param {Object} expected - Value that the promise is expected to resolve to
* @example
* await expectAsync(aPromise).toBeResolvedTo({prop: 'value'});
@@ -4259,6 +4322,7 @@ getJasmineRequireObj().nothing = function() {
* {@link expect} nothing explicitly.
* @function
* @name matchers#nothing
* @since 2.8.0
* @example
* expect().nothing();
*/
@@ -4357,6 +4421,7 @@ getJasmineRequireObj().toBe = function(j$) {
* {@link expect} the actual value to be `===` to the expected value.
* @function
* @name matchers#toBe
* @since 1.3.0
* @param {Object} expected - The expected value to compare against.
* @example
* expect(thing).toBe(realThing);
@@ -4387,6 +4452,7 @@ getJasmineRequireObj().toBeCloseTo = function() {
* {@link expect} the actual value to be within a specified precision of the expected value.
* @function
* @name matchers#toBeCloseTo
* @since 1.3.0
* @param {Object} expected - The expected value to compare against.
* @param {Number} [precision=2] - The number of decimal points to check.
* @example
@@ -4424,6 +4490,7 @@ getJasmineRequireObj().toBeDefined = function() {
* {@link expect} the actual value to be defined. (Not `undefined`)
* @function
* @name matchers#toBeDefined
* @since 1.3.0
* @example
* expect(result).toBeDefined();
*/
@@ -4445,6 +4512,7 @@ getJasmineRequireObj().toBeFalse = function() {
* {@link expect} the actual value to be `false`.
* @function
* @name matchers#toBeFalse
* @since 3.5.0
* @example
* expect(result).toBeFalse();
*/
@@ -4466,6 +4534,7 @@ getJasmineRequireObj().toBeFalsy = function() {
* {@link expect} the actual value to be falsy
* @function
* @name matchers#toBeFalsy
* @since 2.0.0
* @example
* expect(result).toBeFalsy();
*/
@@ -4487,6 +4556,7 @@ getJasmineRequireObj().toBeGreaterThan = function() {
* {@link expect} the actual value to be greater than the expected value.
* @function
* @name matchers#toBeGreaterThan
* @since 2.0.0
* @param {Number} expected - The value to compare against.
* @example
* expect(result).toBeGreaterThan(3);
@@ -4510,6 +4580,7 @@ getJasmineRequireObj().toBeGreaterThanOrEqual = function() {
* {@link expect} the actual value to be greater than or equal to the expected value.
* @function
* @name matchers#toBeGreaterThanOrEqual
* @since 2.0.0
* @param {Number} expected - The expected value to compare against.
* @example
* expect(result).toBeGreaterThanOrEqual(25);
@@ -4534,6 +4605,7 @@ getJasmineRequireObj().toBeInstanceOf = function(j$) {
* {@link expect} the actual to be an instance of the expected class
* @function
* @name matchers#toBeInstanceOf
* @since 3.5.0
* @param {Object} expected - The class or constructor function to check for
* @example
* expect('foo').toBeInstanceOf(String);
@@ -4578,6 +4650,7 @@ getJasmineRequireObj().toBeLessThan = function() {
* {@link expect} the actual value to be less than the expected value.
* @function
* @name matchers#toBeLessThan
* @since 2.0.0
* @param {Number} expected - The expected value to compare against.
* @example
* expect(result).toBeLessThan(0);
@@ -4601,6 +4674,7 @@ getJasmineRequireObj().toBeLessThanOrEqual = function() {
* {@link expect} the actual value to be less than or equal to the expected value.
* @function
* @name matchers#toBeLessThanOrEqual
* @since 2.0.0
* @param {Number} expected - The expected value to compare against.
* @example
* expect(result).toBeLessThanOrEqual(123);
@@ -4624,6 +4698,7 @@ getJasmineRequireObj().toBeNaN = function(j$) {
* {@link expect} the actual value to be `NaN` (Not a Number).
* @function
* @name matchers#toBeNaN
* @since 1.3.0
* @example
* expect(thing).toBeNaN();
*/
@@ -4653,6 +4728,7 @@ getJasmineRequireObj().toBeNegativeInfinity = function(j$) {
* {@link expect} the actual value to be `-Infinity` (-infinity).
* @function
* @name matchers#toBeNegativeInfinity
* @since 2.6.0
* @example
* expect(thing).toBeNegativeInfinity();
*/
@@ -4682,6 +4758,7 @@ getJasmineRequireObj().toBeNull = function() {
* {@link expect} the actual value to be `null`.
* @function
* @name matchers#toBeNull
* @since 1.3.0
* @example
* expect(result).toBeNull();
*/
@@ -4703,6 +4780,7 @@ getJasmineRequireObj().toBePositiveInfinity = function(j$) {
* {@link expect} the actual value to be `Infinity` (infinity).
* @function
* @name matchers#toBePositiveInfinity
* @since 2.6.0
* @example
* expect(thing).toBePositiveInfinity();
*/
@@ -4732,6 +4810,7 @@ getJasmineRequireObj().toBeTrue = function() {
* {@link expect} the actual value to be `true`.
* @function
* @name matchers#toBeTrue
* @since 3.5.0
* @example
* expect(result).toBeTrue();
*/
@@ -4753,6 +4832,7 @@ getJasmineRequireObj().toBeTruthy = function() {
* {@link expect} the actual value to be truthy.
* @function
* @name matchers#toBeTruthy
* @since 2.0.0
* @example
* expect(thing).toBeTruthy();
*/
@@ -4774,6 +4854,7 @@ getJasmineRequireObj().toBeUndefined = function() {
* {@link expect} the actual value to be `undefined`.
* @function
* @name matchers#toBeUndefined
* @since 1.3.0
* @example
* expect(result).toBeUndefined():
*/
@@ -4795,6 +4876,7 @@ getJasmineRequireObj().toContain = function() {
* {@link expect} the actual value to contain a specific value.
* @function
* @name matchers#toContain
* @since 2.0.0
* @param {Object} expected - The value to look for.
* @example
* expect(array).toContain(anElement);
@@ -4821,6 +4903,7 @@ getJasmineRequireObj().toEqual = function(j$) {
* {@link expect} the actual value to be equal to the expected, using deep equality comparison.
* @function
* @name matchers#toEqual
* @since 1.3.0
* @param {Object} expected - Expected value
* @example
* expect(bigObject).toEqual({"foo": ['bar', 'baz']});
@@ -4856,6 +4939,7 @@ getJasmineRequireObj().toHaveBeenCalled = function(j$) {
* {@link expect} the actual (a {@link Spy}) to have been called.
* @function
* @name matchers#toHaveBeenCalled
* @since 1.3.0
* @example
* expect(mySpy).toHaveBeenCalled();
* expect(mySpy).not.toHaveBeenCalled();
@@ -4895,6 +4979,7 @@ getJasmineRequireObj().toHaveBeenCalledBefore = function(j$) {
* {@link expect} the actual value (a {@link Spy}) to have been called before another {@link Spy}.
* @function
* @name matchers#toHaveBeenCalledBefore
* @since 2.6.0
* @param {Spy} expected - {@link Spy} that should have been called after the `actual` {@link Spy}.
* @example
* expect(mySpy).toHaveBeenCalledBefore(otherSpy);
@@ -4956,6 +5041,7 @@ getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
* {@link expect} the actual (a {@link Spy}) to have been called the specified number of times.
* @function
* @name matchers#toHaveBeenCalledTimes
* @since 2.4.0
* @param {Number} expected - The number of invocations to look for.
* @example
* expect(mySpy).toHaveBeenCalledTimes(3);
@@ -4997,6 +5083,7 @@ getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
* {@link expect} the actual (a {@link Spy}) to have been called with particular arguments at least once.
* @function
* @name matchers#toHaveBeenCalledWith
* @since 1.3.0
* @param {...Object} - The arguments to look for
* @example
* expect(mySpy).toHaveBeenCalledWith('foo', 'bar', 2);
@@ -5038,6 +5125,7 @@ getJasmineRequireObj().toHaveClass = function(j$) {
* {@link expect} the actual value to be a DOM element that has the expected class
* @function
* @name matchers#toHaveClass
* @since 3.0.0
* @param {Object} expected - The class name to test for
* @example
* var el = document.createElement('div');
@@ -5075,6 +5163,7 @@ getJasmineRequireObj().toMatch = function(j$) {
* {@link expect} the actual value to match a regular expression
* @function
* @name matchers#toMatch
* @since 1.3.0
* @param {RegExp|String} expected - Value to look for in the string.
* @example
* expect("my string").toMatch(/string$/);
@@ -5107,6 +5196,7 @@ getJasmineRequireObj().toThrow = function(j$) {
* {@link expect} a function to `throw` something.
* @function
* @name matchers#toThrow
* @since 2.0.0
* @param {Object} [expected] - Value that should be thrown. If not provided, simply the fact that something was thrown will be checked.
* @example
* expect(function() { return 'things'; }).toThrow('foo');
@@ -5165,6 +5255,7 @@ getJasmineRequireObj().toThrowError = function(j$) {
* {@link expect} a function to `throw` an `Error`.
* @function
* @name matchers#toThrowError
* @since 2.0.0
* @param {Error} [expected] - `Error` constructor the object that was thrown needs to be an instance of. If not provided, `Error` will be used.
* @param {RegExp|String} [message] - The message that should be set on the thrown `Error`
* @example
@@ -5331,6 +5422,7 @@ getJasmineRequireObj().toThrowMatching = function(j$) {
* {@link expect} a function to `throw` something matching a predicate.
* @function
* @name matchers#toThrowMatching
* @since 3.0.0
* @param {Function} predicate - A function that takes the thrown exception as its parameter and returns true if it matches.
* @example
* expect(function() { throw new Error('nope'); }).toThrowMatching(function(thrown) { return thrown.message === 'nope'; });
@@ -6162,6 +6254,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* Calls to `describe` can be nested within other calls to compose your suite as a tree.
* @name describe
* @since 1.3.0
* @function
* @global
* @param {String} description Textual description of the group
@@ -6176,6 +6269,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* Specs within an `xdescribe` will be marked pending and not executed
* @name xdescribe
* @since 1.3.0
* @function
* @global
* @param {String} description Textual description of the group
@@ -6191,6 +6285,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
* If suites or specs are focused, only those that are focused will be executed
* @see fit
* @name fdescribe
* @since 2.1.0
* @function
* @global
* @param {String} description Textual description of the group
@@ -6205,6 +6300,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* A spec whose expectations all succeed will be passing and a spec with any failures will fail.
* @name it
* @since 1.3.0
* @function
* @global
* @param {String} description Textual description of what this spec is checking
@@ -6221,6 +6317,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* The spec will report as `pending` and will not be executed.
* @name xit
* @since 1.3.0
* @function
* @global
* @param {String} description Textual description of what this spec is checking.
@@ -6235,6 +6332,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* If suites or specs are focused, only those that are focused will be executed.
* @name fit
* @since 2.1.0
* @function
* @global
* @param {String} description Textual description of what this spec is checking.
@@ -6249,6 +6347,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Run some shared setup before each of the specs in the {@link describe} in which it is called.
* @name beforeEach
* @since 1.3.0
* @function
* @global
* @param {implementationCallback} [function] Function that contains the code to setup your specs.
@@ -6262,6 +6361,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Run some shared teardown after each of the specs in the {@link describe} in which it is called.
* @name afterEach
* @since 1.3.0
* @function
* @global
* @param {implementationCallback} [function] Function that contains the code to teardown your specs.
@@ -6277,6 +6377,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ Be careful, sharing the setup from a beforeAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.
* @name beforeAll
* @since 2.1.0
* @function
* @global
* @param {implementationCallback} [function] Function that contains the code to setup your specs.
@@ -6292,6 +6393,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ Be careful, sharing the teardown from a afterAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.
* @name afterAll
* @since 2.1.0
* @function
* @global
* @param {implementationCallback} [function] Function that contains the code to teardown your specs.
@@ -6305,6 +6407,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Create an expectation for a spec.
* @name expect
* @since 1.3.0
* @function
* @global
* @param {Object} actual - Actual computed value to test expectations against.
@@ -6320,6 +6423,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
* which must be either returned from the spec or waited for using `await`
* in order for Jasmine to associate them with the correct spec.
* @name expectAsync
* @since 3.3.0
* @function
* @global
* @param {Object} actual - Actual computed value to test expectations against.
@@ -6336,6 +6440,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Mark a spec as pending, expectation results will be ignored.
* @name pending
* @since 2.0.0
* @function
* @global
* @param {String} [message] - Reason the spec is pending.
@@ -6347,6 +6452,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Explicitly mark a spec as failed.
* @name fail
* @since 2.1.0
* @function
* @global
* @param {String|Error} [error] - Reason for the failure.
@@ -6358,6 +6464,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Install a spy onto an existing object.
* @name spyOn
* @since 1.3.0
* @function
* @global
* @param {Object} obj - The object upon which to install the {@link Spy}.
@@ -6371,6 +6478,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Install a spy on a property installed with `Object.defineProperty` onto an existing object.
* @name spyOnProperty
* @since 2.6.0
* @function
* @global
* @param {Object} obj - The object upon which to install the {@link Spy}
@@ -6385,6 +6493,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Installs spies on all writable and configurable properties of an object.
* @name spyOnAllFunctions
* @since 3.2.1
* @function
* @global
* @param {Object} obj - The object upon which to install the {@link Spy}s
@@ -6409,6 +6518,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.
* @name jasmine.addCustomEqualityTester
* @since 2.0.0
* @function
* @param {Function} tester - A function which takes two arguments to compare and returns a `true` or `false` comparison result if it knows how to compare them, and `undefined` otherwise.
* @see custom_equality
@@ -6422,6 +6532,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.
* @name jasmine.addMatchers
* @since 2.0.0
* @function
* @param {Object} matchers - Keys from this object will be the new matcher names.
* @see custom_matcher
@@ -6433,6 +6544,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Get the currently booted mock {Clock} for this Jasmine environment.
* @name jasmine.clock
* @since 2.0.0
* @function
* @returns {Clock}
*/
@@ -6443,6 +6555,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Create a bare {@link Spy} object. This won't be installed anywhere and will not have any implementation behind it.
* @name jasmine.createSpy
* @since 1.3.0
* @function
* @param {String} [name] - Name to give the spy. This will be displayed in failure messages.
* @param {Function} [originalFn] - Function to act as the real implementation.
@@ -6455,6 +6568,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Create an object with multiple {@link Spy}s as its members.
* @name jasmine.createSpyObj
* @since 1.3.0
* @function
* @param {String} [baseName] - Base name for the spies in the object.
* @param {String[]|Object} methodNames - Array of method names to create spies for, or Object whose keys will be method names and values the {@link Spy#and#returnValue|returnValue}.
@@ -6469,6 +6583,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.
* @name jasmine.addSpyStrategy
* @since 3.5.0
* @function
* @param {String} name - The name of the strategy (i.e. what you call from `and`)
* @param {Function} factory - Factory function that returns the plan to be executed.
@@ -6589,6 +6704,7 @@ getJasmineRequireObj().Spy = function(j$) {
* whenever the spy is called with arguments that don't match any strategy
* created with {@link Spy#withArgs}.
* @name Spy#and
* @since 2.0.0
* @example
* spyOn(someObj, 'func').and.returnValue(42);
*/
@@ -6597,6 +6713,7 @@ getJasmineRequireObj().Spy = function(j$) {
* Specifies a strategy to be used for calls to the spy that have the
* specified arguments.
* @name Spy#withArgs
* @since 3.0.0
* @function
* @param {...*} args - The arguments to match
* @type {SpyStrategy}
@@ -6953,6 +7070,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Get the identifying information for the spy.
* @name SpyStrategy#identity
* @since 3.0.0
* @member
* @type {String}
*/
@@ -6990,6 +7108,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to return a promise resolving to the specified value when invoked.
* @name SpyStrategy#resolveTo
* @since 3.5.0
* @function
* @param {*} value The value to return.
*/
@@ -7004,6 +7123,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to return a promise rejecting with the specified value when invoked.
* @name SpyStrategy#rejectWith
* @since 3.5.0
* @function
* @param {*} value The value to return.
*/
@@ -7033,6 +7153,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Execute the current spy strategy.
* @name SpyStrategy#exec
* @since 2.0.0
* @function
*/
SpyStrategy.prototype.exec = function(context, args) {
@@ -7042,6 +7163,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to call through to the real implementation when invoked.
* @name SpyStrategy#callThrough
* @since 2.0.0
* @function
*/
SpyStrategy.prototype.callThrough = function() {
@@ -7052,6 +7174,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to return the value when invoked.
* @name SpyStrategy#returnValue
* @since 2.0.0
* @function
* @param {*} value The value to return.
*/
@@ -7065,6 +7188,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to return one of the specified values (sequentially) each time the spy is invoked.
* @name SpyStrategy#returnValues
* @since 2.1.0
* @function
* @param {...*} values - Values to be returned on subsequent calls to the spy.
*/
@@ -7079,6 +7203,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to throw an error when invoked.
* @name SpyStrategy#throwError
* @since 2.0.0
* @function
* @param {Error|String} something Thing to throw
*/
@@ -7093,6 +7218,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to call a fake implementation when invoked.
* @name SpyStrategy#callFake
* @since 2.0.0
* @function
* @param {Function} fn The function to invoke with the passed parameters.
*/
@@ -7109,6 +7235,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to do nothing when invoked. This is the default.
* @name SpyStrategy#stub
* @since 2.0.0
* @function
*/
SpyStrategy.prototype.stub = function(fn) {

View File

@@ -1,6 +1,7 @@
getJasmineRequireObj().CallTracker = function(j$) {
/**
* @namespace Spy#calls
* @since 2.0.0
*/
function CallTracker() {
var calls = [];
@@ -16,6 +17,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Check whether this spy has been invoked.
* @name Spy#calls#any
* @since 2.0.0
* @function
* @return {Boolean}
*/
@@ -26,6 +28,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the number of invocations of this spy.
* @name Spy#calls#count
* @since 2.0.0
* @function
* @return {Integer}
*/
@@ -36,6 +39,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the arguments that were passed to a specific invocation of this spy.
* @name Spy#calls#argsFor
* @since 2.0.0
* @function
* @param {Integer} index The 0-based invocation index.
* @return {Array}
@@ -48,6 +52,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the raw calls array for this spy.
* @name Spy#calls#all
* @since 2.0.0
* @function
* @return {Spy.callData[]}
*/
@@ -58,6 +63,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get all of the arguments for each invocation of this spy in the order they were received.
* @name Spy#calls#allArgs
* @since 2.0.0
* @function
* @return {Array}
*/
@@ -73,6 +79,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the first invocation of this spy.
* @name Spy#calls#first
* @since 2.0.0
* @function
* @return {ObjecSpy.callData}
*/
@@ -83,6 +90,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Get the most recent invocation of this spy.
* @name Spy#calls#mostRecent
* @since 2.0.0
* @function
* @return {ObjecSpy.callData}
*/
@@ -93,6 +101,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Reset this spy as if it has never been called.
* @name Spy#calls#reset
* @since 2.0.0
* @function
*/
this.reset = function() {
@@ -102,6 +111,7 @@ getJasmineRequireObj().CallTracker = function(j$) {
/**
* Set this spy to do a shallow clone of arguments passed to each invocation.
* @name Spy#calls#saveArgumentsByValue
* @since 2.5.0
* @function
*/
this.saveArgumentsByValue = function() {

View File

@@ -33,6 +33,7 @@ getJasmineRequireObj().Clock = function() {
/**
* Install the mock clock over the built-in methods.
* @name Clock#install
* @since 2.0.0
* @function
* @return {Clock}
*/
@@ -53,6 +54,7 @@ getJasmineRequireObj().Clock = function() {
/**
* Uninstall the mock clock, returning the built-in methods to their places.
* @name Clock#uninstall
* @since 2.0.0
* @function
*/
self.uninstall = function() {
@@ -69,6 +71,7 @@ getJasmineRequireObj().Clock = function() {
*
* The clock will be {@link Clock#install|install}ed before the function is called and {@link Clock#uninstall|uninstall}ed in a `finally` after the function completes.
* @name Clock#withMock
* @since 2.3.0
* @function
* @param {Function} closure The function to be called.
*/
@@ -84,6 +87,7 @@ getJasmineRequireObj().Clock = function() {
/**
* Instruct the installed Clock to also mock the date returned by `new Date()`
* @name Clock#mockDate
* @since 2.1.0
* @function
* @param {Date} [initialDate=now] The `Date` to provide.
*/
@@ -116,6 +120,7 @@ getJasmineRequireObj().Clock = function() {
/**
* Tick the Clock forward, running any enqueued timeouts along the way
* @name Clock#tick
* @since 1.3.0
* @function
* @param {int} millis The number of milliseconds to tick.
*/

View File

@@ -2,6 +2,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* _Note:_ Do not construct this directly, Jasmine will make one during booting.
* @name Env
* @since 2.0.0
* @classdesc The Jasmine environment
* @constructor
*/
@@ -36,11 +37,13 @@ getJasmineRequireObj().Env = function(j$) {
* This represents the available options to configure Jasmine.
* Options that are not provided will use their default values
* @interface Configuration
* @since 3.3.0
*/
var config = {
/**
* Whether to randomize spec execution order
* @name Configuration#random
* @since 3.3.0
* @type Boolean
* @default true
*/
@@ -49,6 +52,7 @@ getJasmineRequireObj().Env = function(j$) {
* Seed to use as the basis of randomization.
* Null causes the seed to be determined randomly at the start of execution.
* @name Configuration#seed
* @since 3.3.0
* @type function
* @default null
*/
@@ -56,6 +60,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Whether to stop execution of the suite after the first spec failure
* @name Configuration#failFast
* @since 3.3.0
* @type Boolean
* @default false
*/
@@ -63,6 +68,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Whether to cause specs to only have one expectation failure.
* @name Configuration#oneFailurePerSpec
* @since 3.3.0
* @type Boolean
* @default false
*/
@@ -70,6 +76,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Function to use to filter specs
* @name Configuration#specFilter
* @since 3.3.0
* @type function
* @default true
*/
@@ -80,6 +87,7 @@ getJasmineRequireObj().Env = function(j$) {
* Whether or not reporters should hide disabled specs from their output.
* Currently only supported by Jasmine's HTMLReporter
* @name Configuration#hideDisabled
* @since 3.3.0
* @type Boolean
* @default false
*/
@@ -89,6 +97,7 @@ getJasmineRequireObj().Env = function(j$) {
* to create a promise. If not set, it will default to whatever global Promise
* library is available (if any).
* @name Configuration#Promise
* @since 3.5.0
* @type function
* @default undefined
*/
@@ -137,6 +146,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Configure your jasmine environment
* @name Env#configure
* @since 3.3.0
* @argument {Configuration} configuration
* @function
*/
@@ -182,6 +192,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Get the current configuration for your jasmine environment
* @name Env#configuration
* @since 3.3.0
* @function
* @returns {Configuration}
*/
@@ -349,6 +360,7 @@ getJasmineRequireObj().Env = function(j$) {
* Sets whether Jasmine should throw an Error when an expectation fails.
* This causes a spec to only have one expectation failure.
* @name Env#throwOnExpectationFailure
* @since 2.3.0
* @function
* @param {Boolean} value Whether to throw when a expectation fails
* @deprecated Use the `oneFailurePerSpec` option with {@link Env#configure}
@@ -370,6 +382,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Set whether to stop suite execution when a spec fails
* @name Env#stopOnSpecFailure
* @since 2.7.0
* @function
* @param {Boolean} value Whether to stop suite execution when a spec fails
* @deprecated Use the `failFast` option with {@link Env#configure}
@@ -391,6 +404,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Set whether to randomize test execution order
* @name Env#randomizeTests
* @since 2.4.0
* @function
* @param {Boolean} value Whether to randomize execution order
* @deprecated Use the `random` option with {@link Env#configure}
@@ -412,6 +426,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Set the random number seed for spec randomization
* @name Env#seed
* @since 2.4.0
* @function
* @param {Number} value The seed value
* @deprecated Use the `seed` option with {@link Env#configure}
@@ -435,6 +450,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* @name Env#hideDisabled
* @since 3.2.0
* @function
*/
this.hideDisabled = function(value) {
@@ -682,6 +698,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Add a custom reporter to the Jasmine environment.
* @name Env#addReporter
* @since 2.0.0
* @function
* @param {Reporter} reporterToAdd The reporter to be added.
* @see custom_reporter
@@ -693,6 +710,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Provide a fallback reporter if no other reporters have been specified.
* @name Env#provideFallbackReporter
* @since 2.5.0
* @function
* @param {Reporter} reporterToAdd The reporter
* @see custom_reporter
@@ -704,6 +722,7 @@ getJasmineRequireObj().Env = function(j$) {
/**
* Clear all registered reporters
* @name Env#clearReporters
* @since 2.5.2
* @function
*/
this.clearReporters = function() {

View File

@@ -25,6 +25,7 @@ getJasmineRequireObj().Expectation = function(j$) {
* Add some context for an {@link expect}
* @function
* @name matchers#withContext
* @since 3.3.0
* @param {String} message - Additional context to show when the matcher fails
* @return {matchers}
*/
@@ -36,6 +37,7 @@ getJasmineRequireObj().Expectation = function(j$) {
* Invert the matcher following this {@link expect}
* @member
* @name matchers#not
* @since 1.3.0
* @type {matchers}
* @example
* expect(something).not.toBe(true);
@@ -69,6 +71,7 @@ getJasmineRequireObj().Expectation = function(j$) {
* Add some context for an {@link expectAsync}
* @function
* @name async-matchers#withContext
* @since 3.3.0
* @param {String} message - Additional context to show when the async matcher fails
* @return {async-matchers}
*/

View File

@@ -31,6 +31,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
/**
* Get the current status for the Jasmine environment.
* @name jsApiReporter#status
* @since 2.0.0
* @function
* @return {String} - One of `loaded`, `started`, or `done`
*/
@@ -54,6 +55,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
*
* Retrievable in slices for easier serialization.
* @name jsApiReporter#suiteResults
* @since 2.1.0
* @function
* @param {Number} index - The position in the suites list to start from.
* @param {Number} length - Maximum number of suite results to return.
@@ -71,6 +73,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
/**
* Get all of the suites in a single object, with their `id` as the key.
* @name jsApiReporter#suites
* @since 2.0.0
* @function
* @return {Object} - Map of suite id to {@link SuiteResult}
*/
@@ -89,6 +92,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
*
* Retrievable in slices for easier serialization.
* @name jsApiReporter#specResults
* @since 2.0.0
* @function
* @param {Number} index - The position in the specs list to start from.
* @param {Number} length - Maximum number of specs results to return.
@@ -101,6 +105,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
/**
* Get all spec results.
* @name jsApiReporter#specs
* @since 2.0.0
* @function
* @return {SpecResult[]}
*/
@@ -111,6 +116,7 @@ getJasmineRequireObj().JsApiReporter = function(j$) {
/**
* Get the number of milliseconds it took for the full Jasmine suite to run.
* @name jsApiReporter#executionTime
* @since 2.0.0
* @function
* @return {Number}
*/

View File

@@ -107,6 +107,7 @@ getJasmineRequireObj().Spy = function(j$) {
* whenever the spy is called with arguments that don't match any strategy
* created with {@link Spy#withArgs}.
* @name Spy#and
* @since 2.0.0
* @example
* spyOn(someObj, 'func').and.returnValue(42);
*/
@@ -115,6 +116,7 @@ getJasmineRequireObj().Spy = function(j$) {
* Specifies a strategy to be used for calls to the spy that have the
* specified arguments.
* @name Spy#withArgs
* @since 3.0.0
* @function
* @param {...*} args - The arguments to match
* @type {SpyStrategy}

View File

@@ -10,6 +10,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Get the identifying information for the spy.
* @name SpyStrategy#identity
* @since 3.0.0
* @member
* @type {String}
*/
@@ -47,6 +48,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to return a promise resolving to the specified value when invoked.
* @name SpyStrategy#resolveTo
* @since 3.5.0
* @function
* @param {*} value The value to return.
*/
@@ -61,6 +63,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to return a promise rejecting with the specified value when invoked.
* @name SpyStrategy#rejectWith
* @since 3.5.0
* @function
* @param {*} value The value to return.
*/
@@ -90,6 +93,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Execute the current spy strategy.
* @name SpyStrategy#exec
* @since 2.0.0
* @function
*/
SpyStrategy.prototype.exec = function(context, args) {
@@ -99,6 +103,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to call through to the real implementation when invoked.
* @name SpyStrategy#callThrough
* @since 2.0.0
* @function
*/
SpyStrategy.prototype.callThrough = function() {
@@ -109,6 +114,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to return the value when invoked.
* @name SpyStrategy#returnValue
* @since 2.0.0
* @function
* @param {*} value The value to return.
*/
@@ -122,6 +128,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to return one of the specified values (sequentially) each time the spy is invoked.
* @name SpyStrategy#returnValues
* @since 2.1.0
* @function
* @param {...*} values - Values to be returned on subsequent calls to the spy.
*/
@@ -136,6 +143,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to throw an error when invoked.
* @name SpyStrategy#throwError
* @since 2.0.0
* @function
* @param {Error|String} something Thing to throw
*/
@@ -150,6 +158,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to call a fake implementation when invoked.
* @name SpyStrategy#callFake
* @since 2.0.0
* @function
* @param {Function} fn The function to invoke with the passed parameters.
*/
@@ -166,6 +175,7 @@ getJasmineRequireObj().SpyStrategy = function(j$) {
/**
* Tell the spy to do nothing when invoked. This is the default.
* @name SpyStrategy#stub
* @since 2.0.0
* @function
*/
SpyStrategy.prototype.stub = function(fn) {

View File

@@ -7,6 +7,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* 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.
* @name jasmine.MAX_PRETTY_PRINT_DEPTH
* @since 1.3.0
*/
j$.MAX_PRETTY_PRINT_DEPTH = 8;
/**
@@ -14,17 +15,20 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* This will also limit the number of keys and values displayed for an object.
* Elements past this number will be ellipised.
* @name jasmine.MAX_PRETTY_PRINT_ARRAY_LENGTH
* @since 2.7.0
*/
j$.MAX_PRETTY_PRINT_ARRAY_LENGTH = 50;
/**
* Maximum number of characters to display when pretty printing objects.
* Characters past this number will be ellipised.
* @name jasmine.MAX_PRETTY_PRINT_CHARS
* @since 2.9.0
*/
j$.MAX_PRETTY_PRINT_CHARS = 1000;
/**
* Default number of milliseconds Jasmine will wait for an asynchronous spec to complete.
* @name jasmine.DEFAULT_TIMEOUT_INTERVAL
* @since 1.3.0
*/
j$.DEFAULT_TIMEOUT_INTERVAL = 5000;
@@ -36,6 +40,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get the currently booted Jasmine Environment.
*
* @name jasmine.getEnv
* @since 1.3.0
* @function
* @return {Env}
*/
@@ -163,6 +168,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is an instance of the specified class/constructor.
* @name jasmine.any
* @since 1.3.0
* @function
* @param {Constructor} clazz - The constructor to check against.
*/
@@ -174,6 +180,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is not `null` and not `undefined`.
* @name jasmine.anything
* @since 2.2.0
* @function
*/
j$.anything = function() {
@@ -184,6 +191,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is `true` or anything truthy.
* @name jasmine.truthy
* @since 3.1.0
* @function
*/
j$.truthy = function() {
@@ -194,6 +202,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is `null`, `undefined`, `0`, `false` or anything falsey.
* @name jasmine.falsy
* @since 3.1.0
* @function
*/
j$.falsy = function() {
@@ -204,6 +213,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is empty.
* @name jasmine.empty
* @since 3.1.0
* @function
*/
j$.empty = function() {
@@ -214,6 +224,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared is not empty.
* @name jasmine.notEmpty
* @since 3.1.0
* @function
*/
j$.notEmpty = function() {
@@ -224,6 +235,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value being compared contains at least the keys and values.
* @name jasmine.objectContaining
* @since 1.3.0
* @function
* @param {Object} sample - The subset of properties that _must_ be in the actual.
*/
@@ -235,6 +247,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value is a `String` that matches the `RegExp` or `String`.
* @name jasmine.stringMatching
* @since 2.2.0
* @function
* @param {RegExp|String} expected
*/
@@ -246,6 +259,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value is an `Array` that contains at least the elements in the sample.
* @name jasmine.arrayContaining
* @since 2.2.0
* @function
* @param {Array} sample
*/
@@ -257,6 +271,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
* that will succeed if the actual value is an `Array` that contains all of the elements in the sample in any order.
* @name jasmine.arrayWithExactContents
* @since 2.8.0
* @function
* @param {Array} sample
*/

View File

@@ -4,6 +4,7 @@ getJasmineRequireObj().toBeRejected = function(j$) {
* @function
* @async
* @name async-matchers#toBeRejected
* @since 3.1.0
* @example
* await expectAsync(aPromise).toBeRejected();
* @example

View File

@@ -4,6 +4,7 @@ getJasmineRequireObj().toBeRejectedWith = function(j$) {
* @function
* @async
* @name async-matchers#toBeRejectedWith
* @since 3.3.0
* @param {Object} expected - Value that the promise is expected to be rejected with
* @example
* await expectAsync(aPromise).toBeRejectedWith({prop: 'value'});

View File

@@ -4,6 +4,7 @@ getJasmineRequireObj().toBeRejectedWithError = function(j$) {
* @function
* @async
* @name async-matchers#toBeRejectedWithError
* @since 3.5.0
* @param {Error} [expected] - `Error` constructor the object that was thrown needs to be an instance of. If not provided, `Error` will be used.
* @param {RegExp|String} [message] - The message that should be set on the thrown `Error`
* @example

View File

@@ -4,6 +4,7 @@ getJasmineRequireObj().toBeResolved = function(j$) {
* @function
* @async
* @name async-matchers#toBeResolved
* @since 3.1.0
* @example
* await expectAsync(aPromise).toBeResolved();
* @example

View File

@@ -4,6 +4,7 @@ getJasmineRequireObj().toBeResolvedTo = function(j$) {
* @function
* @async
* @name async-matchers#toBeResolvedTo
* @since 3.1.0
* @param {Object} expected - Value that the promise is expected to resolve to
* @example
* await expectAsync(aPromise).toBeResolvedTo({prop: 'value'});

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().nothing = function() {
* {@link expect} nothing explicitly.
* @function
* @name matchers#nothing
* @since 2.8.0
* @example
* expect().nothing();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBe = function(j$) {
* {@link expect} the actual value to be `===` to the expected value.
* @function
* @name matchers#toBe
* @since 1.3.0
* @param {Object} expected - The expected value to compare against.
* @example
* expect(thing).toBe(realThing);

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeCloseTo = function() {
* {@link expect} the actual value to be within a specified precision of the expected value.
* @function
* @name matchers#toBeCloseTo
* @since 1.3.0
* @param {Object} expected - The expected value to compare against.
* @param {Number} [precision=2] - The number of decimal points to check.
* @example

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeDefined = function() {
* {@link expect} the actual value to be defined. (Not `undefined`)
* @function
* @name matchers#toBeDefined
* @since 1.3.0
* @example
* expect(result).toBeDefined();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeFalse = function() {
* {@link expect} the actual value to be `false`.
* @function
* @name matchers#toBeFalse
* @since 3.5.0
* @example
* expect(result).toBeFalse();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeFalsy = function() {
* {@link expect} the actual value to be falsy
* @function
* @name matchers#toBeFalsy
* @since 2.0.0
* @example
* expect(result).toBeFalsy();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeGreaterThan = function() {
* {@link expect} the actual value to be greater than the expected value.
* @function
* @name matchers#toBeGreaterThan
* @since 2.0.0
* @param {Number} expected - The value to compare against.
* @example
* expect(result).toBeGreaterThan(3);

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeGreaterThanOrEqual = function() {
* {@link expect} the actual value to be greater than or equal to the expected value.
* @function
* @name matchers#toBeGreaterThanOrEqual
* @since 2.0.0
* @param {Number} expected - The expected value to compare against.
* @example
* expect(result).toBeGreaterThanOrEqual(25);

View File

@@ -5,6 +5,7 @@ getJasmineRequireObj().toBeInstanceOf = function(j$) {
* {@link expect} the actual to be an instance of the expected class
* @function
* @name matchers#toBeInstanceOf
* @since 3.5.0
* @param {Object} expected - The class or constructor function to check for
* @example
* expect('foo').toBeInstanceOf(String);

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeLessThan = function() {
* {@link expect} the actual value to be less than the expected value.
* @function
* @name matchers#toBeLessThan
* @since 2.0.0
* @param {Number} expected - The expected value to compare against.
* @example
* expect(result).toBeLessThan(0);

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeLessThanOrEqual = function() {
* {@link expect} the actual value to be less than or equal to the expected value.
* @function
* @name matchers#toBeLessThanOrEqual
* @since 2.0.0
* @param {Number} expected - The expected value to compare against.
* @example
* expect(result).toBeLessThanOrEqual(123);

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeNaN = function(j$) {
* {@link expect} the actual value to be `NaN` (Not a Number).
* @function
* @name matchers#toBeNaN
* @since 1.3.0
* @example
* expect(thing).toBeNaN();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeNegativeInfinity = function(j$) {
* {@link expect} the actual value to be `-Infinity` (-infinity).
* @function
* @name matchers#toBeNegativeInfinity
* @since 2.6.0
* @example
* expect(thing).toBeNegativeInfinity();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeNull = function() {
* {@link expect} the actual value to be `null`.
* @function
* @name matchers#toBeNull
* @since 1.3.0
* @example
* expect(result).toBeNull();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBePositiveInfinity = function(j$) {
* {@link expect} the actual value to be `Infinity` (infinity).
* @function
* @name matchers#toBePositiveInfinity
* @since 2.6.0
* @example
* expect(thing).toBePositiveInfinity();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeTrue = function() {
* {@link expect} the actual value to be `true`.
* @function
* @name matchers#toBeTrue
* @since 3.5.0
* @example
* expect(result).toBeTrue();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeTruthy = function() {
* {@link expect} the actual value to be truthy.
* @function
* @name matchers#toBeTruthy
* @since 2.0.0
* @example
* expect(thing).toBeTruthy();
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toBeUndefined = function() {
* {@link expect} the actual value to be `undefined`.
* @function
* @name matchers#toBeUndefined
* @since 1.3.0
* @example
* expect(result).toBeUndefined():
*/

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toContain = function() {
* {@link expect} the actual value to contain a specific value.
* @function
* @name matchers#toContain
* @since 2.0.0
* @param {Object} expected - The value to look for.
* @example
* expect(array).toContain(anElement);

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toEqual = function(j$) {
* {@link expect} the actual value to be equal to the expected, using deep equality comparison.
* @function
* @name matchers#toEqual
* @since 1.3.0
* @param {Object} expected - Expected value
* @example
* expect(bigObject).toEqual({"foo": ['bar', 'baz']});

View File

@@ -6,6 +6,7 @@ getJasmineRequireObj().toHaveBeenCalled = function(j$) {
* {@link expect} the actual (a {@link Spy}) to have been called.
* @function
* @name matchers#toHaveBeenCalled
* @since 1.3.0
* @example
* expect(mySpy).toHaveBeenCalled();
* expect(mySpy).not.toHaveBeenCalled();

View File

@@ -6,6 +6,7 @@ getJasmineRequireObj().toHaveBeenCalledBefore = function(j$) {
* {@link expect} the actual value (a {@link Spy}) to have been called before another {@link Spy}.
* @function
* @name matchers#toHaveBeenCalledBefore
* @since 2.6.0
* @param {Spy} expected - {@link Spy} that should have been called after the `actual` {@link Spy}.
* @example
* expect(mySpy).toHaveBeenCalledBefore(otherSpy);

View File

@@ -6,6 +6,7 @@ getJasmineRequireObj().toHaveBeenCalledTimes = function(j$) {
* {@link expect} the actual (a {@link Spy}) to have been called the specified number of times.
* @function
* @name matchers#toHaveBeenCalledTimes
* @since 2.4.0
* @param {Number} expected - The number of invocations to look for.
* @example
* expect(mySpy).toHaveBeenCalledTimes(3);

View File

@@ -6,6 +6,7 @@ getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
* {@link expect} the actual (a {@link Spy}) to have been called with particular arguments at least once.
* @function
* @name matchers#toHaveBeenCalledWith
* @since 1.3.0
* @param {...Object} - The arguments to look for
* @example
* expect(mySpy).toHaveBeenCalledWith('foo', 'bar', 2);

View File

@@ -3,6 +3,7 @@ getJasmineRequireObj().toHaveClass = function(j$) {
* {@link expect} the actual value to be a DOM element that has the expected class
* @function
* @name matchers#toHaveClass
* @since 3.0.0
* @param {Object} expected - The class name to test for
* @example
* var el = document.createElement('div');

View File

@@ -6,6 +6,7 @@ getJasmineRequireObj().toMatch = function(j$) {
* {@link expect} the actual value to match a regular expression
* @function
* @name matchers#toMatch
* @since 1.3.0
* @param {RegExp|String} expected - Value to look for in the string.
* @example
* expect("my string").toMatch(/string$/);

View File

@@ -6,6 +6,7 @@ getJasmineRequireObj().toThrow = function(j$) {
* {@link expect} a function to `throw` something.
* @function
* @name matchers#toThrow
* @since 2.0.0
* @param {Object} [expected] - Value that should be thrown. If not provided, simply the fact that something was thrown will be checked.
* @example
* expect(function() { return 'things'; }).toThrow('foo');

View File

@@ -6,6 +6,7 @@ getJasmineRequireObj().toThrowError = function(j$) {
* {@link expect} a function to `throw` an `Error`.
* @function
* @name matchers#toThrowError
* @since 2.0.0
* @param {Error} [expected] - `Error` constructor the object that was thrown needs to be an instance of. If not provided, `Error` will be used.
* @param {RegExp|String} [message] - The message that should be set on the thrown `Error`
* @example

View File

@@ -5,6 +5,7 @@ getJasmineRequireObj().toThrowMatching = function(j$) {
* {@link expect} a function to `throw` something matching a predicate.
* @function
* @name matchers#toThrowMatching
* @since 3.0.0
* @param {Function} predicate - A function that takes the thrown exception as its parameter and returns true if it matches.
* @example
* expect(function() { throw new Error('nope'); }).toThrowMatching(function(thrown) { return thrown.message === 'nope'; });

View File

@@ -15,6 +15,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* Calls to `describe` can be nested within other calls to compose your suite as a tree.
* @name describe
* @since 1.3.0
* @function
* @global
* @param {String} description Textual description of the group
@@ -29,6 +30,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* Specs within an `xdescribe` will be marked pending and not executed
* @name xdescribe
* @since 1.3.0
* @function
* @global
* @param {String} description Textual description of the group
@@ -44,6 +46,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
* If suites or specs are focused, only those that are focused will be executed
* @see fit
* @name fdescribe
* @since 2.1.0
* @function
* @global
* @param {String} description Textual description of the group
@@ -58,6 +61,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* A spec whose expectations all succeed will be passing and a spec with any failures will fail.
* @name it
* @since 1.3.0
* @function
* @global
* @param {String} description Textual description of what this spec is checking
@@ -74,6 +78,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* The spec will report as `pending` and will not be executed.
* @name xit
* @since 1.3.0
* @function
* @global
* @param {String} description Textual description of what this spec is checking.
@@ -88,6 +93,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* If suites or specs are focused, only those that are focused will be executed.
* @name fit
* @since 2.1.0
* @function
* @global
* @param {String} description Textual description of what this spec is checking.
@@ -102,6 +108,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Run some shared setup before each of the specs in the {@link describe} in which it is called.
* @name beforeEach
* @since 1.3.0
* @function
* @global
* @param {implementationCallback} [function] Function that contains the code to setup your specs.
@@ -115,6 +122,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Run some shared teardown after each of the specs in the {@link describe} in which it is called.
* @name afterEach
* @since 1.3.0
* @function
* @global
* @param {implementationCallback} [function] Function that contains the code to teardown your specs.
@@ -130,6 +138,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ Be careful, sharing the setup from a beforeAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.
* @name beforeAll
* @since 2.1.0
* @function
* @global
* @param {implementationCallback} [function] Function that contains the code to setup your specs.
@@ -145,6 +154,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ Be careful, sharing the teardown from a afterAll makes it easy to accidentally leak state between your specs so that they erroneously pass or fail.
* @name afterAll
* @since 2.1.0
* @function
* @global
* @param {implementationCallback} [function] Function that contains the code to teardown your specs.
@@ -158,6 +168,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Create an expectation for a spec.
* @name expect
* @since 1.3.0
* @function
* @global
* @param {Object} actual - Actual computed value to test expectations against.
@@ -173,6 +184,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
* which must be either returned from the spec or waited for using `await`
* in order for Jasmine to associate them with the correct spec.
* @name expectAsync
* @since 3.3.0
* @function
* @global
* @param {Object} actual - Actual computed value to test expectations against.
@@ -189,6 +201,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Mark a spec as pending, expectation results will be ignored.
* @name pending
* @since 2.0.0
* @function
* @global
* @param {String} [message] - Reason the spec is pending.
@@ -200,6 +213,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Explicitly mark a spec as failed.
* @name fail
* @since 2.1.0
* @function
* @global
* @param {String|Error} [error] - Reason for the failure.
@@ -211,6 +225,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Install a spy onto an existing object.
* @name spyOn
* @since 1.3.0
* @function
* @global
* @param {Object} obj - The object upon which to install the {@link Spy}.
@@ -224,6 +239,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Install a spy on a property installed with `Object.defineProperty` onto an existing object.
* @name spyOnProperty
* @since 2.6.0
* @function
* @global
* @param {Object} obj - The object upon which to install the {@link Spy}
@@ -238,6 +254,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Installs spies on all writable and configurable properties of an object.
* @name spyOnAllFunctions
* @since 3.2.1
* @function
* @global
* @param {Object} obj - The object upon which to install the {@link Spy}s
@@ -262,6 +279,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.
* @name jasmine.addCustomEqualityTester
* @since 2.0.0
* @function
* @param {Function} tester - A function which takes two arguments to compare and returns a `true` or `false` comparison result if it knows how to compare them, and `undefined` otherwise.
* @see custom_equality
@@ -275,6 +293,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.
* @name jasmine.addMatchers
* @since 2.0.0
* @function
* @param {Object} matchers - Keys from this object will be the new matcher names.
* @see custom_matcher
@@ -286,6 +305,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Get the currently booted mock {Clock} for this Jasmine environment.
* @name jasmine.clock
* @since 2.0.0
* @function
* @returns {Clock}
*/
@@ -296,6 +316,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Create a bare {@link Spy} object. This won't be installed anywhere and will not have any implementation behind it.
* @name jasmine.createSpy
* @since 1.3.0
* @function
* @param {String} [name] - Name to give the spy. This will be displayed in failure messages.
* @param {Function} [originalFn] - Function to act as the real implementation.
@@ -308,6 +329,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
/**
* Create an object with multiple {@link Spy}s as its members.
* @name jasmine.createSpyObj
* @since 1.3.0
* @function
* @param {String} [baseName] - Base name for the spies in the object.
* @param {String[]|Object} methodNames - Array of method names to create spies for, or Object whose keys will be method names and values the {@link Spy#and#returnValue|returnValue}.
@@ -322,6 +344,7 @@ getJasmineRequireObj().interface = function(jasmine, env) {
*
* _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.
* @name jasmine.addSpyStrategy
* @since 3.5.0
* @function
* @param {String} name - The name of the strategy (i.e. what you call from `and`)
* @param {Function} factory - Factory function that returns the plan to be executed.