Developer Forum

Ask a Question
Back to All

Unable to write Unit test cases for Localize methods and its failed with issue

I have used localizejs on my Angular project and I started writing unit test cases for all my components but it failed with the below error as Localize global variable is found undefined on spec files.

Error:

ReferenceError: Localize is not defined

Let me know if I am doing any wrong implementation of my test cases in respect to Localize.

Thanks