Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(tests): modify test configuration for speed
Browse files Browse the repository at this point in the history
  • Loading branch information
dgutride authored and joshuawilson committed Mar 23, 2017
1 parent 122051f commit 0164fd1
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 16 deletions.
37 changes: 21 additions & 16 deletions config/webpack.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,14 @@ sassModules.forEach(function (val) {
module.exports = function (options) {
return {

entry: {
'app': './src/main.browser.ts'
},

/**
* Source map for Karma from the help of karma-sourcemap-loader & karma-webpack
*
* Do not change, leave as is or it wont work.
* See: https://github.com/webpack/karma-webpack#source-maps
*/
devtool: 'inline-source-map',
// remove for speed - can enable when debugging or running in a browser
//devtool: 'inline-source-map',

/**
* Options affecting the resolving of modules.
Expand Down Expand Up @@ -105,15 +102,16 @@ module.exports = function (options) {
*
* See: https://github.com/webpack/source-map-loader
*/
{
test: /\.js$/,
use: ['source-map-loader'],
exclude: [
// these packages have problems with their sourcemaps
path.resolve(__dirname, 'node_modules/rxjs'),
path.resolve(__dirname, 'node_modules/@angular')
]
},
// js sourcemaps disabled for performance, can be enabled for debugging
// {
// test: /\.js$/,
// use: ['source-map-loader'],
// exclude: [
// // these packages have problems with their sourcemaps
// path.resolve(__dirname, 'node_modules/rxjs'),
// path.resolve(__dirname, 'node_modules/@angular')
// ]
// },

/**
* Typescript loader support for .ts and Angular 2 async routes via .async.ts
Expand All @@ -123,8 +121,15 @@ module.exports = function (options) {
{
test: /\.ts$/,
use: [
'awesome-typescript-loader',
'angular2-template-loader'
{
loader: "awesome-typescript-loader",
options: {
configFileName: 'tsconfig-test.json'
}
},
{
loader: "angular2-template-loader"
}
],
exclude: [/\.e2e\.ts$/]
},
Expand Down
56 changes: 56 additions & 0 deletions tsconfig-test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"stripInternal": true,
"skipLibCheck": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": false,
"inlineSources": false,
"noEmitHelpers": false,
"strictNullChecks": false,
"removeComments": false,
"noImplicitAny": false,
"allowUnreachableCode": false,
"baseUrl": ".",
"rootDir": ".",
"outDir": "dist",
"noEmit": true,
"paths": {
"@angular/common": ["node_modules/@angular/common"],
"@angular/forms": ["node_modules/@angular/forms"],
"rxjs/*": ["node_modules/rxjs/*"]
},
"lib": [
"es2015",
"dom"
]
},
"files": [
"index.ts"
],
"exclude": [
"node_modules",
"**/*.spec.ts",
"dist"
],
"awesomeTypescriptLoaderOptions": {
"forkChecker": true,
"useWebpackText": true,
"useCache": true
},
"angularCompilerOptions": {
"strictMetadataEmit": true,
"skipTemplateCodegen": true,
"genDir": "./ngfactory"
},
"compileOnSave": false,
"buildOnSave": false,
"atom": { "rewriteTsconfig": false }
}


0 comments on commit 0164fd1

Please sign in to comment.