jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

No error message for - TypeError: undefined is not a function (evaluating 'expect #526

Open thebravoman opened 7 years ago

thebravoman commented 7 years ago

Running the tests I get this error.

The problem is that I can not find a way to understand anything about this error. What is undefined? Why? Where is the error log (it is not in log/test.log). I would need some more information about this error because the result from loader.calculateRotation is defined. I can see it on the previous step, but then this occurs.

Failure/Error: TypeError: undefined is not a function (evaluating 'expect(loader.calculateRotation(module, 2)).toEquals([1,2,2])') in http://127.0.0.1:36150/assets/
thebravoman commented 7 years ago

Uff, it is toEquals and not toEqual.

It is awful. Took me a lot of time to spot this s. Can I configure in any way for this to be reported as "there is no function toEquals" instead of "undefined is not a function"

?

mathieujobin commented 3 years ago

I don't know @thebravoman

this seems like a JS thing, maybe there is a way to catch the error and throw a more descriptive one.