Skip to content

Commit

Permalink
Fix flaky test causing spurious drops in code coverage (#1632)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Resolves #1489

## Short description of the changes
- To remove the non determinism in the code 

---------

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
  • Loading branch information
GLVSKiriti and yurishkuro authored Aug 1, 2023
1 parent 5489990 commit f559122
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ describe('<SpanBarRow>', () => {
serviceName: 'rpc-service-name',
},
showErrorIcon: false,
getViewedBounds: () => ({ start: 0, end: 1 }),
getViewedBounds: jest
.fn()
.mockReturnValueOnce({ start: 0.5, end: 0.6 })
.mockReturnValue({ start: 0, end: 1 }),
span: {
duration: 'test-duration',
hasChildren: true,
Expand Down

0 comments on commit f559122

Please sign in to comment.