I have a really strange behavior in my test for a simple angularJS app

Setup: Karma v0.10.9 PhantomJS 1.9.7

All test passing the first time ( sometimes the second or third too :-) ) But after a while test failing randomly

There are two kinds of errors

TypeError: 'null' is not an object (evaluating 'errorForStack.stack')
        at workFn (<my_path>/angular-mocks.js:1811)

and

Error: SECURITY_ERR: DOM Exception 18 
//Line $window.openDatabase('myDB', "", 'Offline DB', 5 * 1024 * 1024);

Problem occurs on Windows and Linux

Current fix -> restart Karma --> But i hate this solution since continuous testing is just great

Any suggestions ?

有帮助吗?

解决方案

Fixed the first problem ( Bug in angular-mocks.js ).

Second problem fixed by mocking openDatabase.

Thx for the help

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top