PhoneCat Tutorial App
- Environment Setup
Install Git - http://git-scm.com/download
Install Node.js - https://nodejs.org/en/download
node --version - Node.js v4+
git clone --depth=16 https://github.com/angular/angular-phonecat.git
cd angular-phonecat
-
npm install
This command reads angular-phonecat's package.json file and downloads the following tools into the node_modules directory:
-
Bower - client-side code package manager
-
Http-Server - simple local static web server
-
Karma - unit test runner
-
Protractor - end-to-end (E2E) test runner
Running npm install will also automatically use bower to download the AngularJS framework into the app/bower_components directory.
npm install -g bower -> bower install
npm start -> Running the Development Web Server
-
Running Unit Tests
npm test
Karma - https://karma-runner.github.io/1.0/index.html
app/phone-list.component.spec.js
describe('phoneList', function() {
// Load the module that contains the `phoneList` component before each test
beforeEach(module('phonecatApp'));
// Test the controller
describe('PhoneListController', function() {
it('should create a `phones` model with 3 phones', inject(function($componentController) {
var ctrl = $componentController('phoneList');
expect(ctrl.phones.length).toBe(3);
})); }); });
-
Running E2E Tests
The E2E tests are kept in the e2e-tests directory.
cd e2e-tests
npm run update-webdriver
npm start
npm run protractor - seperate terminal/command
protractor.conf.js
scenarios.js
'Frontend > angularjs' 카테고리의 다른 글
[Hoon] AngularJS Seed - the seed for AngularJS apps (0) | 2019.01.04 |
---|---|
[Hoon] AngularJS - Angularjs Tutorial (0) | 2019.01.04 |
[Hoon] AngularJS - Componets, Directives, Localization Example (0) | 2018.12.31 |
[Hoon] AngularJS - Create Components (0) | 2018.12.31 |
[Hoon] AngularJS - The AngularJS (0) | 2018.12.31 |
댓글