razorpay / razorpay/razorpay-node

resource testing

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
243
Forks
128
PR merge metrics
No merged PRs in 30d

Description

Prologue

The current test cases are not use cases or state-test cases but rather implementation tests; hence, it's neither the behavior we are testing nor the actual use case and this is a bad practice (you can read about implementation vs. state tests in a lovely article by Eric Elliot or Addy Osmani.)

Because of this, the tests are really bloated (at around 190 cases in total.)

Solution

The current test bed should be rewritten to include the states of the object instead of their mutations (checking the reply as opposed to the URL.)

Tags

suggestion, testing, improvement, dev.

Contributor guide

No contributing guide indexed for this repository

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 locating the current resource test bed and reviewing how its cases check mutations such as URLs rather than resulting replies or object states. Compare the existing cases with the described use cases, then define completion as a smaller test suite that verifies observable states and preserves the tested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.