karma-runner / karma-runner/karma

2.0.2 broke framework loading

Open
#2,992 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### 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 :

```javascript
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.