web-platform-tests / web-platform-tests/wpt

Do not output default error messages when custom message is given.

Open
#7,151 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

infra priority:backlog testharness.js
Dominant language
HTML
Stars
6.2k
Forks
3.9k
Avg merge
1d 6h
Merged PRs (30d)
586

Description

Originally posted as https://github.com/w3c/testharness.js/issues/37 by @duerst on 18 Jul 2013, 06:25 UTC:

Working on encoding tests, I discovered that testharness.js outputs both the default error message and the custom message when the later is given as an argument. It looks like this:
Fail HTML/Web Encoding 'windows-874' of byte value: DB assert_equals: expected "U+FFFD" but got "" (U+F8C1) expected "�" but got ""
The first part (up to "(U+F8C1)") is the custom message, where I have added the character number. I don't need the second part anymore, but I don't know how to get rid of it. Tobie said "Yes, we need to fix the library. ;-)" and asked me to post this issue here.
/cc @tobie

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 locating the testharness.js assertion-message handling that produces both the custom and default text. Reproduce the shown assert_equals case with a custom message, then add or update a regression test so only the custom message is reported when one is supplied.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.