Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix failing tests #165

Merged
merged 3 commits into from
Jul 4, 2023
Merged

fix: fix failing tests #165

merged 3 commits into from
Jul 4, 2023

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jul 3, 2023

🧿 Current issues / What's wrong ?

Tests for proposalFactory were failing, due to dependencies to redis. The tested function by themselves does not depend on redis, and thus are failing for unrelated reasons (connection to redis from bull)

💊 Fixes / Solution

Extract the tested function in another utils.ts file

🚧 Changes

  • Extract the newProposalDelay() into its own helper file, isolating it from any side effects from the queue system
  • Ignore dist folder from test path

🛠️ Tests

  • Run yarn test
  • The test should not fail anymore on the CI (was working fine on local)

Failing tests for queue system are due to the way Bull is connecting to redis on CI. Will be
fixed by #67

@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Merging #165 (77bed80) into main (a61b3cd) will increase coverage by 0.66%.
The diff coverage is 88.23%.

@@            Coverage Diff             @@
##             main     #165      +/-   ##
==========================================
+ Coverage   36.76%   37.42%   +0.66%     
==========================================
  Files          26       27       +1     
  Lines        1477     1491      +14     
  Branches       44       46       +2     
==========================================
+ Hits          543      558      +15     
+ Misses        921      920       -1     
  Partials       13       13              
Impacted Files Coverage Δ
src/queues/processors/proposalFactory.ts 0.00% <0.00%> (ø)
src/queues/utils.ts 100.00% <100.00%> (ø)

src/queues/utils.ts Outdated Show resolved Hide resolved
Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utAck

@wa0x6e wa0x6e merged commit 2ab1687 into main Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants