Flesh out jasmine-html.js API reference
This commit is contained in:
@@ -53,7 +53,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
* @implements {Reporter}
|
* @implements {Reporter}
|
||||||
* @param options Options object. See lib/jasmine-core/boot1.js for details.
|
* @param options Options object. See lib/jasmine-core/boot1.js for details.
|
||||||
* @since 1.2.0
|
* @since 1.2.0
|
||||||
* @deprecated
|
* @deprecated Use {@link HtmlReporterV2} instead.
|
||||||
*/
|
*/
|
||||||
class HtmlReporter {
|
class HtmlReporter {
|
||||||
#env;
|
#env;
|
||||||
@@ -263,6 +263,11 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
jasmineRequire.HtmlSpecFilter = function(j$) {
|
jasmineRequire.HtmlSpecFilter = function(j$) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class HtmlSpecFilter
|
||||||
|
* @param options Options object. See lib/jasmine-core/boot1.js for details.
|
||||||
|
* @deprecated Use {@link HtmlReporterV2Urls} instead.
|
||||||
|
*/
|
||||||
function HtmlSpecFilter(options) {
|
function HtmlSpecFilter(options) {
|
||||||
j$.getEnv().deprecated(
|
j$.getEnv().deprecated(
|
||||||
'HtmlReporter and HtmlSpecFilter are deprecated. Use HtmlReporterV2 instead.'
|
'HtmlReporter and HtmlSpecFilter are deprecated. Use HtmlReporterV2 instead.'
|
||||||
@@ -280,7 +285,6 @@ jasmineRequire.HtmlSpecFilter = function(j$) {
|
|||||||
* @function
|
* @function
|
||||||
* @param {string} specName The full name of the spec
|
* @param {string} specName The full name of the spec
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
* @deprcated
|
|
||||||
*/
|
*/
|
||||||
this.matches = function(specName) {
|
this.matches = function(specName) {
|
||||||
return filterPattern.test(specName);
|
return filterPattern.test(specName);
|
||||||
@@ -998,8 +1002,16 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
|||||||
* @class HtmlReporterV2
|
* @class HtmlReporterV2
|
||||||
* @classdesc Displays results and allows re-running individual specs and suites.
|
* @classdesc Displays results and allows re-running individual specs and suites.
|
||||||
* @implements {Reporter}
|
* @implements {Reporter}
|
||||||
* @param options Options object. See lib/jasmine-core/boot1.js for details.
|
* @param options Options object
|
||||||
* @since 6.0.0
|
* @since 6.0.0
|
||||||
|
* @example
|
||||||
|
* const env = jasmine.getEnv();
|
||||||
|
* const urls = new jasmine.HtmlReporterV2Urls();
|
||||||
|
* const reporter = new jasmine.HtmlReporterV2({
|
||||||
|
* env,
|
||||||
|
* urls,
|
||||||
|
* container: document.body
|
||||||
|
* });
|
||||||
*/
|
*/
|
||||||
class HtmlReporterV2 {
|
class HtmlReporterV2 {
|
||||||
#env;
|
#env;
|
||||||
@@ -1249,7 +1261,11 @@ jasmineRequire.HtmlReporterV2Urls = function(j$) {
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// TODO unify with V2 UrlBuilder?
|
// TODO unify with V2 UrlBuilder?
|
||||||
// TODO jsdoc
|
/**
|
||||||
|
* @class HtmlReporterV2Urls
|
||||||
|
* @classdesc Processes URLs for {@link HtmlReporterV2}.
|
||||||
|
* @since 6.0.0
|
||||||
|
*/
|
||||||
class HtmlReporterV2Urls {
|
class HtmlReporterV2Urls {
|
||||||
constructor(options = {}) {
|
constructor(options = {}) {
|
||||||
// queryString is injectable for use in our own tests, but user code will
|
// queryString is injectable for use in our own tests, but user code will
|
||||||
@@ -1263,7 +1279,13 @@ jasmineRequire.HtmlReporterV2Urls = function(j$) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO jsdoc. This is public.
|
/**
|
||||||
|
* Creates a {@link Configuration} from the current page's URL.
|
||||||
|
* @returns {Configuration}
|
||||||
|
* @example
|
||||||
|
* const urls = new jasmine.HtmlReporterV2Urls();
|
||||||
|
* env.configure(urls.configFromCurrentUrl());
|
||||||
|
*/
|
||||||
configFromCurrentUrl() {
|
configFromCurrentUrl() {
|
||||||
const config = {
|
const config = {
|
||||||
stopOnSpecFailure: this.queryString.getParam('stopOnSpecFailure'),
|
stopOnSpecFailure: this.queryString.getParam('stopOnSpecFailure'),
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
* @implements {Reporter}
|
* @implements {Reporter}
|
||||||
* @param options Options object. See lib/jasmine-core/boot1.js for details.
|
* @param options Options object. See lib/jasmine-core/boot1.js for details.
|
||||||
* @since 1.2.0
|
* @since 1.2.0
|
||||||
* @deprecated
|
* @deprecated Use {@link HtmlReporterV2} instead.
|
||||||
*/
|
*/
|
||||||
class HtmlReporter {
|
class HtmlReporter {
|
||||||
#env;
|
#env;
|
||||||
|
|||||||
@@ -7,8 +7,16 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
|
|||||||
* @class HtmlReporterV2
|
* @class HtmlReporterV2
|
||||||
* @classdesc Displays results and allows re-running individual specs and suites.
|
* @classdesc Displays results and allows re-running individual specs and suites.
|
||||||
* @implements {Reporter}
|
* @implements {Reporter}
|
||||||
* @param options Options object. See lib/jasmine-core/boot1.js for details.
|
* @param options Options object
|
||||||
* @since 6.0.0
|
* @since 6.0.0
|
||||||
|
* @example
|
||||||
|
* const env = jasmine.getEnv();
|
||||||
|
* const urls = new jasmine.HtmlReporterV2Urls();
|
||||||
|
* const reporter = new jasmine.HtmlReporterV2({
|
||||||
|
* env,
|
||||||
|
* urls,
|
||||||
|
* container: document.body
|
||||||
|
* });
|
||||||
*/
|
*/
|
||||||
class HtmlReporterV2 {
|
class HtmlReporterV2 {
|
||||||
#env;
|
#env;
|
||||||
|
|||||||
@@ -2,7 +2,11 @@ jasmineRequire.HtmlReporterV2Urls = function(j$) {
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// TODO unify with V2 UrlBuilder?
|
// TODO unify with V2 UrlBuilder?
|
||||||
// TODO jsdoc
|
/**
|
||||||
|
* @class HtmlReporterV2Urls
|
||||||
|
* @classdesc Processes URLs for {@link HtmlReporterV2}.
|
||||||
|
* @since 6.0.0
|
||||||
|
*/
|
||||||
class HtmlReporterV2Urls {
|
class HtmlReporterV2Urls {
|
||||||
constructor(options = {}) {
|
constructor(options = {}) {
|
||||||
// queryString is injectable for use in our own tests, but user code will
|
// queryString is injectable for use in our own tests, but user code will
|
||||||
@@ -16,7 +20,13 @@ jasmineRequire.HtmlReporterV2Urls = function(j$) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO jsdoc. This is public.
|
/**
|
||||||
|
* Creates a {@link Configuration} from the current page's URL.
|
||||||
|
* @returns {Configuration}
|
||||||
|
* @example
|
||||||
|
* const urls = new jasmine.HtmlReporterV2Urls();
|
||||||
|
* env.configure(urls.configFromCurrentUrl());
|
||||||
|
*/
|
||||||
configFromCurrentUrl() {
|
configFromCurrentUrl() {
|
||||||
const config = {
|
const config = {
|
||||||
stopOnSpecFailure: this.queryString.getParam('stopOnSpecFailure'),
|
stopOnSpecFailure: this.queryString.getParam('stopOnSpecFailure'),
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
jasmineRequire.HtmlSpecFilter = function(j$) {
|
jasmineRequire.HtmlSpecFilter = function(j$) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class HtmlSpecFilter
|
||||||
|
* @param options Options object. See lib/jasmine-core/boot1.js for details.
|
||||||
|
* @deprecated Use {@link HtmlReporterV2Urls} instead.
|
||||||
|
*/
|
||||||
function HtmlSpecFilter(options) {
|
function HtmlSpecFilter(options) {
|
||||||
j$.getEnv().deprecated(
|
j$.getEnv().deprecated(
|
||||||
'HtmlReporter and HtmlSpecFilter are deprecated. Use HtmlReporterV2 instead.'
|
'HtmlReporter and HtmlSpecFilter are deprecated. Use HtmlReporterV2 instead.'
|
||||||
@@ -18,7 +23,6 @@ jasmineRequire.HtmlSpecFilter = function(j$) {
|
|||||||
* @function
|
* @function
|
||||||
* @param {string} specName The full name of the spec
|
* @param {string} specName The full name of the spec
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
* @deprcated
|
|
||||||
*/
|
*/
|
||||||
this.matches = function(specName) {
|
this.matches = function(specName) {
|
||||||
return filterPattern.test(specName);
|
return filterPattern.test(specName);
|
||||||
|
|||||||
Reference in New Issue
Block a user