Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

karma-typescript attempts to process node_modules TS by default config #501

Open
schoettler opened this issue Nov 23, 2021 · 0 comments
Open

Comments

@schoettler
Copy link

schoettler commented Nov 23, 2021

image

Seems like something might be wrong with my karma.conf? Would anyone be available here to help?

This is my config:

const plugins = [
  require('karma-webpack'),
  require('karma-jasmine'),
  require('karma-typescript'),
  require('karma-chrome-launcher'),
  require('karma-jasmine-html-reporter'),
  require('karma-coverage'),
  require('karma-coverage-istanbul-reporter'),
  require('karma-sinon'),
  require('@angular-devkit/build-angular/plugins/karma'),
]

module.exports = function (config) {
  config.set({
    angularCli: {
      environment: 'dev'
    },
    files: [
      './src/main.ts',
      { pattern: './src/**/*spec.ts', watched: false }
    ],
    exclude: ['node_modules'],
    preprocessors: {
      './src/**/*.ts': ['karma-typescript'],
      './src/**/*spec.ts': ['webpack']
    },
    frameworks: [
      'webpack',
      'jasmine',
      'karma-typescript',
      'sinon',
      '@angular-devkit/build-angular',
    ],
    plugins,
    client: {
      clearContext: true,
      jasmine: {
        random: true,
      },
    },
    // karmaTypescriptConfig,
    port: 9876,
    colors: true,
    browserNoActivityTimeout: 30000,
    logLevel: config.LOG_INFO,
    webpack: {
      resolve: {
        enforceExtension: false,
        extensions: ['.ts', '...'],
      },
    }
  })
}
@schoettler schoettler changed the title karma-typescript attempts to process node_modules TS by default confi karma-typescript attempts to process node_modules TS by default config Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant