File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
packages/@angular/cli/models/webpack-configs Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ export function getTestConfig(wco: WebpackConfigOptions<WebpackTestOptions>) {
48
48
}
49
49
50
50
return {
51
+ resolve : {
52
+ mainFields : [
53
+ ...( wco . supportES2015 ? [ 'es2015' ] : [ ] ) ,
54
+ 'browser' , 'module' , 'main'
55
+ ]
56
+ } ,
51
57
devtool : buildOptions . sourcemaps ? 'inline-source-map' : 'eval' ,
52
58
entry : {
53
59
main : path . resolve ( projectRoot , appConfig . root , appConfig . test )
Original file line number Diff line number Diff line change
1
+ import { ng } from '../../utils/process' ;
2
+ import { updateJsonFile } from '../../utils/project' ;
3
+
4
+ export default function ( ) {
5
+ return updateJsonFile ( 'tsconfig.json' , configJson => {
6
+ const compilerOptions = configJson [ 'compilerOptions' ] ;
7
+ compilerOptions [ 'target' ] = 'es2015' ;
8
+ } )
9
+ . then ( ( ) => updateJsonFile ( 'src/tsconfig.spec.json' , configJson => {
10
+ const compilerOptions = configJson [ 'compilerOptions' ] ;
11
+ compilerOptions [ 'target' ] = 'es2015' ;
12
+ } ) )
13
+ . then ( ( ) => ng ( 'test' , '--single-run' ) ) ;
14
+ }
You can’t perform that action at this time.
0 commit comments