https://github.com/ijlee2/ember-codemod-add-missing-tests
Codemod to add missing tests
https://github.com/ijlee2/ember-codemod-add-missing-tests
codemod ember-codemod emberjs embroider
Last synced: 4 months ago
JSON representation
Codemod to add missing tests
- Host: GitHub
- URL: https://github.com/ijlee2/ember-codemod-add-missing-tests
- Owner: ijlee2
- License: mit
- Created: 2025-09-15T14:45:42.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2026-01-28T11:54:44.000Z (5 months ago)
- Last Synced: 2026-01-29T03:22:26.894Z (5 months ago)
- Topics: codemod, ember-codemod, emberjs, embroider
- Language: TypeScript
- Homepage:
- Size: 234 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/ijlee2/ember-codemod-add-missing-tests/actions/workflows/ci.yml)
# ember-codemod-add-missing-tests
_Codemod to add missing tests_
## Why use it?
Large projects without tests are hard to maintain and extend. Run this codemod to find untested code and create default tests.
The codemod:
- Supports 10 entities in Ember and Ember Data
- Accounts for TypeScript, `` tag, and route splitting
- Blazingly fast compared to Ember CLI
## Usage
Step 1. Quickly migrate.
```sh
cd
npx ember-codemod-add-missing-tests
```
Step 2. Review the package.
- [x] Fix format and lint errors.
- [x] Run the new integration and unit tests. Update assertions or skip tests as needed.
### Arguments
Optional: Specify the component structure
By default, an Octane project has the flat component structure. Pass `--component-structure` to indicate otherwise.
```sh
npx ember-codemod-add-missing-tests --component-structure nested
```
Optional: Specify the project root
Pass `--root` to run the codemod somewhere else (i.e. not in the current directory).
```sh
npx ember-codemod-add-missing-tests --root
```
Optional: Specify the test-app location
By default, the codemod creates tests in the package where it is run. Pass `--test-app-location` to override the logic.
```sh
npx ember-codemod-add-missing-tests --test-app-location ../../tests/my-v2-addon
```
### Limitations
The codemod is designed to cover typical cases. It is not designed to cover one-off cases.
To better meet your needs, consider cloning the repo and running the codemod locally.
```sh
cd
# Compile TypeScript
pnpm build
# Run codemod
./dist/bin/ember-codemod-add-missing-tests.js --root
```
## Compatibility
- Node.js v22 or above
## Contributing
See the [Contributing](CONTRIBUTING.md) guide for details.
## License
This project is licensed under the [MIT License](LICENSE.md).