How to exclude Folder (components) for unit testing in Angular 4 using Karma config?

前端 未结 1 1092
别那么骄傲
别那么骄傲 2021-01-18 10:27

I am using angular cli version 1.4.5 and below is the karma.conf.ts file

module.exports = function (config) {
  config.set({
  basePath: \'\',
  exclude: [
          


        
相关标签:
1条回答
  • 2021-01-18 11:21

    Change the config in the src/test.ts.

    const context = require.context('./', true, /\.spec\.ts$/);
    

    https://github.com/angular/angular-cli/issues/9026#issuecomment-354475734

    0 讨论(0)
提交回复
热议问题