RealDevSquad / RealDevSquad/website-backend

Fix `/tasks` tests, as they are flaky tests

Open
#1,724 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
74
Forks
276
Avg merge
1d 26m
Merged PRs (30d)
14

Description

Issue Description

For tasks route tests

The tasks-test.js file contains tasks to test, and there is no cleanup done between each test, do the tests pass some sometimes and sometimes fail, tests are flaky

Expected Behavior

Clean-up code needs to be added between the tests

Current Behavior

No cleanup code is present between tests

Reproducibility
  • This issue is reproducible
  • This issue is not reproducible
Steps to Reproduce
  1. Run tests multiple times, sometimes it will pass sometime it will fail
Severity/Priority
  • Critical
  • High
  • Medium
  • Low

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tasks-test.js and run the tasks route tests repeatedly to observe the intermittent failures. Trace the test setup and teardown to identify state that persists between tests, then add cleanup and confirm repeated runs pass consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.