From 85b2a8c6c4cf0fbc130a49bf71e5e34bd0ff4027 Mon Sep 17 00:00:00 2001 From: Gregg Van Hove Date: Thu, 1 Mar 2018 10:48:18 -0800 Subject: [PATCH] add some links to more tutorials from the api docs --- lib/jasmine-core/jasmine.js | 15 ++++++++++++++- src/core/Env.js | 9 ++++++++- src/core/requireInterface.js | 6 ++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index d3589e09..5a92deb5 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -795,7 +795,7 @@ getJasmineRequireObj().Env = function(j$) { }; var globalErrors = null; - + var installGlobalErrors = function() { if (globalErrors) { return; @@ -1006,6 +1006,7 @@ getJasmineRequireObj().Env = function(j$) { /** * This represents the available reporter callback for an object passed to {@link Env#addReporter}. * @interface Reporter + * @see custom_reporter */ var reporter = new j$.ReportDispatcher([ /** @@ -1015,6 +1016,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {JasmineStartedInfo} suiteInfo Information about the full Jasmine suite that is being run * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'jasmineStarted', /** @@ -1024,6 +1026,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {JasmineDoneInfo} suiteInfo Information about the full Jasmine suite that just finished running. * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'jasmineDone', /** @@ -1033,6 +1036,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {SuiteResult} result Information about the individual {@link describe} being run * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'suiteStarted', /** @@ -1044,6 +1048,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {SuiteResult} result * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'suiteDone', /** @@ -1053,6 +1058,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {SpecResult} result Information about the individual {@link it} being run * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'specStarted', /** @@ -1064,6 +1070,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {SpecResult} result * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'specDone' ], queueRunnerFactory); @@ -5017,6 +5024,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @param {String} description Textual description of what this spec is checking * @param {implementationCallback} [testFunction] Function that contains the code of your test. If not provided the test will be `pending`. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec. + * @see async */ it: function() { return env.it.apply(env, arguments); @@ -5046,6 +5054,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @param {String} description Textual description of what this spec is checking. * @param {implementationCallback} testFunction Function that contains the code of your test. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec. + * @see async */ fit: function() { return env.fit.apply(env, arguments); @@ -5058,6 +5067,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @global * @param {implementationCallback} [function] Function that contains the code to setup your specs. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeEach. + * @see async */ beforeEach: function() { return env.beforeEach.apply(env, arguments); @@ -5070,6 +5080,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @global * @param {implementationCallback} [function] Function that contains the code to teardown your specs. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterEach. + * @see async */ afterEach: function() { return env.afterEach.apply(env, arguments); @@ -5084,6 +5095,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @global * @param {implementationCallback} [function] Function that contains the code to setup your specs. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeAll. + * @see async */ beforeAll: function() { return env.beforeAll.apply(env, arguments); @@ -5098,6 +5110,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @global * @param {implementationCallback} [function] Function that contains the code to teardown your specs. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterAll. + * @see async */ afterAll: function() { return env.afterAll.apply(env, arguments); diff --git a/src/core/Env.js b/src/core/Env.js index 2e7f0729..464f6729 100644 --- a/src/core/Env.js +++ b/src/core/Env.js @@ -39,7 +39,7 @@ getJasmineRequireObj().Env = function(j$) { }; var globalErrors = null; - + var installGlobalErrors = function() { if (globalErrors) { return; @@ -250,6 +250,7 @@ getJasmineRequireObj().Env = function(j$) { /** * This represents the available reporter callback for an object passed to {@link Env#addReporter}. * @interface Reporter + * @see custom_reporter */ var reporter = new j$.ReportDispatcher([ /** @@ -259,6 +260,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {JasmineStartedInfo} suiteInfo Information about the full Jasmine suite that is being run * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'jasmineStarted', /** @@ -268,6 +270,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {JasmineDoneInfo} suiteInfo Information about the full Jasmine suite that just finished running. * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'jasmineDone', /** @@ -277,6 +280,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {SuiteResult} result Information about the individual {@link describe} being run * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'suiteStarted', /** @@ -288,6 +292,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {SuiteResult} result * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'suiteDone', /** @@ -297,6 +302,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {SpecResult} result Information about the individual {@link it} being run * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'specStarted', /** @@ -308,6 +314,7 @@ getJasmineRequireObj().Env = function(j$) { * @param {SpecResult} result * @param {Function} [done] Used to specify to Jasmine that this callback is asynchronous and Jasmine should wait until it has been called before moving on. * @returns {} Optionally return a Promise instead of using `done` to cause Jasmine to wait for completion. + * @see async */ 'specDone' ], queueRunnerFactory); diff --git a/src/core/requireInterface.js b/src/core/requireInterface.js index 62a5f073..ee43d438 100644 --- a/src/core/requireInterface.js +++ b/src/core/requireInterface.js @@ -63,6 +63,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @param {String} description Textual description of what this spec is checking * @param {implementationCallback} [testFunction] Function that contains the code of your test. If not provided the test will be `pending`. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec. + * @see async */ it: function() { return env.it.apply(env, arguments); @@ -92,6 +93,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @param {String} description Textual description of what this spec is checking. * @param {implementationCallback} testFunction Function that contains the code of your test. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async spec. + * @see async */ fit: function() { return env.fit.apply(env, arguments); @@ -104,6 +106,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @global * @param {implementationCallback} [function] Function that contains the code to setup your specs. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeEach. + * @see async */ beforeEach: function() { return env.beforeEach.apply(env, arguments); @@ -116,6 +119,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @global * @param {implementationCallback} [function] Function that contains the code to teardown your specs. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterEach. + * @see async */ afterEach: function() { return env.afterEach.apply(env, arguments); @@ -130,6 +134,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @global * @param {implementationCallback} [function] Function that contains the code to setup your specs. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async beforeAll. + * @see async */ beforeAll: function() { return env.beforeAll.apply(env, arguments); @@ -144,6 +149,7 @@ getJasmineRequireObj().interface = function(jasmine, env) { * @global * @param {implementationCallback} [function] Function that contains the code to teardown your specs. * @param {Int} [timeout={@link jasmine.DEFAULT_TIMEOUT_INTERVAL}] Custom timeout for an async afterAll. + * @see async */ afterAll: function() { return env.afterAll.apply(env, arguments);