question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove unnecessary assert messages from testString in curriculum challenges

See original GitHub issue

This issue will serve as a way to track all the work needed to remove the unnecessary assert messages from the yaml testString. For all challenges which only have a text for each testString assert (most of the front-end challenges), we can simply remove the message argument, because the text is used for displaying both in the tests frame and in the fake console.

Any PRs created for this issue will only affect English curriculum files and only change two things:

  1. Replace existing text with assert message argument value if the assert message gives a better test message and remove the assert message argument from the testString.
  2. When both the text and the assert message argument values match, just remove the assert message argument from the testString`.

I have created a script which should capture all of the applicable tests. I will create PRs for only the following sections which are known to not have multiple assert messages in the testString per single text tests. I will limit the number of files per PR to make review easier on GitHub.

At the time of this issue’s creation, there is only one open PR https://github.com/freeCodeCamp/freeCodeCamp/pull/35770 (waiting on final approval before being merged), which will need to have it’s testString assert message arguments reviewed/removed.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
ojeytonwilliamscommented, Jul 12, 2019

I think the only ones worth looking at all are the ones without solutions. If they have solutions npm run test will complain if the syntax is wrong or they suddenly start giving the wrong answers.

1reaction
RandellDawsoncommented, Jul 12, 2019

I think we merge all the PRs in that case because looking for 0.01% of the errors would be like finding a needle in a haystack.

It is not that they are errors. It is just that they would not be removed (which does not hurt anything).

Read more comments on GitHub >

github_iconTop Results From Across the Web

[META] remove t() from assert message [#500866] | Drupal.org
The $message parameter of SimpleTest assertions (e.g., DrupalTestCase::assertTrue()) is a string displayed only in the administrative UI or on ...
Read more >
FreeCodeCamp/Contributors - Gitter
I have been debating for quite some time if the challenge addition ... Either the current text or the assert message argument in...
Read more >
curriculum/challenges/english/02-javascript-algorithms-and ... - GitLab
Create a function addFive without any arguments. This function adds 5 to the sum variable, but its returned value is undefined . Tests....
Read more >
JMeter Assertions: The Ultimate Guide - OctoPerf
The ability to customize the error message is a plus, definitely. That way, you can have your own message in results like JTL...
Read more >
Testing Guide - OWASP Foundation
that our approach to testing software for security issues is based ... Remove any unnecessary or unused files on the server. This.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found