mkevenaar / mkevenaar/CharlieSpring

Rework tests for Discord.JS v14

Open
#110 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3
Forks
0
Avg merge
11h 9m
Merged PRs (30d)
26

Description

Not a comment for change, just an FYI. My analysis is that the test is doing 'async work' after the Client is constructed. Bad practice? Yes. Reality? Also yes.

This is a problem we could solve by mocking. It's not easy and takes quite some Jest digging. Your comment is 100% justified here.

Originally posted by @davidzwa in https://github.com/mkevenaar/CharlieSpring/pull/105#discussion_r929285011

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 by reviewing the existing tests and the discussion referenced from pull request #105, then investigate how Jest can mock the Discord.JS Client. Done means the tests no longer perform asynchronous work after Client construction, while still covering the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.