exercism / javascript

Exercism exercises in JavaScript.

Home Page:https://exercism.org/tracks/javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typo in `High Score Board` exercise test file

IAmRC1 opened this issue · comments

Issue in updateScore function

const scoreBoard = {
      'Amil Pastorius': 99373,
      'Min-seo Shin': 0,
      'Jesse Johnson': 1337,
    };
const expected = {
      'Amil Pastorius': 99373,
      'Min-seo Shin': 1999,
      'Jesse Johnson': 2674,
    };
updateScore(scoreBoard, 'Min-seo Shin', 1999);
- const actual = updateScore(scoreBoard, 'Jesse Johnson', 1337);
+ const actual = updateScore(scoreBoard, 'Jesse Johnson', 2674);
expect(actual).toEqual(expected);
expect(Object.is(actual, scoreBoard)).toBe(true);

As explained in the PR you submitted, there is no typo in the exercise test file for the High Score Board exercise.

We do appreciate you opening the issue and providing a PR because you thought something was broken.

In this repository, each exercise must also have a proof.ci.js or exemplar.js file in the .meta directory. You can find these by browsing this repository and looking at the exercises folder. During CI, each proof and exemplar solution is actually used and tested against the .spec.js file, ensuring that there is always a valid solution for that exercise.

This means that if you encounter a potential bug, the first thing to do is to check if the proof or exemplar implementation has a faulty implementation. If so, a PR to change a test must also change this implementation.

I hope the information in the PR is sufficient for you to update your solution so it passes the tests.