question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v1.1.0 and v1.2.0 do not run any tests

See original GitHub issue

Expected behavior

Karma runs my tests

Actual behavior

I see the following output:

29 06 2016 15:12:22.909:INFO [karma]: Karma v1.1.0 server started at http://localhost:9876/
29 06 2016 15:12:22.913:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
29 06 2016 15:12:22.927:INFO [launcher]: Starting browser PhantomJS
29 06 2016 15:12:25.739:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket /#bDpfsp5qhtjVLGXQAAAA with id 3610229

START:
(node:20928) Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]
(node:20928) Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]
(node:20928) Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]
(node:20928) Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]
(node:20928) Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]
(node:20928) Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]
(node:20928) Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  ReferenceError: Can't find variable: jasmineRequire
  at G:/Cloud/Apps/REMProcessPilot/angular2-webpack/Diamant.Cloud.Apps.REMProcessPilot/node_modules/karma-jasmine-html-reporter/src/lib/html.jasmine.reporter.js:24
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  ReferenceError: Can't find variable: jasmineRequire
  at G:/Cloud/Apps/REMProcessPilot/angular2-webpack/Diamant.Cloud.Apps.REMProcessPilot/node_modules/karma-jasmine-html-reporter/src/lib/html.jasmine.reporter.js:24
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  ReferenceError: Can't find variable: jasmineRequire
  at G:/Cloud/Apps/REMProcessPilot/angular2-webpack/Diamant.Cloud.Apps.REMProcessPilot/node_modules/karma-jasmine-html-reporter/src/lib/html.jasmine.reporter.js:24

Finished in 0.151 secs / 0 secs

SUMMARY:
√ 0 tests completed

Enviroment Details

  • Karma Version 1.1.0
  • Windows 8.1

Karma.conf.js:

const webpackConfig = require('./webpack.tests.config.js');

module.exports = function (config) {
    config.set({

        // base path that will be used to resolve all patterns (eg. files, exclude)
        basePath: '..',

        // frameworks to use
        // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
        frameworks: ['jasmine'],

        // list of files / patterns to load in the browser
        files: [
            { pattern: 'config/tests.js', included: true, watched: false },
            { pattern: 'static/images/**/*', included: false, watched: false },
            { pattern: 'static/data/**/*', included: false, watched: false }
        ],

        // list of files to exclude
        exclude: [
        ],
        proxies: {
            '/images': '/base/static/images',
            '/data': '/base/static/data'
        },

        webpack: webpackConfig,

        webpackMiddleware: {
            noInfo: true,
            stats: {
                colors: true
            }
        },

        plugins: [
            'karma-webpack',
            'karma-jasmine',
            'karma-phantomjs-launcher',
            'karma-chrome-launcher',
            'karma-verbose-reporter',
            'karma-clear-screen-reporter',
            'karma-jasmine-html-reporter',
            'karma-sourcemap-loader',
            'karma-mocha-reporter',
            'karma-trx-reporter'
        ],

        preprocessors: {
            'config/tests.js': ['webpack', 'sourcemap'],
        },

        verboseReporter: {
            color: 'full',
        },

        trxReporter: { outputFile: 'test-results.trx' },

        mochaReporter: {
            // output: 'autowatch'

        },


        // test results reporter to use
        // possible values: 'progress', 'verbose', 'kjhtml', 'mocha', 'trx'
        // available reporters: https://npmjs.org/browse/keyword/karma-reporter
        reporters: ['kjhtml', 'mocha', 'trx'],

        // web server port
        port: 9876,

        webpackServer: { noInfo: true },

        // enable / disable colors in the output (reporters and logs)
        colors: true,

        // level of logging
        // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
        logLevel: config.LOG_INFO,

        // enable / disable watching file and executing tests whenever any file changes
        autoWatch: true,

        // start these browsers
        // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
        browsers: ['PhantomJS'],
        //browsers: ['Chrome'],

        // Continuous Integration mode
        // if true, Karma captures browsers, runs the tests and exits
        singleRun: false,

        // Concurrency level
        // how many browser should be started simultaneous
        concurrency: Infinity
    });
}

Steps to reproduce the behaviour

  1. Upgrade karma to 1.1.0
  2. karma start karma.conf.js

Karma works as expected with 1.0.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
oocxcommented, Aug 12, 2016

The problem is NOT fixed. Please reopen this issue.

All you fixed is that the output no longer contains the promise warnings, which is not what this bug report was about. The problem is that karma is not running any tests!

START:
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  ReferenceError: Can't find variable: jasmine
  at G:/Cloud/Apps/REMProcessPilot/angular2-webpack/Diamant.Cloud.Apps.REMProcessPilot/node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:6
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  ReferenceError: Can't find variable: jasmine
  at G:/Cloud/Apps/REMProcessPilot/angular2-webpack/Diamant.Cloud.Apps.REMProcessPilot/node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:6
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  ReferenceError: Can't find variable: jasmine
  at G:/Cloud/Apps/REMProcessPilot/angular2-webpack/Diamant.Cloud.Apps.REMProcessPilot/node_modules/karma-jasmine-html-reporter/src/lib/adapter.js:6
12 08 2016 07:22:49.004:WARN [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Disconnected (1 times)
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  Disconnectedundefined
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  Disconnectedundefined
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
  Disconnectedundefined
12 08 2016 07:22:49.008:ERROR [launcher]: PhantomJS crashed.


Finished in 0.142 secs / 0 secs

SUMMARY:
√ 0 tests completed
1reaction
dignifiedquirecommented, Aug 12, 2016

@oocx can you please provide a repo that reproduces this error, all jasmine tests I have are running fine on the latest version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing Validations in Elixir and Ecto | by Brandon Richey
As of the time of writing this, the current versions of our applications are: Elixir: v1.1.1; Phoenix: v1.1.0; Ecto: v1.1.0; Comeonin: v2.0.0.
Read more >
Docker Compose release notes
This release introduced a breaking change via compose-go v1.3.0 and this PR. ... Fixed scaling when some containers are not running on docker-compose...
Read more >
Migrating to AWS CDK v2 - AWS Documentation - Amazon.com
With CDK v2, the environments you deploy into must be bootstrapped using the modern bootstrap stack. The legacy bootstrap stack (the default under...
Read more >
Known issues — nRF Connect SDK 1.4.2 documentation
The preprogrammed Asset Tracker does not come with the best external antenna performance. Workaround: If you are using nRF9160 DK v0.15.0 or higher...
Read more >
Car App - Android Developers
This is a stabilization release, and there are no changes compared to v1.1.0-rc01 . Also see the release notes for v1.2.0-alpha02 for more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found