From 1fd4dba7f859728d5dc6098c397f989b69074764 Mon Sep 17 00:00:00 2001 From: Florian Hartwich Date: Fri, 24 Mar 2017 06:22:36 +0100 Subject: [PATCH] Update ng cli; Add karma basic test setup without preprocessor --- .../{angular-cli.json => .angular-cli.json} | 34 ++++---- basic-cli/.gitignore | 40 --------- basic-cli/README.md | 9 +- basic-cli/_log.txt | 32 ------- basic-cli/e2e/app.e2e-spec.ts | 2 +- basic-cli/e2e/tsconfig.e2e.json | 12 +++ basic-cli/karma.conf.js | 25 +++--- basic-cli/package.json | 59 +++++++------ basic-cli/protractor.conf.js | 10 +-- basic-cli/src/app/app.component.spec.ts | 10 +-- basic-cli/src/environments/environment.ts | 2 +- basic-cli/src/main.ts | 7 +- basic-cli/src/polyfills.ts | 83 +++++++++++++++---- basic-cli/src/test.ts | 2 - basic-cli/src/tsconfig.app.json | 13 +++ basic-cli/src/tsconfig.json | 18 ---- basic-cli/src/tsconfig.spec.json | 20 +++++ basic-cli/src/typings.d.ts | 5 ++ basic-cli/{e2e => }/tsconfig.json | 14 ++-- basic-cli/tslint.json | 2 +- project-manager/angular-cli.json | 7 +- project-manager/karma.conf.js | 7 +- project-manager/package.json | 5 +- .../src/app/blog/blog.component.spec.ts | 13 +++ 24 files changed, 227 insertions(+), 204 deletions(-) rename basic-cli/{angular-cli.json => .angular-cli.json} (61%) delete mode 100644 basic-cli/.gitignore delete mode 100644 basic-cli/_log.txt create mode 100644 basic-cli/e2e/tsconfig.e2e.json create mode 100644 basic-cli/src/tsconfig.app.json delete mode 100644 basic-cli/src/tsconfig.json create mode 100644 basic-cli/src/tsconfig.spec.json create mode 100644 basic-cli/src/typings.d.ts rename basic-cli/{e2e => }/tsconfig.json (66%) create mode 100644 project-manager/src/app/blog/blog.component.spec.ts diff --git a/basic-cli/angular-cli.json b/basic-cli/.angular-cli.json similarity index 61% rename from basic-cli/angular-cli.json rename to basic-cli/.angular-cli.json index a255b05..5b57e8b 100644 --- a/basic-cli/angular-cli.json +++ b/basic-cli/.angular-cli.json @@ -1,6 +1,6 @@ { + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "project": { - "version": "1.0.0-beta.26", "name": "basic-cli" }, "apps": [ @@ -13,16 +13,17 @@ ], "index": "index.html", "main": "main.ts", + "polyfills": "polyfills.ts", "test": "test.ts", - "tsconfig": "tsconfig.json", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "tsconfig.spec.json", "prefix": "app", - "mobile": false, "styles": [ "styles.css" ], "scripts": [], + "environmentSource": "environments/environment.ts", "environments": { - "source": "environments/environment.ts", "dev": "environments/environment.ts", "prod": "environments/environment.prod.ts" } @@ -33,6 +34,17 @@ "config": "./protractor.conf.js" } }, + "lint": [ + { + "project": "src/tsconfig.app.json" + }, + { + "project": "src/tsconfig.spec.json" + }, + { + "project": "e2e/tsconfig.e2e.json" + } + ], "test": { "karma": { "config": "./karma.conf.js" @@ -40,18 +52,6 @@ }, "defaults": { "styleExt": "css", - "prefixInterfaces": false, - "inline": { - "style": false, - "template": false - }, - "spec": { - "class": false, - "component": true, - "directive": true, - "module": false, - "pipe": true, - "service": true - } + "component": {} } } diff --git a/basic-cli/.gitignore b/basic-cli/.gitignore deleted file mode 100644 index fe6f8a7..0000000 --- a/basic-cli/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/tmp - -# dependencies -/node_modules - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock -/coverage/* -/libpeerconnection.log -npm-debug.log -testem.log -/typings - -# e2e -/e2e/*.js -/e2e/*.map - -#System Files -.DS_Store -Thumbs.db diff --git a/basic-cli/README.md b/basic-cli/README.md index 92cfeac..6725d56 100644 --- a/basic-cli/README.md +++ b/basic-cli/README.md @@ -1,8 +1,9 @@ # BasicCli -This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.26. +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0. ## Development server + Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. ## Code scaffolding @@ -22,10 +23,6 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). Before running the tests make sure you are serving the app via `ng serve`. -## Deploying to GitHub Pages - -Run `ng github-pages:deploy` to deploy to GitHub Pages. - ## Further help -To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/basic-cli/_log.txt b/basic-cli/_log.txt deleted file mode 100644 index 383b337..0000000 --- a/basic-cli/_log.txt +++ /dev/null @@ -1,32 +0,0 @@ -hardi@linux-pih0:~/bachelor/basic-cli> ng init -installing ng2 - create .editorconfig - create README.md - create src/app/app.component.css - create src/app/app.component.html - create src/app/app.component.spec.ts - create src/app/app.component.ts - create src/app/app.module.ts - create src/assets/.gitkeep - create src/environments/environment.prod.ts - create src/environments/environment.ts - create src/favicon.ico - create src/index.html - create src/main.ts - create src/polyfills.ts - create src/styles.css - create src/test.ts - create src/tsconfig.json - create angular-cli.json - create e2e/app.e2e-spec.ts - create e2e/app.po.ts - create e2e/tsconfig.json - create .gitignore - create karma.conf.js - create package.json - create protractor.conf.js - create tslint.json -Directory is already under version control. Skipping initialization of git. -Installing packages for tooling via npm. -Installed packages for tooling via npm. -Project 'basic-cli' successfully created. diff --git a/basic-cli/e2e/app.e2e-spec.ts b/basic-cli/e2e/app.e2e-spec.ts index e4f400e..3cedf6a 100644 --- a/basic-cli/e2e/app.e2e-spec.ts +++ b/basic-cli/e2e/app.e2e-spec.ts @@ -1,6 +1,6 @@ import { BasicCliPage } from './app.po'; -describe('basic-cli App', function() { +describe('basic-cli App', () => { let page: BasicCliPage; beforeEach(() => { diff --git a/basic-cli/e2e/tsconfig.e2e.json b/basic-cli/e2e/tsconfig.e2e.json new file mode 100644 index 0000000..ac7a373 --- /dev/null +++ b/basic-cli/e2e/tsconfig.e2e.json @@ -0,0 +1,12 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/e2e", + "module": "commonjs", + "target": "es5", + "types":[ + "jasmine", + "node" + ] + } +} diff --git a/basic-cli/karma.conf.js b/basic-cli/karma.conf.js index 1f2613a..84b4cd5 100644 --- a/basic-cli/karma.conf.js +++ b/basic-cli/karma.conf.js @@ -4,35 +4,36 @@ module.exports = function (config) { config.set({ basePath: '', - frameworks: ['jasmine', 'angular-cli'], + frameworks: ['jasmine', '@angular/cli'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), - require('karma-remap-istanbul'), - require('angular-cli/plugins/karma') + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular/cli/plugins/karma') ], + client:{ + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, files: [ { pattern: './src/test.ts', watched: false } ], preprocessors: { - './src/test.ts': ['angular-cli'] + './src/test.ts': ['@angular/cli'] }, mime: { 'text/x-typescript': ['ts','tsx'] }, - remapIstanbulReporter: { - reports: { - html: 'coverage', - lcovonly: './coverage/coverage.lcov' - } + coverageIstanbulReporter: { + reports: [ 'html', 'lcovonly' ], + fixWebpackSourcePaths: true }, angularCli: { - config: './angular-cli.json', environment: 'dev' }, reporters: config.angularCli && config.angularCli.codeCoverage - ? ['progress', 'karma-remap-istanbul'] - : ['progress'], + ? ['progress', 'coverage-istanbul'] + : ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/basic-cli/package.json b/basic-cli/package.json index 424668f..eb78618 100644 --- a/basic-cli/package.json +++ b/basic-cli/package.json @@ -2,46 +2,45 @@ "name": "basic-cli", "version": "0.0.0", "license": "MIT", - "angular-cli": {}, "scripts": { "ng": "ng", "start": "ng serve", - "lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check", + "build": "ng build", "test": "ng test", - "pree2e": "webdriver-manager update --standalone false --gecko false", - "e2e": "protractor" + "lint": "ng lint", + "e2e": "ng e2e" }, "private": true, "dependencies": { - "@angular/common": "^2.3.1", - "@angular/compiler": "^2.3.1", - "@angular/core": "^2.3.1", - "@angular/forms": "^2.3.1", - "@angular/http": "^2.3.1", - "@angular/platform-browser": "^2.3.1", - "@angular/platform-browser-dynamic": "^2.3.1", - "@angular/router": "^3.3.1", + "@angular/common": "^4.0.0", + "@angular/compiler": "^4.0.0", + "@angular/core": "^4.0.0", + "@angular/forms": "^4.0.0", + "@angular/http": "^4.0.0", + "@angular/platform-browser": "^4.0.0", + "@angular/platform-browser-dynamic": "^4.0.0", + "@angular/router": "^4.0.0", "core-js": "^2.4.1", - "rxjs": "^5.0.1", - "ts-helpers": "^1.1.1", - "zone.js": "^0.7.2" + "rxjs": "^5.1.0", + "zone.js": "^0.8.4" }, "devDependencies": { - "@angular/compiler-cli": "^2.3.1", + "@angular/cli": "1.0.0", + "@angular/compiler-cli": "^4.0.0", "@types/jasmine": "2.5.38", - "@types/node": "^6.0.42", - "angular-cli": "1.0.0-beta.26", - "codelyzer": "~2.0.0-beta.1", - "jasmine-core": "2.5.2", - "jasmine-spec-reporter": "2.5.0", - "karma": "1.2.0", - "karma-chrome-launcher": "^2.0.0", - "karma-cli": "^1.0.1", - "karma-jasmine": "^1.0.2", - "karma-remap-istanbul": "^0.2.1", - "protractor": "~4.0.13", - "ts-node": "1.2.1", - "tslint": "^4.3.0", - "typescript": "~2.0.3" + "@types/node": "~6.0.60", + "codelyzer": "~2.0.0", + "jasmine-core": "~2.5.2", + "jasmine-spec-reporter": "~3.2.0", + "karma": "~1.4.1", + "karma-chrome-launcher": "~2.0.0", + "karma-cli": "~1.0.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "karma-coverage-istanbul-reporter": "^0.2.0", + "protractor": "~5.1.0", + "ts-node": "~2.0.0", + "tslint": "~4.5.0", + "typescript": "~2.2.0" } } diff --git a/basic-cli/protractor.conf.js b/basic-cli/protractor.conf.js index ffded70..1c5e1e5 100644 --- a/basic-cli/protractor.conf.js +++ b/basic-cli/protractor.conf.js @@ -1,8 +1,7 @@ // Protractor configuration file, see link for more information // https://github.com/angular/protractor/blob/master/lib/config.ts -/*global jasmine */ -var SpecReporter = require('jasmine-spec-reporter'); +const { SpecReporter } = require('jasmine-spec-reporter'); exports.config = { allScriptsTimeout: 11000, @@ -20,13 +19,12 @@ exports.config = { defaultTimeoutInterval: 30000, print: function() {} }, - useAllAngular2AppRoots: true, beforeLaunch: function() { require('ts-node').register({ - project: 'e2e' + project: 'e2e/tsconfig.e2e.json' }); }, - onPrepare: function() { - jasmine.getEnv().addReporter(new SpecReporter()); + onPrepare() { + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); } }; diff --git a/basic-cli/src/app/app.component.spec.ts b/basic-cli/src/app/app.component.spec.ts index 5be2cb3..c740bcd 100644 --- a/basic-cli/src/app/app.component.spec.ts +++ b/basic-cli/src/app/app.component.spec.ts @@ -1,17 +1,15 @@ -/* tslint:disable:no-unused-variable */ - import { TestBed, async } from '@angular/core/testing'; + import { AppComponent } from './app.component'; describe('AppComponent', () => { - beforeEach(() => { + beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ AppComponent ], - }); - TestBed.compileComponents(); - }); + }).compileComponents(); + })); it('should create the app', async(() => { const fixture = TestBed.createComponent(AppComponent); diff --git a/basic-cli/src/environments/environment.ts b/basic-cli/src/environments/environment.ts index 00313f1..b7f639a 100644 --- a/basic-cli/src/environments/environment.ts +++ b/basic-cli/src/environments/environment.ts @@ -1,7 +1,7 @@ // The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `angular-cli.json`. +// The list of which env maps to which file can be found in `.angular-cli.json`. export const environment = { production: false diff --git a/basic-cli/src/main.ts b/basic-cli/src/main.ts index ac78a71..a9ca1ca 100644 --- a/basic-cli/src/main.ts +++ b/basic-cli/src/main.ts @@ -1,9 +1,8 @@ -import './polyfills.ts'; - -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { enableProdMode } from '@angular/core'; -import { environment } from './environments/environment'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); diff --git a/basic-cli/src/polyfills.ts b/basic-cli/src/polyfills.ts index 4749399..53bdaf1 100644 --- a/basic-cli/src/polyfills.ts +++ b/basic-cli/src/polyfills.ts @@ -1,19 +1,68 @@ -// This file includes polyfills needed by Angular and is loaded before -// the app. You can add your own extra polyfills to this file. -import 'core-js/es6/symbol'; -import 'core-js/es6/object'; -import 'core-js/es6/function'; -import 'core-js/es6/parse-int'; -import 'core-js/es6/parse-float'; -import 'core-js/es6/number'; -import 'core-js/es6/math'; -import 'core-js/es6/string'; -import 'core-js/es6/date'; -import 'core-js/es6/array'; -import 'core-js/es6/regexp'; -import 'core-js/es6/map'; -import 'core-js/es6/set'; -import 'core-js/es6/reflect'; +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** IE10 and IE11 requires the following to support `@angular/animation`. */ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + + +/** Evergreen browsers require these. **/ +import 'core-js/es6/reflect'; import 'core-js/es7/reflect'; -import 'zone.js/dist/zone'; + + +/** ALL Firefox browsers require the following to support `@angular/animation`. **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + + + +/*************************************************************************************************** + * Zone JS is required by Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ + +/** + * Date, currency, decimal and percent pipes. + * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 + */ +// import 'intl'; // Run `npm install --save intl`. diff --git a/basic-cli/src/test.ts b/basic-cli/src/test.ts index 430d4df..9bf7226 100644 --- a/basic-cli/src/test.ts +++ b/basic-cli/src/test.ts @@ -1,7 +1,5 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -import './polyfills.ts'; - import 'zone.js/dist/long-stack-trace-zone'; import 'zone.js/dist/proxy.js'; import 'zone.js/dist/sync-test'; diff --git a/basic-cli/src/tsconfig.app.json b/basic-cli/src/tsconfig.app.json new file mode 100644 index 0000000..5e2507d --- /dev/null +++ b/basic-cli/src/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "module": "es2015", + "baseUrl": "", + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/basic-cli/src/tsconfig.json b/basic-cli/src/tsconfig.json deleted file mode 100644 index 1cf713a..0000000 --- a/basic-cli/src/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": "", - "declaration": false, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "lib": ["es6", "dom"], - "mapRoot": "./", - "module": "es6", - "moduleResolution": "node", - "outDir": "../dist/out-tsc", - "sourceMap": true, - "target": "es5", - "typeRoots": [ - "../node_modules/@types" - ] - } -} diff --git a/basic-cli/src/tsconfig.spec.json b/basic-cli/src/tsconfig.spec.json new file mode 100644 index 0000000..510e3f1 --- /dev/null +++ b/basic-cli/src/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "module": "commonjs", + "target": "es5", + "baseUrl": "", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/basic-cli/src/typings.d.ts b/basic-cli/src/typings.d.ts new file mode 100644 index 0000000..ef5c7bd --- /dev/null +++ b/basic-cli/src/typings.d.ts @@ -0,0 +1,5 @@ +/* SystemJS module definition */ +declare var module: NodeModule; +interface NodeModule { + id: string; +} diff --git a/basic-cli/e2e/tsconfig.json b/basic-cli/tsconfig.json similarity index 66% rename from basic-cli/e2e/tsconfig.json rename to basic-cli/tsconfig.json index 656bdb1..a35a8ee 100644 --- a/basic-cli/e2e/tsconfig.json +++ b/basic-cli/tsconfig.json @@ -1,16 +1,20 @@ { "compileOnSave": false, "compilerOptions": { + "outDir": "./dist/out-tsc", + "baseUrl": "src", + "sourceMap": true, "declaration": false, + "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, - "module": "commonjs", - "moduleResolution": "node", - "outDir": "../dist/out-tsc-e2e", - "sourceMap": true, "target": "es5", "typeRoots": [ - "../node_modules/@types" + "node_modules/@types" + ], + "lib": [ + "es2016", + "dom" ] } } diff --git a/basic-cli/tslint.json b/basic-cli/tslint.json index 86bc184..9113f13 100644 --- a/basic-cli/tslint.json +++ b/basic-cli/tslint.json @@ -46,7 +46,7 @@ "no-empty": false, "no-empty-interface": true, "no-eval": true, - "no-inferrable-types": true, + "no-inferrable-types": [true, "ignore-params"], "no-shadowed-variable": true, "no-string-literal": false, "no-string-throw": true, diff --git a/project-manager/angular-cli.json b/project-manager/angular-cli.json index 074fb1a..0ee7bb7 100644 --- a/project-manager/angular-cli.json +++ b/project-manager/angular-cli.json @@ -29,8 +29,8 @@ "../node_modules/jquery-ui-bundle/jquery-ui.js", "../node_modules/bootstrap/dist/js/bootstrap.min.js" ], + "environmentSource": "environments/environment.ts", "environments": { - "source": "environments/environment.ts", "dev": "environments/environment.ts", "prod": "environments/environment.prod.ts", "e2e": "environments/environment.e2e.ts" @@ -44,6 +44,11 @@ "config": "./protractor.conf.js" } }, + "test": { + "karma": { + "config": "./karma.conf.js" + } + }, "defaults": { "styleExt": "css", "prefixInterfaces": false, diff --git a/project-manager/karma.conf.js b/project-manager/karma.conf.js index 3ad846f..b6f8b62 100644 --- a/project-manager/karma.conf.js +++ b/project-manager/karma.conf.js @@ -1,5 +1,5 @@ // Karma configuration -// Generated on Thu Mar 23 2017 04:57:32 GMT+0100 (CET) +// Generated on Thu Mar 2 2017 04:57:32 GMT+0100 (CET) module.exports = function(config) { config.set({ @@ -15,7 +15,7 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ - { pattern: 'src/**/test.ts' } + { pattern: 'src/**/*.spec.ts' } ], @@ -31,7 +31,6 @@ module.exports = function(config) { ], - // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { @@ -41,7 +40,7 @@ module.exports = function(config) { // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], + reporters: ['spec'], // web server port diff --git a/project-manager/package.json b/project-manager/package.json index 79f9f95..3166e22 100644 --- a/project-manager/package.json +++ b/project-manager/package.json @@ -37,15 +37,18 @@ "zone.js": "^0.7.2" }, "devDependencies": { + "@angular/cli": "^1.0.0", "@angular/compiler-cli": "^2.4.3", "@types/jasmine": "2.5.38", "@types/node": "^6.0.42", "@types/socket.io-client": "^1.4.26", - "angular-cli": "1.0.0-beta.25.5", "codelyzer": "~2.0.0-beta.1", "concurrently": "^2.0.0", "jasmine": "^2.5.3", "karma": "^1.5.0", + "karma-chrome-launcher": "^2.0.0", + "karma-jasmine": "^1.1.0", + "karma-spec-reporter": "0.0.30", "ts-node": "1.2.1", "tslint": "^4.3.0", "typescript": "~2.0.3" diff --git a/project-manager/src/app/blog/blog.component.spec.ts b/project-manager/src/app/blog/blog.component.spec.ts new file mode 100644 index 0000000..e067a7b --- /dev/null +++ b/project-manager/src/app/blog/blog.component.spec.ts @@ -0,0 +1,13 @@ +describe("Blog Component", () => { + + it("should succeed on basic logic check", () => { + expect(1+1).toEqual(2); + expect(true).toBe(true) + }) + + it("should fail on basic logic check error", () => { + expect(1+1).toEqual(2); + expect(true).toBe(false) + }) + +})