max-mapper / max-mapper/tape-spawn

Decide on failMessage

Open
#8 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
23
Forks
3
PR merge metrics
No merged PRs in 30d

Description

In reply to https://github.com/maxogden/tape-spawn/pull/7#issuecomment-114178145:

yes the failMessage is a little weird... it is currently there to handle the case where the output did not match but you want the failure message to say something specific instead of just did not match.

If it passes it uses message, if it fails it uses failMessage which includes the entire output buffer, mostly because .match succeeds I didn't want it to print out the entire output buffer. I am open to suggestions on making this better. Maybe in the event of a failure it can just append the output buffer to the end of message and then we could get rid of failMessage

Hmm, I’ve never found myself wanting to print another message if a test fails.

If I need to dump some debug info, I just use console.dir or similar stuff. With the beauty of TAP and some reporters like tap-spec v2 this info will be shown alongside the failed test.

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 reviewing the existing failMessage and message behavior described in the issue and the linked pull request discussion. Decide whether failMessage should remain or whether failures should append the output buffer to message; done requires an agreed behavior and corresponding implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.