Typescript Test For String Javascript Functions Explained