In my server side file I have two functions defined for which I want to write test cases which are residing in a file in tests directory.
~PRJ_DIR/server/file1.coffee
calcSha1Hash = (params) ->
.... logic...
anotherFunc = () ->
..somelogic..
x = calcSha1Hash(params)
~PRJ_DIR/tests/server/file1.coffee
MochaWeb?.testOnly () ->
describe.only("Hash generation. ", () ->
it(" calcSha1Hash returns Hash.", (dn) ->
dataDict = {email: 'johndoe@gmail.com'}
hash = calcSha1Hash (dataDict)
chai.assert.isDefined(hash)
dn()
)
)
How is it possible to call the server side func(calcSha1Hash) in my test case in Meteor