angular 5 test static method of component

前端 未结 1 1128
旧时难觅i
旧时难觅i 2021-01-20 19:36

I have a static method on my Component class that I am testing, my question is how it is possible to access that method within my spec testing file?

So far I can acc

相关标签:
1条回答
  • 2021-01-20 20:09

    Static methods are not bound to instances of classes. So something like this should work: MyComponent.nameOfStaticMethod(params)

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