From 9d3fb167a23f5790c745515feecabe7acf3cabe7 Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Sat, 19 Jul 2025 06:50:33 -0700 Subject: [PATCH] Document that the filename property of suite and spec results is deprecated See . --- lib/jasmine-core/jasmine.js | 12 ++++++++---- src/core/Spec.js | 6 ++++-- src/core/Suite.js | 6 ++++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 40d5a8ad..6a6354c6 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -905,10 +905,12 @@ 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 - The name of the file the spec was defined in. + * @property {String} filename - Deprecated. 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. + * 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}. * @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. @@ -10535,10 +10537,12 @@ getJasmineRequireObj().Suite = function(j$) { * @property {String} description - The description text passed to the {@link describe} that made this suite. * @property {String} fullName - The full description including all ancestors of this suite. * @property {String|null} parentSuiteId - The ID of the suite containing this suite, or null if this is not in another describe(). - * @property {String} filename - The name of the file the suite was defined in. + * @property {String} filename - Deprecated. The name of the file the suite was defined in. * Note: The value may be incorrect if zone.js is installed or * `describe`/`fdescribe`/`xdescribe` have been replaced with versions that - * don't maintain the same call stack height as the originals. + * 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}. * @property {ExpectationResult[]} failedExpectations - The list of expectations that failed in an {@link afterAll} for this suite. * @property {ExpectationResult[]} deprecationWarnings - The list of deprecation warnings that occurred on this suite. * @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite. diff --git a/src/core/Spec.js b/src/core/Spec.js index d6c54df0..c6101734 100644 --- a/src/core/Spec.js +++ b/src/core/Spec.js @@ -147,10 +147,12 @@ 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 - The name of the file the spec was defined in. + * @property {String} filename - Deprecated. 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. + * 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}. * @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. diff --git a/src/core/Suite.js b/src/core/Suite.js index 47e9f655..81235bd3 100644 --- a/src/core/Suite.js +++ b/src/core/Suite.js @@ -104,10 +104,12 @@ getJasmineRequireObj().Suite = function(j$) { * @property {String} description - The description text passed to the {@link describe} that made this suite. * @property {String} fullName - The full description including all ancestors of this suite. * @property {String|null} parentSuiteId - The ID of the suite containing this suite, or null if this is not in another describe(). - * @property {String} filename - The name of the file the suite was defined in. + * @property {String} filename - Deprecated. The name of the file the suite was defined in. * Note: The value may be incorrect if zone.js is installed or * `describe`/`fdescribe`/`xdescribe` have been replaced with versions that - * don't maintain the same call stack height as the originals. + * 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}. * @property {ExpectationResult[]} failedExpectations - The list of expectations that failed in an {@link afterAll} for this suite. * @property {ExpectationResult[]} deprecationWarnings - The list of deprecation warnings that occurred on this suite. * @property {String} status - Once the suite has completed, this string represents the pass/fail status of this suite.