[removed] Mocking Constructor using Sinon

前端 未结 8 2089
迷失自我
迷失自我 2021-02-06 20:47

I am pulling my hair out trying to figure out how to mock a constructor using sinon. I have a function that will create multiple widgets by calling a constructor that accepts a

8条回答
  •  醉梦人生
    2021-02-06 21:21

    I was able to get StubModule to work after a few tweaks, most notably passing in async:false as part of the config when requiring in the stubbed module.

    Kudos to Mr. Davis for putting that together

提交回复
热议问题