File tree Expand file tree Collapse file tree 10 files changed +111
-2
lines changed
test/execution-tests/3.5.0-dev.0_incremental Expand file tree Collapse file tree 10 files changed +111
-2
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,18 @@ function findConfigFile(
125
125
export function getConfigParseResult (
126
126
compiler : typeof typescript ,
127
127
configFile : ConfigFile ,
128
- basePath : string
128
+ basePath : string ,
129
+ configFilePath : string | undefined
129
130
) {
130
131
const configParseResult = compiler . parseJsonConfigFileContent (
131
132
configFile . config ,
132
133
compiler . sys ,
133
134
basePath
134
135
) ;
136
+ // set internal options.configFilePath flag on options to denote that we read this from a file
137
+ configParseResult . options = Object . assign ( { } , configParseResult . options , {
138
+ configFilePath
139
+ } ) ;
135
140
136
141
return configParseResult ;
137
142
}
Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ function successfulTypeScriptInstance(
99
99
const configParseResult = getConfigParseResult (
100
100
compiler ,
101
101
configFile ,
102
- basePath
102
+ basePath ,
103
+ configFilePath
103
104
) ;
104
105
105
106
if ( configParseResult . errors . length > 0 && ! loaderOptions . happyPackMode ) {
Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-var, strict */
2
+ 'use strict' ;
3
+ var webpackConfig = require ( './webpack.config.js' ) ;
4
+ var makeKarmaConfig = require ( '../../karmaConfig' ) ;
5
+
6
+ module . exports = function ( config ) {
7
+ config . set (
8
+ makeKarmaConfig ( {
9
+ config,
10
+ webpackConfig,
11
+ files : [
12
+ // This ensures we have the es6 shims in place from babel and then loads all the tests
13
+ 'main.js'
14
+ ]
15
+ } )
16
+ ) ;
17
+ } ;
Original file line number Diff line number Diff line change
1
+ const testsContext = require . context ( './' , true , / \. t e s t s \. t s ( x ? ) $ / ) ;
2
+ testsContext . keys ( ) . forEach ( testsContext ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " 3.5.0_incremental" ,
3
+ "license" : " MIT" ,
4
+ "version" : " 1.0.0" ,
5
+ "main" : " index.js" ,
6
+ "devDependencies" : {
7
+ "@types/jasmine" : " ^2.5.35" ,
8
+ "jasmine-core" : " ^2.3.4"
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ class Foo {
2
+ private message : string ;
3
+ constructor ( ) {
4
+ this . message = 'hello world' ;
5
+ }
6
+ public write ( ) {
7
+ // tslint:disable-next-line:no-console
8
+ console . log ( this . message ) ;
9
+ }
10
+ }
11
+ export default Foo ;
Original file line number Diff line number Diff line change
1
+ import main from '../src/main' ;
2
+
3
+ describe ( "main" , ( ) => {
4
+ it ( "should compile successfully" , ( ) => {
5
+ // blank expectation, actual failure is in build
6
+ expect ( main ) . not . toBeNull ( ) ;
7
+ } ) ;
8
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "noEmitOnError" : true ,
4
+ "noErrorTruncation" : true ,
5
+ "incremental" : true ,
6
+ "outDir" : " ./dist" ,
7
+ "target" : " es5" ,
8
+ "module" : " es6"
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-var, strict, prefer-arrow-callback */
2
+ 'use strict' ;
3
+
4
+ var path = require ( 'path' ) ;
5
+ var webpack = require ( 'webpack' ) ;
6
+ var path = require ( 'path' ) ;
7
+
8
+ module . exports = {
9
+ mode : 'development' ,
10
+ entry : './src/main.ts' ,
11
+ output : {
12
+ filename : 'bundle.js'
13
+ } ,
14
+ module : {
15
+ rules : [ {
16
+ test : / \. t s ( x ? ) $ / ,
17
+ exclude : / n o d e _ m o d u l e s / ,
18
+ use : [ {
19
+ loader : 'ts-loader' ,
20
+ } ]
21
+ } ]
22
+ } ,
23
+ resolve : {
24
+ // Add `.ts` and `.tsx` as a resolvable extension.
25
+ extensions : [ '.ts' , '.tsx' , '.js' ]
26
+ } ,
27
+ } ;
28
+
29
+ // for test harness purposes only, you would not need this in a normal project
30
+ module . exports . resolveLoader = {
31
+ alias : {
32
+ 'ts-loader' : path . join ( __dirname , "../../../index.js" )
33
+ }
34
+ }
Original file line number Diff line number Diff line change
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
5
+ " @types/jasmine@^2.5.35 " :
6
+ version "2.8.16"
7
+ resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.16.tgz#a6cb24b1149d65293bd616923500014838e14e7d"
8
+
9
+ jasmine-core@^2.3.4 :
10
+ version "2.99.1"
11
+ resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15"
You can’t perform that action at this time.
0 commit comments