Skip to content

flakyなtestの対処 #458

@hrk091

Description

@hrk091

https://github.com/cloudnativedaysjp/dreamkast-ui/actions/runs/5701667795/job/15452585580?pr=455

testが、runnerのCPU負荷次第でtiming issueでこけてしまうので、こけないように修正する

FAIL src/components/hooks/__tests__/useRunAfter.spec.tsx
  ● useRunAfter › should run callback after specified delay and skip calls in the middle

    expect(received).toBeLessThan(expected)

    Expected: < 5
    Received:   5

      25 |     expect(trials).toBeGreaterThan(8)
      26 |     expect(fn.mock.calls.length).toBeGreaterThan(1)
    > 27 |     expect(fn.mock.calls.length).toBeLessThan(5)
         |                                  ^
      28 |   })
      29 | })
      30 |

      at Object.toBeLessThan (src/components/hooks/__tests__/useRunAfter.spec.tsx:27:34)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions