Is it possible to mix Testacular (Karma) with angular-scenario?

后端 未结 2 643
故里飘歌
故里飘歌 2020-12-09 12:29

Testacular (now Karma) is awesome, so is angular-scenario. Using them together is proving a challenge however. There is an ANGULAR-SCENARIO-ADAPTER in Testacular, but that b

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 12:59

    The reason true becomes undefined is that you are using angular-scenario's version of expect (not Jasmine's version) which takes a parameter called future that will evaluate to a page element or property once the page has loaded.

    Angular-scenario expects the future parameter to be an object with a value property. So when you pass in true it attempts to access true.value which evaluates to undefined.

    expect({value: true}).toEqual(true); works fine.

提交回复
热议问题