API reference docs for HTML reporter and spec filters
This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
jasmineRequire.HtmlExactSpecFilter = function() {
|
||||
/**
|
||||
* Spec filter for use with {@link HtmlReporter}
|
||||
*
|
||||
* See lib/jasmine-core/boot1.js for usage.
|
||||
* @since 5.11.0
|
||||
*/
|
||||
class HtmlExactSpecFilter {
|
||||
#getFilterString;
|
||||
|
||||
/**
|
||||
* Create a filter instance.
|
||||
* @param options Object with a filterString method, which should
|
||||
* return the value of the "spec" query string parameter set by
|
||||
* {@link HtmlReporter}.
|
||||
*/
|
||||
constructor(options) {
|
||||
if (typeof options?.filterString !== 'function') {
|
||||
throw new Error('options.filterString must be a function');
|
||||
@@ -10,6 +22,11 @@ jasmineRequire.HtmlExactSpecFilter = function() {
|
||||
this.#getFilterString = options.filterString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the specified spec should be executed.
|
||||
* @param {Spec} spec
|
||||
* @returns {boolean}
|
||||
*/
|
||||
matches(spec) {
|
||||
const filterString = this.#getFilterString();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user