Ionic Jasmine : env.stopOnSpecFailure is not a function after compiled successfully

前端 未结 1 2132
长发绾君心
长发绾君心 2021-02-19 15:30

Using Ionic with jasmine-karma, while run test, getting success compile but in jasmine dashboard getting empty screen with error in console.

Following tutorial : https:/

1条回答
  •  清酒与你
    2021-02-19 16:13

    The failure occurs in your version of karma-jasmine which tries to use the stopOnSpecFailure function. That function is not present in your version of jasmine-core, you'll need version 3 or greater. Version 3.1.0 is the newest right now and works good. Also note that if you're using Webpack 3 you should also downgrade ts-loader to 3.5.0.

    UPDATE:

    I noticed that many people suggests downgrading jasmine-core to 2.99.1. Apparently people have problems using jasmine-core 3. If that's the case for you, then you can use karma-jasmine-html-reporter version 0.2.2 together with jasmine-core 2.99.1.

    0 讨论(0)
提交回复
热议问题