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 parallel cannot find any tests after starting Chrome #61

Open
1 task done
ionuttibi opened this issue Aug 27, 2020 · 0 comments
Open
1 task done

Karma parallel cannot find any tests after starting Chrome #61

ionuttibi opened this issue Aug 27, 2020 · 0 comments

Comments

@ionuttibi
Copy link

ionuttibi commented Aug 27, 2020

  • Do you want to request a feature or report a bug?
  • bug report
  • What is the current behavior?
    The following error is thrown:
Cannot read property 'success' of undefined
TypeError: Cannot read property 'success' of undefined
    at TestCommand.runSingleTarget (C:\Users\ionut.irimia\Documents\Diod Selfcare\selfcare-portal-frontend\node_modules\@angular\cli\models\packages\angular\cli\models\architect-command.ts:242:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)

image

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    After running ng test --watch=false or ng-test or karma start karma.conf.js the browsers are starting but no test is found.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

This is my karma.conf.js

            basePath: '..',
            frameworks: ['parallel', 'jasmine' /* or 'jasmine' */],
            plugins: [
                require('karma-parallel'),
                require('karma-jasmine'),
                require('karma-chrome-launcher'),
                require('karma-junit-reporter'),
                require('karma-spec-reporter'),
                require('karma-coverage-istanbul-reporter'),
                require('@angular-devkit/build-angular/plugins/karma')
            ],
            client: {
                clearContext: false, // leave Jasmine Spec Runner output visible in browser
                captureConsole: false
            },
            junitReporter: {
                outputDir: 'reports/junit',
                outputFile: 'unit-test.xml',
                useBrowserName: false,
                suite: '' // Will become the package name attribute in xml testsuite element
            },
            coverageIstanbulReporter: {
                reports: ['html', 'lcovonly', 'text-summary'],
                dir: 'reports/coverage',
                fixWebpackSourcePaths: true,
                skipFilesWithNoCoverage: true
            },
            reporters: ['spec'],
            port: 9876,
            colors: true,
            logLevel: config.LOG_INFO,
            autoWatch: true,
            browsers: ['Chrome_headless'],
            customLaunchers: {
                Chrome_headless: {
                    base: 'Chrome', // for windows should be Chrome
                    flags: [
                        '--headless',
                        '--no-sandbox',
                        '--disable-gpu',
                        // Without a remote debugging port, Google Chrome exits immediately.
                        '--remote-debugging-port=9222',
                        '--allow-insecure-localhost'
                    ]
                }
            },
            singleRun: true,
            client: {
                jasmine: {
                    random: false
                }
            }
        };
@ionuttibi ionuttibi changed the title Karma parralel cannot find any tests after starting Chrome Karma parallel cannot find any tests after starting Chrome Aug 27, 2020
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