diff --git a/karma.conf.js b/karma.conf.js index ccc4f2e193..43ad307a3c 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -99,7 +99,7 @@ module.exports = function(config) { logLevel: config.LOG_INFO, // enable / disable watching file and executing tests whenever any file changes - autoWatch: false, + //autoWatch: true, /* * start these browsers @@ -136,7 +136,7 @@ module.exports = function(config) { * Continuous Integration mode * if true, Karma captures browsers, runs the tests and exits */ - singleRun: true + //singleRun: true }; if (process.env.TRAVIS){ diff --git a/package.json b/package.json index 292e8ccb89..237bc43133 100644 --- a/package.json +++ b/package.json @@ -50,14 +50,14 @@ "debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --config webpack.prod.config.ts", "docs": "typedoc --options typedoc.json ./src", "lint": "tslint \"src/**/*.ts\" || true", - "global": "npm install -g angular-cli nodemon npm-check-updates rimraf ts-node typedoc typescript webpack webpack-bundle-size-analyzer rollup marked node-gyp protractor", - "postglobal": "npm link protractor", - "protractor": "protractor", + "global": "npm install -g angular-cli nodemon npm-check-updates rimraf ts-node typedoc typescript webpack webpack-bundle-size-analyzer rollup marked node-gyp", + "protractor": "node node_modules/protractor/bin/protractor", "e2e": "npm run protractor", - "test": "karma start", + "test": "karma start --single-run", + "test:watch": "karma start --no-single-run --auto-watch", "coverage": "http-server -c-1 -o -p 9875 ./coverage", - "webdriver:start": "webdriver-manager start --seleniumPort 4444", - "webdriver:update": "webdriver-manager update --standalone" + "webdriver:start": "node node_modules/protractor/bin/webdriver-manager start --seleniumPort 4444", + "webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone" }, "dependencies": { "@angular/common": "2.2.3", @@ -140,6 +140,7 @@ "karma-webpack": "1.8.0", "node-sass": "4.0.0", "nodemon": "1.11.0", + "protractor": "~4.0.14", "protractor-istanbul-plugin": "~2.0.0", "raw-loader": "0.5.1", "reflect-metadata": "0.1.8", @@ -159,10 +160,10 @@ "typedoc": "0.5.1", "typescript": "2.0.10", "v8-lazy-parse-webpack-plugin": "0.3.0", - "webpack": "2.1.0-beta.27", + "webpack": "2.2.0-rc.3", "webpack-bundle-analyzer": "1.4.1", "webpack-dev-middleware": "1.9.0", - "webpack-dev-server": "2.1.0-beta.11", + "webpack-dev-server": "2.2.0-rc.0", "webpack-merge": "1.1.1" } } diff --git a/spec-bundle.js b/spec-bundle.js index 45954f4088..36026d530f 100644 --- a/spec-bundle.js +++ b/spec-bundle.js @@ -47,7 +47,7 @@ testing.TestBed.initTestEnvironment( * any file that ends with spec.ts and get its path. By passing in true * we say do this recursively */ -var testContext = require.context('./src/tests', true, /\.spec\.ts/); +var testContext = require.context('./src', true, /\.spec\.ts/); /* * get all the files, for each file, call the context function diff --git a/src/tests/app.component.spec.ts b/src/app/app.component.spec.ts similarity index 91% rename from src/tests/app.component.spec.ts rename to src/app/app.component.spec.ts index d69b35850d..4f53b0ba93 100644 --- a/src/tests/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -15,8 +15,8 @@ import { Store } from "@ngrx/store"; // Load the implementations that should be tested -import { AppComponent } from '../app/app.component'; -import { HeaderComponent } from '../app/header/header.component'; +import { AppComponent } from './app.component'; +import { HeaderComponent } from './header/header.component'; import { CommonModule } from '@angular/common'; diff --git a/src/tests/.gitkeep b/src/tests/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/webpack.config.ts b/webpack.config.ts index 1d4b927e13..e6128264b1 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -67,6 +67,11 @@ export var commonConfig = { } ], }, + + performance: { + hints: false + }, + plugins: [ // Use commonPlugins. ] diff --git a/webpack.test.config.js b/webpack.test.config.js index cd288ce894..4f3530e8de 100644 --- a/webpack.test.config.js +++ b/webpack.test.config.js @@ -166,6 +166,10 @@ module.exports = function (options) { ] }, + performance: { + hints: false + }, + /** * Add additional plugins to the compiler. *