Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onechiporenko/ember-cli-test-generators
Some blueprints for unit-tests.
https://github.com/onechiporenko/ember-cli-test-generators
Last synced: about 1 month ago
JSON representation
Some blueprints for unit-tests.
- Host: GitHub
- URL: https://github.com/onechiporenko/ember-cli-test-generators
- Owner: onechiporenko
- License: mit
- Created: 2018-06-28T18:41:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-27T17:35:24.000Z (4 months ago)
- Last Synced: 2024-10-17T16:46:35.080Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 235 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ember-cli-test-generators
[![Build Status](https://travis-ci.org/onechiporenko/ember-cli-test-generators.svg?branch=master)](https://travis-ci.org/onechiporenko/ember-cli-test-generators)
[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/onechiporenko/ember-cli-test-generators/master)](https://stryker-mutator.github.io)## About
Some blueprints for unit-tests.
## Install
```bash
ember i ember-cli-test-generators
```## Usage
For `ember-data`:
Test `belongs-to` relationship:
```bash
ember g test-model-belongs-to user:team --related=team --inverse=users
```Test `has-many` relationship:
```bash
ember g test-model-has-many team:users --related=user --inverse=team
```For `ember-data` with `ember-cp-validations`:
Test `confirmation` validation:
```bash
ember g test-model-attr-cpv-confirmation user:password --on=passwordConfirmation
```Test `length` validation:
```bash
ember g test-model-attr-cpv-length user:password --min=10
```Test `number` validation:
```bash
ember g test-model-attr-cpv-number user:age --min=10
```Check tests for more examples.