1.0.3 • Published 4 years ago
angular-unit-test-generator v1.0.3
Description
Generating unit test template for entity based on static information of entity file. Include generating:
- spy imports
- spy declaration
- spy initialization
- creating sut
- describes for public methods
Support:
- jest
- jasmine
Installing
npm i -g angular-unit-test-generator
OR
yarn global add angular-unit-test-generator
Using
After installation, go to folder with entity, which you want to test.
For example, entity - flows.service.ts
Run command - aug flows.service.ts
As a result, file flows.service.spec.ts will be generated
Examples
Go to examples - link
Config
Package can be configured by config in root of project - aug.json
Fields:
- spyUtilsPath
- Description - ES6 import for providing SpyObj and createSpyObj utils
- Default value - angular-unit-test-generator/testing-utils/jest