Truncate a String: wrong test

I am writing the code:


function truncateString(str, num) {

  return str.substr(0, num)+'...';
}

truncateString("A-tisket a-tasket A green and yellow basket", 8);

1, 2, 4, 6 test items are performed. 3 and 4 look like this:

3. truncateString("A-tisket a-tasket A green and yellow basket", "A-tisket a-tasket A green and yellow basket".length) should return "A-tisket a-tasket A green and yellow basket".
4.
truncateString("A-tisket a-tasket A green and yellow basket", "A-tisket a-tasket A green and yellow basket".length + 2) should return "A-tisket a-tasket A green and yellow 

Maybe these test items are wrong?

Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.143 YaBrowser/19.7.1.114 Yowser/2.5 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/truncate-a-string

Hint : The complete sentences do not have to be truncated.
Try solving now.

Truncate a string (first argument) if it is longer than the given maximum string length (second argument)
You need to check if str length is longer than num first.

Thank you for your help. I will try.