PhantomJs Crashes while running with grunt-karma test cases ????/

前端 未结 3 545
盖世英雄少女心
盖世英雄少女心 2021-01-26 01:32

We are facing an issue while running karma test cases with phantomJs our phantomJs crashes and gets disconnected. Is that due to memory leakage or some other issue.Kindly let

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-26 02:22

    I was getting Phantom crashed when asserting the following line

    dom.should.be.instanceof(HTMLCollection);
    

    Worked on chrome, but phantom was crashing without any useful error message. I've been able to see the real error message after running the same test on PhantomJS_debug browser with debug option set to true.

    The following error message started showing up.

    The instanceof assertion needs a constructor but object was given.
    

    Instead of

    PhantomJS has crashed. Please read the bug reporting guide at
     and file a bug report.
    

    So chrome was ok with the assertion but phantom 2.1.1 is crashing with the above error. Hope this will help.

提交回复
热议问题