Skip to content
IvayloG edited this page Mar 16, 2018 · 5 revisions

Introduced in Ignite UI CLI v1.3.0

ig test

Overview

ig test executes the tests for the current project.

The command can be used for jQuery, Angular and React projects and it will run the corresponding testing setup. Each framework has a different test environment configured, based on the technology and the community preferences.

Arguments

e2e

e2e default value: false

The optional flag to use for executing end-to-end tests, where applicable.

Test environment and setup

Below is a schematic of what testing setup/libraries are used based on framework and project types.

Framework Test Setup Tests Location
jQuery Karma and QUnit setup. Currently there is an illustrative QUnit test.
Run unit tests via ig test
Runs all .spec.js files in test folder.
Angular (igx-ts) Includes default Karma and Protractor setup. Run end-to-end testing when passing --e2e flag. Currently there is a test for each component, so when adding a component via igniteui-cli, it will come with it's test and it will be executed upon running ig test.
Run unit tests via ig test
Run e2e tests via ig test --e2e
Runs all .spec.ts files under ./src folder. All .e2e-spec.ts files under e2e folder.
Angular Wrappers (ig-ts) Includes Karma , Jasmine and Webpack test setup. Currently there is a test for each component, so when adding a component via igniteui-cli, it will come with it's test and it will be executed upon running ig test.
Run unit tests via ig test
Runs all .spec.ts files under ./src folder.
React Includes Jest and Enzyme test setup. Currently there are several general tests illustrating the use of ReactDOM and Enzyme.shallow.
Run unit tests via ig test
Runs all .spec.js/jsx and .test.js/jsx files under __tests__ folder.