# modify-import
## Usage
```
npx ember-codemods modify-import path/of/files/ or/some**/*glob.js
# or
yarn global add ember-codemods
ember-codemods modify-import path/of/files/ or/some**/*glob.js
```
## Input / Output
* [basic-imports](#basic-imports)
* [existing-import](#existing-import)
* [integration-helpers](#integration-helpers)
---
**basic-imports**
**Input** ([basic-imports.input.js](transforms/modify-import/__testfixtures__/basic-imports.input.js)):
```js
import { describe, it } from 'mocha';
import setupAcceptance from 'freshdesk/tests/helpers/setup-acceptance';
import {
addFeatures,
addLaunched,
addAbilities,
removeFeatures,
removeAbilities,
convertMirageToModel,
spyFlashMessage
} from 'freshdesk/tests/helpers/util-test-helpers';
describe('Some test', function() {
it('Some test', function() {
// Some test code goes here.
});
});
```
**Output** ([basic-imports.output.js](transforms/modify-import/__testfixtures__/basic-imports.output.js)):
```js
import { describe, it } from 'mocha';
import {
addAbilities,
addFeatures,
addLaunched,
convertMirageToModel,
removeAbilities,
removeFeatures,
spyFlashMessage,
setupAcceptance,
} from '@freshdesk/test-helpers';
describe('Some test', function() {
it('Some test', function() {
// Some test code goes here.
});
});
```
---
**existing-import**
**Input** ([existing-import.input.js](transforms/modify-import/__testfixtures__/existing-import.input.js)):
```js
import { describe } from 'mocha';
import { addAbilities, addFeatures } from 'freshdesk/tests/helpers/util-test-helpers';
import { spyFlashMessage } from '@freshdesk/test-helpers';
describe('Some test', function () {
it('Some test', function () {
// Some test code goes here.
});
});
```
**Output** ([existing-import.output.js](transforms/modify-import/__testfixtures__/existing-import.output.js)):
```js
import { describe } from 'mocha';
import {
spyFlashMessage,
addAbilities,
addFeatures
} from '@freshdesk/test-helpers';
describe('Some test', function () {
it('Some test', function () {
// Some test code goes here.
});
});
```
---
**integration-helpers**
**Input** ([integration-helpers.input.js](transforms/modify-import/__testfixtures__/integration-helpers.input.js)):
```js
import { describe, it } from 'mocha';
import {
setupCurrentUser,
setupCurrentAccount
} from 'freshdesk/tests/helpers/integration-test-helpers';
describe('Some test', function() {
it('Some test', function() {
// Some test code goes here.
});
});
```
**Output** ([integration-helpers.output.js](transforms/modify-import/__testfixtures__/integration-helpers.output.js)):
```js
import { describe, it } from 'mocha';
import {
setupCurrentAccount,
setupCurrentUser
} from '@freshdesk/test-helpers';
describe('Some test', function() {
it('Some test', function() {
// Some test code goes here.
});
});
```