EmmanuelDemey / EmmanuelDemey/eslint-plugin-angular

Disallow multiple module() calls in a descibe block

Open
#307 0 comments 0 reactions 0 assignees View on GitHub
Rule
Dominant language
JavaScript
Stars
620
Forks
127
PR merge metrics
No merged PRs in 30d

Description

I have encountered the following type of unittest setup several times now:

``` js
describe('', function() {
// ...

beforeEach(module('myApp'));
beforeEach(module('ui.router'));

// ...
});
```

This typically indicates that the module is not setup correctly. The `myApp` module should have `ui.router` as a dependency instead.

It should be allowed to add exceptions (e.g. [`ngMaterial-mock`](https://github.com/angular/material/blob/master/test/angular-material-mocks.js) or [`ngCordovaMocks`](https://github.com/driftyco/ng-cordova/tree/master/src/mocks))

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.