Skip to content

Conversation

jagdish-15
Copy link
Member

No description provided.

Copy link
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@jagdish-15 jagdish-15 changed the title Update tests word-serach Update tests word-search Aug 25, 2025
@jagdish-15
Copy link
Member Author

This one was a bit unusual—the last test (before adding the 4 at the end of the file) seemed off. I’ve fixed it to align with the canonical-data.json, added the remaining four tests, removed all the describe sections to maintain consistency with the canonical data, and updated the proof solution accordingly.

Here’s the odd test I was referring to:

    xtest('should fail to locate a word that is not in the puzzle', () => {
      const grid = [
        'jefblpepre',
        'camdcimgtc',
        'oivokprjsm',
        'pbwasqroua',
        'rixilelhrs',
        'wolcqlirpc',
        'screeaumgr',
        'alxhpburyi',
        'jalaycalmp',
        'clojurermt',
      ];

      const expectedResults = {
        fail: undefined,
      };
      const wordSearch = new WordSearch(grid);

      expect(wordSearch.find(['fail'])).toEqual(expectedResults);
    });

In the expectedResult, this was checking if the word "fail" exists in the puzzle rather than verifying whether all the other words are located, and it fails only for the word that isn’t present in the grid! Or am I missing something?

@jagdish-15
Copy link
Member Author

@SleeplessByte

What do you think?

@SleeplessByte
Copy link
Member

Eh, we'll have to check the problem-spec PR to figure out what was intended.

@jagdish-15
Copy link
Member Author

Eh, we'll have to check the problem-spec PR to figure out what was intended.

I've changed the test mentioned above to match what was intended in the problem-specificatio repo. I just wanted to confirm it's what was expected.

Copy link
Member

@SleeplessByte SleeplessByte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, reading this again and it looks right. Let's merge it and see what happens :D

@SleeplessByte SleeplessByte added x:action/sync Sync content with its latest version x:module/practice-exercise Work on Practice Exercises x:type/content Work on content (e.g. exercises, concepts) labels Sep 23, 2025
@SleeplessByte SleeplessByte merged commit 79d0d12 into exercism:main Sep 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/sync Sync content with its latest version x:module/practice-exercise Work on Practice Exercises x:type/content Work on content (e.g. exercises, concepts)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants