Error: You need to include some adapter that implements __karma__.start method

后端 未结 26 1461
梦谈多话
梦谈多话 2020-12-01 11:53

I\'m trying to add some unit tests to one of my projects.

So far I\'ve installed and configured karma, and have installed jasmine. I\'ve one test file in my te

26条回答
  •  心在旅途
    2020-12-01 12:03

    I had a bad 'files' configuration in my karma.conf.js

    files: ['**/*.js'],
    

    this caught up all the files in node_modules/ including those of the karma-jasmine plugin, as it was seen as sourde files it wasn't loaded on startup. Changing to

    files: [
            'src/*.js',
            'spec/*.js'
        ],
    

    solved the problem in my case

提交回复
热议问题