blanket.js not working with qunit in Ember-cli

二次信任 提交于 2019-12-14 02:45:05

问题


I would like to run blanket.js with qunit in my Ember-Cli app - I would like to avoid adding in grunt for only this purpose

Tried to use npm install --save-dev blanket ( putting it in the node_modules dir ) and then putting the following in my index.html ( from my test dir )

 <script>
  window.CioMobileENV = {{ENV}};
  window.EmberENV = window.CioMobileENV.EmberENV;
  debugger;
</script>
<script src="assets/qunit.js"></script>
<script src="assets/qunit-notifications.js"></script>
<script src="blanket.js"></script>
<script src="assets/vendor.js"></script>
<script src="assets/cio-mobile.js" data-cover></script>
<script src="testem.js"></script>
<script>
  require('cio-mobile/tests/test-helper');
</script>
<script src="assets/test-loader.js"></script>

after running ember server and in the browser going to /tests - the test run but in the console I see that blanket.js is not found

I also tried a similar approach using bower install blanket ( so in the vender dir ) this gave the same result.

I also tried putting in the path explicitly - and still blanket.js is not found

any help would be great!


回答1:


This tool has recently been released: ember-cli-blanket. Installation is as simple as what the instructions state.

For what it's worth though, I've tried using this, and i'm not getting accurate coverage reports. It's possible it is user error though.




回答2:


I am also working on using blanket with CLI. Download blanket.min.js and manually drop it in your assets folder, and change it to

<script src="assets/blanket.min.js"></script>

It will be included then. I am running blanket fine using that approach. It's still not very useful, because I don't know how to grab the transpiled files to run it on though.



来源:https://stackoverflow.com/questions/24498486/blanket-js-not-working-with-qunit-in-ember-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!