Jasmine in a separate test project

前端 未结 3 611
悲哀的现实
悲哀的现实 2021-02-01 05:26

Is it practical/possible to separate jasmine tests into a separate visual studio project?

I am just getting started with angular, and am trying to write my tests befor

3条回答
  •  旧巷少年郎
    2021-02-01 05:45

    You can do this with no copy/pasting. In your Jasmine tests you can add a /// comment which posts to your source files (or the directory containing them). For example given this sturcture

    /ProjectA /scripts

    code1.js
    code2.js
    

    /TestProjectB test1.js

    You can add this line at the top of your test1.js file to reference all your code files:

    /// 
    

提交回复
热议问题