# angular-module-no-deps

> overrides angular.module to not load module dependencies

Latest version **1.0.1** (published 2017-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-module-no-deps
pnpm add angular-module-no-deps
yarn add angular-module-no-deps
bun add angular-module-no-deps
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-01-12 |
| First published | 2016-12-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Simon Auner |
| Maintainers | siau |
| Keywords | angular, module, testing |

## Links

- npm: https://www.npmjs.com/package/angular-module-no-deps
- Repository: https://github.com/mrgreentech/angular-module-no-deps
- Homepage: https://github.com/mrgreentech/angular-module-no-deps#readme
- Issues: https://github.com/mrgreentech/angular-module-no-deps/issues
- npm.io page: https://npm.io/package/angular-module-no-deps

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-01-12
- 1.0.0 — 2016-12-21

## README

# angular-module-no-deps

Include this module in your Karma tests to override `angular.module` into not loading any dependencies. Very useful for testing components in _real_ isolation!

## Usage

```
npm install --save-dev angular-module-no-deps
```

Then include it in your `karma.conf.js`:
```
module.exports = function (config) {
    'use strict';
    config.set({

        ...
        files: [
            './node_modules/angular-module-no-deps/index.js',
            ...
        ],
        ...
    });
};
```

`angular-module-no-deps` now overrides `angular.module('name', [...])` to `angular.module('name', [])`.

## Background

Given an angular module that looks like this:

_user.js_

```
angular
	.module('user', [
	    'account'
	])
	.service('User', UserService)

function UserService(Account) {
	// code...
}
```

and a test that looks like this:

_user.spec.js_
```
angular.mock.module('user', function($provide) {
    $provide.value('Account', {});
});
```

the test code will still want to load the `'account'` module even though the service `'account'` provides is mocked. This is not always desirable and then you can use this override to empty the module array.

---
_Source: https://npm.io/package/angular-module-no-deps · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
