Skip to content

Commit

Permalink
test: Checks for inheritance in ES6 components
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed May 7, 2024
1 parent ccbee8b commit d60a47e
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sap.ui.define(["sap/fe/core/AppComponent"], function (AppComponent) {
"use strict";

return AppComponent.extend("mycomp.Component", {
metadata: {
manifest: "json",
},
});
});
45 changes: 45 additions & 0 deletions test/fixtures/linter/rules/BestPractices/Negative_7/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"_version": "1.12.0",

"sap.app": {
"id": "mycomp",
"type": "application",
"i18n": "i18n/i18n.properties",
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"applicationVersion": {
"version": "1.0.0"
}
},

"sap.ui5": {
"rootView": {
"viewName": "mycomp.view.App",
"type": "XML",
"id": "app"
},

"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "mycomp.view",
"controlId": "app",
"controlAggregation": "pages"
},
"routes": [
{
"pattern": "",
"name": "main",
"target": "main"
}
],
"targets": {
"main": {
"viewId": "main",
"viewName": "Main"
}
}
}
}
}
15 changes: 15 additions & 0 deletions test/lib/linter/rules/snapshots/BestPractices.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@ Generated by [AVA](https://avajs.dev).
},
]

## General: Negative_7/Component.js

> Snapshot 1
[
{
coverageInfo: [],
errorCount: 0,
fatalErrorCount: 0,
filePath: 'Negative_7/Component.js',
messages: [],
warningCount: 0,
},
]

## General: Positive_1/Component.js

> Snapshot 1
Expand Down
Binary file modified test/lib/linter/rules/snapshots/BestPractices.ts.snap
Binary file not shown.

0 comments on commit d60a47e

Please sign in to comment.