-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51dd814
commit ed3348b
Showing
5 changed files
with
49 additions
and
6 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
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
24 changes: 24 additions & 0 deletions
24
tests/e2e/compare/output/spec/__snapshots__/markdown.spec.ts.snap
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,24 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`markdown formatter should format significant changes properly 1`] = ` | ||
"## Performance Comparison Report 📊 | ||
### Significant Changes To Duration | ||
| Name | Duration | | ||
| -------------- | --------------------------------------------------- | | ||
| commentLinking | 131.681 ms → 421.806 ms (+290.125 ms, +220.3%) 🔴🔴 | | ||
<details> | ||
<summary>Show details</summary> | ||
| Name | Duration | | ||
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| commentLinking | **Baseline**<br/>Mean: 131.681 ms<br/>Stdev: 19.883 ms (15.1%)<br/>Runs: 100.5145680010319 112.0048420019448 121.8861090019345 124.26110899820924 135.1571460030973 140.33837900310755 158.5825610011816 160.7034499980509<br/><br/>**Current**<br/>Mean: 421.806 ms<br/>Stdev: 30.185 ms (7.2%)<br/>Runs: 361.5145680010319 402.8861090019345 412.0048420019448 414.26110899820924 425.1571460030973 440.33837900310755 458.7034499980509 459.5825610011816 | | ||
</details> | ||
### Meaningless Changes To Duration | ||
_There are no entries_ | ||
" | ||
`; |
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,18 @@ | ||
import {compareResults} from '../../compare'; | ||
import {buildMarkdown} from '../markdown'; | ||
|
||
const results = { | ||
main: { | ||
commentLinking: [100.5145680010319, 121.8861090019345, 112.0048420019448, 124.26110899820924, 135.1571460030973, 140.33837900310755, 160.7034499980509, 158.5825610011816], | ||
}, | ||
delta: { | ||
commentLinking: [361.5145680010319, 402.8861090019345, 412.0048420019448, 414.26110899820924, 425.1571460030973, 440.33837900310755, 458.7034499980509, 459.5825610011816], | ||
}, | ||
}; | ||
|
||
describe('markdown formatter', () => { | ||
it('should format significant changes properly', () => { | ||
const data = compareResults(results.main, results.delta, {commentLinking: 'ms'}); | ||
expect(buildMarkdown(data)).toMatchSnapshot(); | ||
}); | ||
}); |