fix(learn): Added test for edge case (#39323)
* fix(learn): Added test for edge case * Test checks edge cases for incorrect spelling in middle characters. * fix: removed 'pen' sageTest * the 'pen' points out that it is not the end of the first word to be tested for, but the end of the string. However, this is explained clearly in the 'mountain' test below just as well.
This commit is contained in:
parent
17d9b43747
commit
4b7ad8447b
@ -35,8 +35,8 @@ tests:
|
||||
testString: assert(confirmEnding("He has to give me a new name", "name") === true);
|
||||
- text: <code>confirmEnding("Open sesame", "same")</code> should return true.
|
||||
testString: assert(confirmEnding("Open sesame", "same") === true);
|
||||
- text: <code>confirmEnding("Open sesame", "pen")</code> should return false.
|
||||
testString: assert(confirmEnding("Open sesame", "pen") === false);
|
||||
- text: <code>confirmEnding("Open sesame", "sage")</code> should return false.
|
||||
testString: assert(confirmEnding("Open sesame", "sage") === false);
|
||||
- text: <code>confirmEnding("Open sesame", "game")</code> should return false.
|
||||
testString: assert(confirmEnding("Open sesame", "game") === false);
|
||||
- text: <code>confirmEnding("If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing", "mountain")</code> should return false.
|
||||
|
Loading…
x
Reference in New Issue
Block a user