Appium automation using mocha testing framework

How to use ‘it’ statement in if else block, if I am using it is just ignoring the block?

Can you share your code to help debug?