angular-unit-test-generator

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i angular-unit-test-generator

Weekly Downloads

14

Version

1.0.3

License

MIT

Unpacked Size

36.3 kB

Total Files

21

Last publish

Collaborators

  • vkotliar1