Configurable spec/suite filename detection
* Adds extraItStackFrames and extraDescribeStackFrames config properties. * Un-deprecates the filename properties of reporter events. * Fixes #2065.
This commit is contained in:
@@ -99,12 +99,11 @@ getJasmineRequireObj().Spec = function(j$) {
|
||||
* @property {String} description - The description passed to the {@link it} that created this spec.
|
||||
* @property {String} fullName - The full description including all ancestors of this spec.
|
||||
* @property {String|null} parentSuiteId - The ID of the suite containing this spec, or null if this spec is not in a describe().
|
||||
* @property {String} filename - Deprecated. The name of the file the spec was defined in.
|
||||
* @property {String} filename - The name of the file the spec was defined in.
|
||||
* Note: The value may be incorrect if zone.js is installed or
|
||||
* `it`/`fit`/`xit` have been replaced with versions that don't maintain the
|
||||
* same call stack height as the originals. This property may be removed in
|
||||
* a future version unless there is enough user interest in keeping it.
|
||||
* See {@link https://github.com/jasmine/jasmine/issues/2065}.
|
||||
* same call stack height as the originals. You can fix that by setting
|
||||
* {@link Configuration#extraItStackFrames}.
|
||||
* @property {ExpectationResult[]} failedExpectations - The list of expectations that failed during execution of this spec.
|
||||
* @property {ExpectationResult[]} passedExpectations - The list of expectations that passed during execution of this spec.
|
||||
* @property {ExpectationResult[]} deprecationWarnings - The list of deprecation warnings that occurred during execution this spec.
|
||||
@@ -278,7 +277,20 @@ getJasmineRequireObj().Spec = function(j$) {
|
||||
* @returns {Array.<string>}
|
||||
* @since 5.7.0
|
||||
*/
|
||||
getPath: this.getPath.bind(this)
|
||||
getPath: this.getPath.bind(this),
|
||||
|
||||
/**
|
||||
* The name of the file the spec was defined in.
|
||||
* Note: The value may be incorrect if zone.js is installed or
|
||||
* `it`/`fit`/`xit` have been replaced with versions that don't maintain the
|
||||
* same call stack height as the originals. You can fix that by setting
|
||||
* {@link Configuration#extraItStackFrames}.
|
||||
* @name Spec#filename
|
||||
* @readonly
|
||||
* @type {string}
|
||||
* @since 5.13.0
|
||||
*/
|
||||
filename: this.filename
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user