Repository navigation
Conversation
zibi-dev
left a comment
There was a problem hiding this comment.
testy sa czytelne, ale sprawdzaja glownie proste przypadki. dopisz jeszcze cos w should return an array, bo teraz ten test jest pusty i zawsze przechodzi. popraw tez test should return an empty string...: nazwa mowi o pustym stringu, a sprawdza [‘Mate’, ‘Academy’] 🙂
| }); | ||
|
|
||
| // write more tests here | ||
| test('reserves characters and preserves original length', () => { |
There was a problem hiding this comment.
literowka w nazwie: "reserves" -> "reverses". do tego ten test jest kopia 1:1 testu wyzej (['Mate', 'Academy']), wiec nic nowego nie sprawdza. lepiej daj tu przyklad ze speca: ['I', 'am', 'a', 'student!'] -> ['!', 'tn', 'e', 'dutsamaI']. to jest najwazniejszy case, bo slowa maja rozne dlugosci i widac, ze kazde slowo ma po odwroceniu tyle samo znakow co przed
There was a problem hiding this comment.
kurde jakie babole zrobiłem... ale dobra. już dopisałem brakujące testy i doprecyzowałem opisy. Fantastyczne 8 testów gotowe na zatwierdzenie xD
| expect(arrayReverse(input)).toEqual(['0lleH']); | ||
| }); | ||
|
|
||
| test('reverses an empty string', () => { |
There was a problem hiding this comment.
spoko, ze jest pusty string, ale brakuje pustej tablicy: arrayReverse([]) -> []. dodaj tez przypadek z pustym stringiem miedzy innymi slowami, np ['', 'abc'] -> ['', 'cba']. wtedy wiadomo, ze slowo o dlugosci 0 dalej ma 0 znakow i nie przesuwa reszty liter
| expect(arrayReverse(input)).toEqual(['ymed', 'acAetaM']); | ||
| }); | ||
|
|
||
| test('reverses one string', () => { |
There was a problem hiding this comment.
ok, pokrywa przyklad ze speca. w nazwie mozesz dopisac, ze chodzi o cyfre w stringu, bo to sprawdza tez znaki inne niz litery
No description provided.