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.
refactor: Restructure rules tests to use a common execution
- Loading branch information
Showing
7 changed files
with
62 additions
and
21 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
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,5 @@ | ||
import {fileURLToPath} from "node:url"; | ||
import {runLintRulesTests} from "../_linterHelper.js"; | ||
|
||
const filePath = fileURLToPath(import.meta.url); | ||
runLintRulesTests(filePath); |
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import path from "node:path"; | ||
import {fileURLToPath} from "node:url"; | ||
import {createTestsForFixtures} from "../_linterHelper.js"; | ||
import {runLintRulesTests} from "../_linterHelper.js"; | ||
|
||
const filePath = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(filePath); | ||
const fileName = path.basename(filePath, ".ts"); | ||
const fixturesPath = path.join(__dirname, "..", "..", "..", "fixtures", "linter", "rules", fileName); | ||
|
||
createTestsForFixtures(fixturesPath); | ||
runLintRulesTests(filePath); |
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import path from "node:path"; | ||
import {fileURLToPath} from "node:url"; | ||
import {createTestsForFixtures} from "../_linterHelper.js"; | ||
import {runLintRulesTests} from "../_linterHelper.js"; | ||
|
||
const filePath = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(filePath); | ||
const fileName = path.basename(filePath, ".ts"); | ||
const fixturesPath = path.join(__dirname, "..", "..", "..", "fixtures", "linter", "rules", fileName); | ||
|
||
createTestsForFixtures(fixturesPath); | ||
runLintRulesTests(filePath); |
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import path from "node:path"; | ||
import {fileURLToPath} from "node:url"; | ||
import {createTestsForFixtures} from "../_linterHelper.js"; | ||
import {runLintRulesTests} from "../_linterHelper.js"; | ||
|
||
const filePath = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(filePath); | ||
const fileName = path.basename(filePath, ".ts"); | ||
const fixturesPath = path.join(__dirname, "..", "..", "..", "fixtures", "linter", "rules", fileName); | ||
|
||
createTestsForFixtures(fixturesPath); | ||
runLintRulesTests(filePath); |
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,42 @@ | ||
# Snapshot report for `test/lib/linter/rules/BestPractices.ts` | ||
|
||
The actual snapshot is saved in `BestPractices.ts.snap`. | ||
|
||
Generated by [AVA](https://avajs.dev). | ||
|
||
## General: Component.js | ||
|
||
> Snapshot 1 | ||
[ | ||
{ | ||
coverageInfo: [], | ||
errorCount: 0, | ||
fatalErrorCount: 0, | ||
filePath: 'Component.js', | ||
messages: [], | ||
warningCount: 0, | ||
}, | ||
] | ||
|
||
## General: manifest.json | ||
|
||
> Snapshot 1 | ||
[ | ||
{ | ||
coverageInfo: [], | ||
errorCount: 1, | ||
fatalErrorCount: 1, | ||
filePath: 'manifest.json', | ||
messages: [ | ||
{ | ||
fatal: true, | ||
message: 'Unexpected end of JSON input', | ||
ruleId: 'ui5-linter-parsing-error', | ||
severity: 2, | ||
}, | ||
], | ||
warningCount: 0, | ||
}, | ||
] |
Binary file not shown.