diff --git a/test/fixtures/linter/general/RecursiveDefineProperty.js b/test/fixtures/linter/general/RecursiveDefineProperty.js new file mode 100644 index 00000000..40d46f10 --- /dev/null +++ b/test/fixtures/linter/general/RecursiveDefineProperty.js @@ -0,0 +1,4 @@ +// See https://github.com/SAP/ui5-linter/issues/75 +Object.defineProperty(globalThis, "myProp", { + value: true || window.foo +}); diff --git a/test/lib/linter/snapshots/linter.ts.md b/test/lib/linter/snapshots/linter.ts.md index d333f62e..da0201c9 100644 --- a/test/lib/linter/snapshots/linter.ts.md +++ b/test/lib/linter/snapshots/linter.ts.md @@ -203,6 +203,28 @@ Generated by [AVA](https://avajs.dev). }, ] +## General: RecursiveDefineProperty.js + +> Snapshot 1 + + [ + { + coverageInfo: [], + errorCount: 1, + fatalErrorCount: 1, + filePath: 'RecursiveDefineProperty.js', + messages: [ + { + fatal: true, + message: 'Maximum call stack size exceeded', + ruleId: 'ui5-linter-parsing-error', + severity: 2, + }, + ], + warningCount: 0, + }, + ] + ## General: TSLike.js > Snapshot 1 diff --git a/test/lib/linter/snapshots/linter.ts.snap b/test/lib/linter/snapshots/linter.ts.snap index 8341c582..fe34b544 100644 Binary files a/test/lib/linter/snapshots/linter.ts.snap and b/test/lib/linter/snapshots/linter.ts.snap differ