How do I fix my generator-angular project so that grunt test works?

前端 未结 3 421
情书的邮戳
情书的邮戳 2021-02-03 21:10

I am working off of this tutorial: http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/ as a means to understand what files are created usi

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-03 21:58

    If you used the --coffee flag on the yo angular command you'll need to:

    install some browser launcher (chrome in this case) and the following npm packages:

    npm install --save-dev karma-chrome-launcher karma-jasmine karma-coffee-preprocessor
    

    and add the following to your karma.conf.js file:

    plugins:['karma-chrome-launcher', 'karma-jasmine', 'karma-coffee-preprocessor'],
    preprocessors:{'**/*.coffee':['coffee']}
    

    After that running grunt test should work.

提交回复
热议问题