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

2.0.2 broke framework loading #2992

Open
grimly opened this issue May 9, 2018 · 3 comments
Open

2.0.2 broke framework loading #2992

grimly opened this issue May 9, 2018 · 3 comments

Comments

@grimly
Copy link

grimly commented May 9, 2018

Expected behaviour

When a framework is defined as a factory, it used to be called for its actions to be considered.

See below for a simple instance :

function Fmk(logger) {
  logger.info('It works !');
}

Fmk.$inject = ['logger'];

module.exports = { 'framework:Fmk': ['factory', Fmk]};

Actual behaviour

The framework is ignored. The framework index file is still being read.

Environment Details

  • Karma version (output of karma --version): 2.0.2
  • Relevant part of your karma.config.js file : see above

Steps to reproduce the behaviour

  1. Copy the code above in a karma.conf.js file and instead of export, use the object directly as a plugin value
  2. Run karma
  3. Observe nothing
  4. Run with version 2.0.0
  5. Observe the It works ! message.
@johnjbarton
Copy link
Contributor

It seems like karma-jasmine works as a framework factory:
https://github.com/karma-runner/karma-jasmine/blob/master/lib/index.js

@grimly
Copy link
Author

grimly commented May 9, 2018

I can't tell. I can't find any evidence this was a supported feature. There is no documentation when it comes to plugin development.

I just ran into an issue where the karma-detect-browsers plugin stopped working and in fact wasn't even called. That's the issue I simplified.

@johnjbarton
Copy link
Contributor

Maybe you can look at this test to see why your case is different:
https://github.com/karma-runner/karma/tree/master/test/e2e/support/middleware

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

2 participants