generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Test Starter Configs): Fix false-positive findings (#409)
This fixes a false-positive finding of the property `theme` inside [Configuration.beforeBootstrap.qunit.js](https://github.com/SAP/openui5/blob/master/src/sap.ui.core/test/sap/ui/core/qunit/bootstrap/Configuration.beforeBootstrap.qunit.js). This resulted in undefined runtime errors. `theme` should only be checked for Test Starter configs. Changes: * Now, the **file name** is checked against a Regex and optional chaining was optimized to prevent these runtime errors further. * A sample `Configuration.beforeBootstrap.qunit.js` was added as a test artifact. As seen in the snapshots, there are no more findings for this file. * In the course of adding a Regex check for the file name, `testsuite2.qunit.js` was renamed to `testsuite.special-case-quotes.qunit.js` to be aligned with framework functionality.
- Loading branch information
1 parent
ddc6fb1
commit cf166f7
Showing
5 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/fixtures/linter/rules/NoDeprecatedApi/Configuration.beforeBootstrap.qunit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// This file was a False Positive for the new Test Starter detections. | ||
|
||
window["sap-ui-config"] = { | ||
theme: "SapSampleTheme2", // This should not get detected by the Test Starter detections | ||
language: "en", | ||
calendarType: "islamic", | ||
logLevel: "WARNING", | ||
noConflict: "true", | ||
libs: "sap.ui.core" | ||
}; |
2 changes: 1 addition & 1 deletion
2
...rules/NoDeprecatedApi/testsuite2.qunit.js → ...pi/testsuite.special-case-quotes.qunit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.