-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(utils): use file snapshots for Markdown and stdout text
- Loading branch information
1 parent
7ef44c7
commit da9f620
Showing
13 changed files
with
1,135 additions
and
1,148 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Add files here to ignore them from prettier formatting | ||
/dist | ||
/coverage | ||
/.nx/cache | ||
/.nx/cache | ||
__snapshots__ |
859 changes: 0 additions & 859 deletions
859
packages/utils/src/lib/reports/__snapshots__/generate-md-report.integration.test.ts.snap
This file was deleted.
Oops, something went wrong.
105 changes: 0 additions & 105 deletions
105
...ges/utils/src/lib/reports/__snapshots__/generate-md-reports-diff.integration.test.ts.snap
This file was deleted.
Oops, something went wrong.
167 changes: 0 additions & 167 deletions
167
...ages/utils/src/lib/reports/__snapshots__/generate-stdout-summary.integration.test.ts.snap
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
packages/utils/src/lib/reports/__snapshots__/report-diff-improved.md
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,48 @@ | ||
# Code PushUp | ||
|
||
🙌 Code PushUp report has **improved** – compared target commit `0123456` with source commit `abcdef0`. | ||
|
||
## 🏷️ Categories | ||
|
||
|🏷️ Category|⭐ Current score|⭐ Previous score|🗠 Score change| | ||
|:--|:--:|:--:|:--:| | ||
|Performance|🟢 **94**|🟢 92|<span style="color: green">▲ **+2**</span>| | ||
|Bug prevention|🟢 **95**|🟡 68|<span style="color: green">▲ **+27**</span>| | ||
|Code style|🟢 **100**|🟡 54|<span style="color: green">▲ **+46**</span>| | ||
|
||
## 🎗️ Groups | ||
|
||
<details> | ||
<summary>👍 <strong>2</strong> groups improved</summary> | ||
|
||
|🔌 Plugin|🎗️ Group|⭐ Current score|⭐ Previous score|🗠 Score change| | ||
|:--|:--|:--:|:--:|:--:| | ||
|ESLint|Maximum lines limitation|🟢 **100**|🟡 50|<span style="color: green">▲ **+50**</span>| | ||
|Lighthouse|Performance|🟢 **94**|🟢 92|<span style="color: green">▲ **+2**</span>| | ||
|
||
</details> | ||
|
||
|
||
## 🛡️ Audits | ||
|
||
<details> | ||
<summary>👍 <strong>12</strong> audits improved</summary> | ||
|
||
|🔌 Plugin|🛡️ Audit|📏 Current value|📏 Previous value|🗠 Value change| | ||
|:--|:--|:--:|:--:|:--:| | ||
|ESLint|Disallow unused variables|🟩 **passed**|🟥 1 warning|<span style="color: green">▼ **-100%**</span>| | ||
|ESLint|Require braces around arrow function bodies|🟩 **passed**|🟥 1 warning|<span style="color: green">▼ **-100%**</span>| | ||
|ESLint|Require the use of `===` and `!==`|🟩 **passed**|🟥 1 warning|<span style="color: green">▼ **-100%**</span>| | ||
|ESLint|Enforce a maximum number of lines of code in a function|🟩 **passed**|🟥 1 warning|<span style="color: green">▼ **-100%**</span>| | ||
|ESLint|Disallow variable declarations from shadowing variables declared in the outer scope|🟩 **passed**|🟥 3 warnings|<span style="color: green">▼ **-100%**</span>| | ||
|ESLint|Require or disallow method and property shorthand syntax for object literals|🟩 **passed**|🟥 3 warnings|<span style="color: green">▼ **-100%**</span>| | ||
|ESLint|Require `const` declarations for variables that are never reassigned after declared|🟩 **passed**|🟥 1 warning|<span style="color: green">▼ **-100%**</span>| | ||
|ESLint|Disallow missing `key` props in iterators/collection literals|🟩 **passed**|🟥 1 warning|<span style="color: green">▼ **-100%**</span>| | ||
|ESLint|verifies the list of dependencies for Hooks like useEffect and similar|🟩 **passed**|🟥 2 warnings|<span style="color: green">▼ **-100%**</span>| | ||
|Lighthouse|First Contentful Paint|🟨 **1.1 s**|🟨 1.2 s|<span style="color: green">▼ **-4%**</span>| | ||
|Lighthouse|Largest Contentful Paint|🟨 **1.4 s**|🟨 1.5 s|<span style="color: green">▼ **-8%**</span>| | ||
|Lighthouse|Speed Index|🟩 **1.1 s**|🟩 1.2 s|<span style="color: green">▼ **-4%**</span>| | ||
|
||
40 other audits are unchanged. | ||
|
||
</details> |
48 changes: 48 additions & 0 deletions
48
packages/utils/src/lib/reports/__snapshots__/report-diff-mixed.md
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,48 @@ | ||
# Code PushUp | ||
|
||
😐 Code PushUp report has both **improved and regressed** – compared target commit `0123456` with source commit `abcdef0`. | ||
|
||
## 🏷️ Categories | ||
|
||
|🏷️ Category|⭐ Current score|⭐ Previous score|🗠 Score change| | ||
|:--|:--:|:--:|:--:| | ||
|Performance|🟢 **94**|🟢 92|<span style="color: green">▲ **+2**</span>| | ||
|Bug prevention|🟡 **63**|🟡 68|<span style="color: red">▼ **-5**</span>| | ||
|
||
<details> | ||
<summary>1 other category is unchanged.</summary> | ||
|
||
- Code style: 🟡 **54** | ||
|
||
</details> | ||
|
||
|
||
## 🎗️ Groups | ||
|
||
<details> | ||
<summary>👍 <strong>1</strong> group improved</summary> | ||
|
||
|🔌 Plugin|🎗️ Group|⭐ Current score|⭐ Previous score|🗠 Score change| | ||
|:--|:--|:--:|:--:|:--:| | ||
|Lighthouse|Performance|🟢 **94**|🟢 92|<span style="color: green">▲ **+2**</span>| | ||
|
||
1 other group is unchanged. | ||
|
||
</details> | ||
|
||
|
||
## 🛡️ Audits | ||
|
||
<details> | ||
<summary>👍 <strong>3</strong> audits improved, 👎 <strong>1</strong> audit regressed</summary> | ||
|
||
|🔌 Plugin|🛡️ Audit|📏 Current value|📏 Previous value|🗠 Value change| | ||
|:--|:--|:--:|:--:|:--:| | ||
|ESLint|Disallow unused variables|🟥 **1 error**|🟩 passed|<span style="color: red">▲ **+∞%**</span>| | ||
|Lighthouse|First Contentful Paint|🟨 **1.1 s**|🟨 1.2 s|<span style="color: green">▼ **-4%**</span>| | ||
|Lighthouse|Largest Contentful Paint|🟨 **1.4 s**|🟨 1.5 s|<span style="color: green">▼ **-8%**</span>| | ||
|Lighthouse|Speed Index|🟩 **1.1 s**|🟩 1.2 s|<span style="color: green">▼ **-4%**</span>| | ||
|
||
48 other audits are unchanged. | ||
|
||
</details> |
Oops, something went wrong.