I am new to unit testing and I am trying to understand how to unit test node.js project but I am unsure why my current test is not working.
I have 2 files fed.js (src) and fed.spec.js (spec)
This is the error I am getting when I run this...
Error:
Snap should return 142
Expected undefined to be 142.
Error: Expected undefined to be 142.
The Jist:
I am trying to run a test to ensure that the variable AllowanceAdditional (located in fed.js) is equal to 142.
So I ran a jasmine unit test (located in fed.spec.js) and stated that I expected AllowanceAdditional to equal (==) or to be (===) 142. But The error I get returned is that AllowanceAdditional is undefined...
Can someone educate me or point me in the right direction, I don't understand why this is not working. What am I doing wrong? I hope my question makes sense, if not please tell me and I will further clarify