diff --git a/src/linter/LinterContext.ts b/src/linter/LinterContext.ts index 6baf1df9..9378f5a4 100644 --- a/src/linter/LinterContext.ts +++ b/src/linter/LinterContext.ts @@ -95,6 +95,7 @@ export interface PositionRange { export interface LintMetadata { // The metadata holds information to be shared across linters directives: Set; + transformedImports: Map>; } export default class LinterContext { diff --git a/src/linter/html/transpiler.ts b/src/linter/html/transpiler.ts index 9aebfd09..3a22fa52 100644 --- a/src/linter/html/transpiler.ts +++ b/src/linter/html/transpiler.ts @@ -21,6 +21,8 @@ export default async function transpileHtml( lintBootstrapAttributes(bootstrapTag, report); } + detectTestStarter(resourcePath, scriptTags, context); + scriptTags.forEach((tag) => { // Tags with src attribute do not parse and run inline code const hasSrc = tag.attributes.some((attr) => { @@ -52,6 +54,23 @@ export default async function transpileHtml( } } +function detectTestStarter(resourcePath: ResourcePath, scriptTags: Tag[], context: LinterContext) { + const shouldBeMigrated = scriptTags.some((tag) => { + return (resourcePath.includes("testsuite.qunit.html") && !tag.attributes.some((attr) => { + return attr.name.value.toLowerCase() === "src" && + attr.value.value.includes("resources/sap/ui/test/starter/createSuite.js"); + })) || + (resourcePath.includes("qunit.html") && !tag.attributes.some((attr) => { + return attr.name.value.toLowerCase() === "src" && + attr.value.value.includes("resources/sap/ui/test/starter/runTest.js"); + })); + }); + + if (shouldBeMigrated) { + context.addLintingMessage(resourcePath, MESSAGE.PREFER_TEST_STARTER, undefined as never); + } +} + function findBootstrapTag(tags: Tag[]): Tag | undefined { // First search for script tag with id "sap-ui-bootstrap" for (const tag of tags) { diff --git a/src/linter/messages.ts b/src/linter/messages.ts index 0e57d228..16957b7c 100644 --- a/src/linter/messages.ts +++ b/src/linter/messages.ts @@ -12,6 +12,7 @@ const RULES = { "no-pseudo-modules": "no-pseudo-modules", "parsing-error": "parsing-error", "ui5-class-declaration": "ui5-class-declaration", + "prefer-test-starter": "prefer-test-starter", } as const; export enum LintMessageSeverity { @@ -63,6 +64,7 @@ export enum MESSAGE { PARTIALLY_DEPRECATED_ODATA_MODEL_V2_CREATE_ENTRY, PARTIALLY_DEPRECATED_ODATA_MODEL_V2_CREATE_ENTRY_PROPERTIES_ARRAY, PARTIALLY_DEPRECATED_PARAMETERS_GET, + PREFER_TEST_STARTER, REDUNDANT_BOOTSTRAP_PARAM, REDUNDANT_BOOTSTRAP_PARAM_ERROR, REDUNDANT_VIEW_CONFIG_PROPERTY, @@ -550,6 +552,15 @@ export const MESSAGE_INFO = { }, }, + [MESSAGE.PREFER_TEST_STARTER]: { + severity: LintMessageSeverity.Warning, + ruleId: RULES["prefer-test-starter"], + + message: () => "To save boilerplate code and ensure compliance with UI5 2.x best practices," + + " please migrate to the Test Starter concept", + details: () => "{@link topic:032be2cb2e1d4115af20862673bedcdb Test Starter}", + }, + [MESSAGE.REPLACED_BOOTSTRAP_PARAM]: { severity: LintMessageSeverity.Error, ruleId: RULES["no-deprecated-api"], diff --git a/src/linter/ui5Types/SourceFileLinter.ts b/src/linter/ui5Types/SourceFileLinter.ts index 8f362c17..ded9e7c4 100644 --- a/src/linter/ui5Types/SourceFileLinter.ts +++ b/src/linter/ui5Types/SourceFileLinter.ts @@ -88,6 +88,12 @@ export default class SourceFileLinter { findDirectives(this.sourceFile, metadata); } this.visitNode(this.sourceFile); + + if (this.sourceFile.fileName.includes(".qunit.js") && + !metadata?.transformedImports?.get("sap.ui.define")?.size) { + this.#reporter.addMessage(MESSAGE.PREFER_TEST_STARTER, this.sourceFile); + } + this.#reporter.deduplicateMessages(); } catch (err) { const message = err instanceof Error ? err.message : String(err); @@ -642,6 +648,13 @@ export default class SourceFileLinter { } analyzeNewExpression(node: ts.NewExpression) { + if (this.sourceFile.fileName.includes(".qunit.js") && + ((ts.isPropertyAccessExpression(node.expression) && node.expression.name.getText() === "jsUnitTestSuite") || + (ts.isIdentifier(node.expression) && node.expression.getText() === "jsUnitTestSuite") + )) { + this.#reporter.addMessage(MESSAGE.PREFER_TEST_STARTER, node); + } + const nodeType = this.checker.getTypeAtLocation(node); // checker.getContextualType(node); if (!nodeType.symbol || !this.isSymbolOfUi5OrThirdPartyType(nodeType.symbol)) { return; @@ -790,6 +803,9 @@ export default class SourceFileLinter { this.#analyzeMobileInit(node); } else if (symbolName === "setTheme" && moduleName === "sap/ui/core/Theming") { this.#analyzeThemingSetTheme(node); + } else if (this.sourceFile.fileName.includes(".qunit.js") && + symbolName === "ready" && moduleName === "sap/ui/core/Core") { + this.#reporter.addMessage(MESSAGE.PREFER_TEST_STARTER, node); } } @@ -826,11 +842,17 @@ export default class SourceFileLinter { } } + const propName = getPropertyName(reportNode); + this.#reporter.addMessage(MESSAGE.DEPRECATED_FUNCTION_CALL, { - functionName: getPropertyName(reportNode), + functionName: propName, additionalMessage, details: deprecationInfo.messageDetails, }, reportNode); + + if (propName === "attachInit" && this.sourceFile.fileName.includes(".qunit.js")) { + this.#reporter.addMessage(MESSAGE.PREFER_TEST_STARTER, reportNode); + } } getSymbolModuleDeclaration(symbol: ts.Symbol) { diff --git a/src/linter/ui5Types/amdTranspiler/tsTransformer.ts b/src/linter/ui5Types/amdTranspiler/tsTransformer.ts index 6473d1bc..5ee248b8 100644 --- a/src/linter/ui5Types/amdTranspiler/tsTransformer.ts +++ b/src/linter/ui5Types/amdTranspiler/tsTransformer.ts @@ -9,7 +9,7 @@ import replaceNodeInParent, {NodeReplacement} from "./replaceNodeInParent.js"; import {toPosStr, UnsupportedModuleError} from "./util.js"; import rewriteExtendCall, {UnsupportedExtendCall} from "./rewriteExtendCall.js"; import insertNodesInParent from "./insertNodesInParent.js"; -import LinterContext from "../../LinterContext.js"; +import LinterContext, {LintMetadata} from "../../LinterContext.js"; import {findDirectives} from "../directives.js"; const log = getLogger("linter:ui5Types:amdTranspiler:TsTransformer"); @@ -113,6 +113,8 @@ function transform( const moduleDeclaration = parseModuleDeclaration(node.arguments, checker); const moduleDefinition = moduleDeclarationToDefinition(moduleDeclaration, sourceFile, nodeFactory); moduleDefinitions.push(moduleDefinition); + moduleDefinition.imports.forEach((importStatement) => + addModuleMetadata(metadata, "sap.ui.define", importStatement)); pruneNode(node); // Mark the define call for removal } catch (err) { if (err instanceof UnsupportedModuleError) { @@ -127,6 +129,8 @@ function transform( if (requireExpression.async) { const res = transformAsyncRequireCall(node, requireExpression, nodeFactory); requireImports.push(...res.imports); + res.imports.forEach((importStatement) => + addModuleMetadata(metadata, "sap.ui.require", importStatement)); if (res.callback) { replaceNode(node, res.callback); if (res.errback) { @@ -149,6 +153,7 @@ function transform( } else { const res = transformSyncRequireCall(node, requireExpression, nodeFactory); requireImports.push(res.import); + addModuleMetadata(metadata, "sap.ui.require", res.import); replaceNode(node, res.requireStatement); } } catch (err) { @@ -273,6 +278,17 @@ function transform( } }); + function addModuleMetadata(metadata: LintMetadata, importType: string, importStatement: ts.ImportDeclaration) { + if (!metadata.transformedImports) { + metadata.transformedImports = new Map>(); + } + const curResource = metadata.transformedImports.get(importType) ?? new Set(); + if (ts.isStringLiteral(importStatement.moduleSpecifier)) { + curResource.add(importStatement.moduleSpecifier.text); + } + metadata.transformedImports.set(importType, curResource); + } + function getCommentsFromNode(node: ts.Node, sourceFile?: ts.SourceFile): NodeComments { const sourceText = sourceFile?.getFullText() ?? fullSourceText; const leadingComments = ts.getLeadingCommentRanges(sourceText, node.getFullStart()) ?? []; diff --git a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md index 3382b06a..59d2c53e 100644 --- a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md +++ b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md @@ -567,8 +567,17 @@ Generated by [AVA](https://avajs.dev). errorCount: 0, fatalErrorCount: 0, filePath: 'Configuration.beforeBootstrap.qunit.js', - messages: [], - warningCount: 0, + messages: [ + { + column: 1, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 1, }, ] @@ -2947,8 +2956,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-theme', severity: 2, }, + { + column: 9, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 1, }, ] @@ -3027,8 +3044,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-theme', severity: 2, }, + { + column: 9, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 1, }, ] diff --git a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap index f6e1bff0..4e5470a9 100644 Binary files a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap and b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap differ diff --git a/test/lib/linter/snapshots/linter.ts.md b/test/lib/linter/snapshots/linter.ts.md index be6d1823..cbf1287f 100644 --- a/test/lib/linter/snapshots/linter.ts.md +++ b/test/lib/linter/snapshots/linter.ts.md @@ -800,8 +800,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 1, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 3, + warningCount: 4, }, { coverageInfo: [], @@ -817,6 +825,14 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -833,8 +849,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [ @@ -901,6 +925,14 @@ Generated by [AVA](https://avajs.dev). fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.html', messages: [ + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 3, line: 12, @@ -910,7 +942,7 @@ Generated by [AVA](https://avajs.dev). severity: 1, }, ], - warningCount: 1, + warningCount: 2, }, { coverageInfo: [ @@ -930,8 +962,25 @@ Generated by [AVA](https://avajs.dev). errorCount: 0, fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.js', - messages: [], - warningCount: 0, + messages: [ + { + column: 14, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, + { + column: 1, + line: 2, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 2, }, { coverageInfo: [], @@ -969,8 +1018,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 2, + warningCount: 3, }, { coverageInfo: [], @@ -986,6 +1043,14 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 6, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 6, @@ -1002,8 +1067,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 9, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -1371,8 +1444,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 1, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 3, + warningCount: 4, }, { coverageInfo: [], @@ -1387,6 +1467,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -1401,8 +1488,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -1410,6 +1504,13 @@ Generated by [AVA](https://avajs.dev). fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.html', messages: [ + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 3, line: 12, @@ -1418,7 +1519,30 @@ Generated by [AVA](https://avajs.dev). severity: 1, }, ], - warningCount: 1, + warningCount: 2, + }, + { + coverageInfo: [], + errorCount: 0, + fatalErrorCount: 0, + filePath: 'webapp/test/testsuite.qunit.js', + messages: [ + { + column: 14, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + { + column: 1, + line: 2, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 2, }, { coverageInfo: [], @@ -1447,8 +1571,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 2, + warningCount: 3, }, { coverageInfo: [], @@ -1463,6 +1594,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 6, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 6, @@ -1477,8 +1615,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 9, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -2915,6 +3060,14 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -2931,8 +3084,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], diff --git a/test/lib/linter/snapshots/linter.ts.snap b/test/lib/linter/snapshots/linter.ts.snap index 31aaa97b..2c2dff79 100644 Binary files a/test/lib/linter/snapshots/linter.ts.snap and b/test/lib/linter/snapshots/linter.ts.snap differ diff --git a/test/lib/snapshots/index.ts.md b/test/lib/snapshots/index.ts.md index ce0fa431..49fa0e56 100644 --- a/test/lib/snapshots/index.ts.md +++ b/test/lib/snapshots/index.ts.md @@ -265,8 +265,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 1, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 3, + warningCount: 4, }, { coverageInfo: [], @@ -281,6 +288,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -295,8 +309,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -304,6 +325,13 @@ Generated by [AVA](https://avajs.dev). fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.html', messages: [ + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 3, line: 12, @@ -312,7 +340,30 @@ Generated by [AVA](https://avajs.dev). severity: 1, }, ], - warningCount: 1, + warningCount: 2, + }, + { + coverageInfo: [], + errorCount: 0, + fatalErrorCount: 0, + filePath: 'webapp/test/testsuite.qunit.js', + messages: [ + { + column: 14, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + { + column: 1, + line: 2, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 2, }, { coverageInfo: [], @@ -341,8 +392,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 2, + warningCount: 3, }, { coverageInfo: [], @@ -357,6 +415,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 6, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 6, @@ -371,8 +436,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 9, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -676,8 +748,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 1, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 3, + warningCount: 4, }, { coverageInfo: [], @@ -692,6 +771,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -706,8 +792,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -715,6 +808,13 @@ Generated by [AVA](https://avajs.dev). fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.html', messages: [ + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 3, line: 12, @@ -723,7 +823,30 @@ Generated by [AVA](https://avajs.dev). severity: 1, }, ], - warningCount: 1, + warningCount: 2, + }, + { + coverageInfo: [], + errorCount: 0, + fatalErrorCount: 0, + filePath: 'webapp/test/testsuite.qunit.js', + messages: [ + { + column: 14, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + { + column: 1, + line: 2, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 2, }, { coverageInfo: [], @@ -752,8 +875,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 2, + warningCount: 3, }, { coverageInfo: [], @@ -768,6 +898,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 6, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 6, @@ -782,8 +919,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 9, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -1161,8 +1305,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 1, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 3, + warningCount: 4, }, { coverageInfo: [], @@ -1178,6 +1330,14 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -1195,8 +1355,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [ @@ -1263,6 +1431,14 @@ Generated by [AVA](https://avajs.dev). fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.html', messages: [ + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 3, line: 12, @@ -1272,7 +1448,7 @@ Generated by [AVA](https://avajs.dev). severity: 1, }, ], - warningCount: 1, + warningCount: 2, }, { coverageInfo: [ @@ -1292,8 +1468,25 @@ Generated by [AVA](https://avajs.dev). errorCount: 0, fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.js', - messages: [], - warningCount: 0, + messages: [ + { + column: 14, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, + { + column: 1, + line: 2, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 2, }, { coverageInfo: [], @@ -1331,8 +1524,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 2, + warningCount: 3, }, { coverageInfo: [], @@ -1348,6 +1549,14 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 6, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 6, @@ -1365,8 +1574,16 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 9, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + messageDetails: 'Test Starter (https://ui5.sap.com/#/topic/032be2cb2e1d4115af20862673bedcdb)', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -1699,8 +1916,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 1, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 3, + warningCount: 4, }, { coverageInfo: [], @@ -1715,6 +1939,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -1729,8 +1960,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -1738,6 +1976,13 @@ Generated by [AVA](https://avajs.dev). fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.html', messages: [ + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 3, line: 12, @@ -1746,7 +1991,30 @@ Generated by [AVA](https://avajs.dev). severity: 1, }, ], - warningCount: 1, + warningCount: 2, + }, + { + coverageInfo: [], + errorCount: 0, + fatalErrorCount: 0, + filePath: 'webapp/test/testsuite.qunit.js', + messages: [ + { + column: 14, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + { + column: 1, + line: 2, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 2, }, { coverageInfo: [], @@ -1775,8 +2043,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 2, + warningCount: 3, }, { coverageInfo: [], @@ -1791,6 +2066,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 6, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 6, @@ -1805,8 +2087,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 9, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -2110,8 +2399,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 1, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 3, + warningCount: 4, }, { coverageInfo: [], @@ -2126,6 +2422,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -2140,8 +2443,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -2149,6 +2459,13 @@ Generated by [AVA](https://avajs.dev). fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.html', messages: [ + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 3, line: 12, @@ -2157,7 +2474,30 @@ Generated by [AVA](https://avajs.dev). severity: 1, }, ], - warningCount: 1, + warningCount: 2, + }, + { + coverageInfo: [], + errorCount: 0, + fatalErrorCount: 0, + filePath: 'webapp/test/testsuite.qunit.js', + messages: [ + { + column: 14, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + { + column: 1, + line: 2, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 2, }, { coverageInfo: [], @@ -2186,8 +2526,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 2, + warningCount: 3, }, { coverageInfo: [], @@ -2202,6 +2549,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 6, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 6, @@ -2216,8 +2570,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 9, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -2521,8 +2882,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 1, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 3, + warningCount: 4, }, { coverageInfo: [], @@ -2537,6 +2905,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 4, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 4, @@ -2551,8 +2926,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 7, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], @@ -2560,6 +2942,13 @@ Generated by [AVA](https://avajs.dev). fatalErrorCount: 0, filePath: 'webapp/test/testsuite.qunit.html', messages: [ + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 3, line: 12, @@ -2568,7 +2957,30 @@ Generated by [AVA](https://avajs.dev). severity: 1, }, ], - warningCount: 1, + warningCount: 2, + }, + { + coverageInfo: [], + errorCount: 0, + fatalErrorCount: 0, + filePath: 'webapp/test/testsuite.qunit.js', + messages: [ + { + column: 14, + line: 3, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + { + column: 1, + line: 2, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, + ], + warningCount: 2, }, { coverageInfo: [], @@ -2597,8 +3009,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: undefined, + line: undefined, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 2, + warningCount: 3, }, { coverageInfo: [], @@ -2613,6 +3032,13 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-deprecated-api', severity: 2, }, + { + column: 18, + line: 6, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, { column: 8, line: 6, @@ -2627,8 +3053,15 @@ Generated by [AVA](https://avajs.dev). ruleId: 'no-globals', severity: 2, }, + { + column: 18, + line: 9, + message: 'To save boilerplate code and ensure compliance with UI5 2.x best practices, please migrate to the Test Starter concept', + ruleId: 'prefer-test-starter', + severity: 1, + }, ], - warningCount: 0, + warningCount: 2, }, { coverageInfo: [], diff --git a/test/lib/snapshots/index.ts.snap b/test/lib/snapshots/index.ts.snap index 4d36498f..8878e232 100644 Binary files a/test/lib/snapshots/index.ts.snap and b/test/lib/snapshots/index.ts.snap differ