I'm writing the test cases for custom directive in angular. Here is my code in stackblitz. Can anyone let me know how I can covered highlighted if else statement.
if (trimmedValue.length > 14) {
// how to cover this statement
trimmedValue = trimmedValue.substr(0, 14);
}
if (trimmedValue.substr(6, 2) !== '') {
// how to cover this statement
nricNumber.push(trimmedValue.substr(6, 2));
}