I'm trying to test that an express route is set in my node app using jasmine (along with jasmine-given and jasmine-stealth). I'm doing it in a loop but the gist of the comparison is (in coffeescript, incidentally):
route = app.stack.shift()
expect(route).toEqual
route: ''
handle: jasmine.any(Function)
I'm using jasmine.any on this particular test because the handle function comes from an express internal function (like express.static(/*stuff*/)
). When I run the tests with grunt, I'm getting get failures with the following message:
Message:
Expected { route : '', handle : Function } to equal { route : '', handle : Function }.
Those look the same to me. Am I missing something???