@@ -9,7 +9,12 @@ const gls = require("gulp-live-server");
9
9
10
10
const debugProject = tsb . create ( "tsconfig.json" ) ;
11
11
const releaseProject = tsb . create ( "tsconfig-release.json" ) ;
12
- const tests = tsb . create ( "test/tsconfig.json" ) ;
12
+ const tests = {
13
+ full : tsb . create ( "test/full/tsconfig.json" ) ,
14
+ lite : tsb . create ( "test/lite/tsconfig.json" ) ,
15
+ "no-conflict" : tsb . create ( "test/no-conflict/tsconfig.json" ) ,
16
+ registry : tsb . create ( "test/registry/tsconfig.json" ) ,
17
+ } ;
13
18
14
19
let project = debugProject ;
15
20
@@ -30,10 +35,32 @@ gulp.task("build:reflect", () => gulp
30
35
. pipe ( project ( ) )
31
36
. pipe ( gulp . dest ( "." ) ) ) ;
32
37
33
- gulp . task ( "build:tests" , [ "build:reflect" ] , ( ) => gulp
34
- . src ( [ "test/**/*.ts" ] )
35
- . pipe ( tests ( ) )
36
- . pipe ( gulp . dest ( "test" ) ) ) ;
38
+ gulp . task ( "build:tests:full" , [ "build:reflect" ] , ( ) => gulp
39
+ . src ( [ "test/full/**/*.ts" ] )
40
+ . pipe ( tests . full ( ) )
41
+ . pipe ( gulp . dest ( "test/full" ) ) ) ;
42
+
43
+ gulp . task ( "build:tests:lite" , [ "build:reflect" ] , ( ) => gulp
44
+ . src ( [ "test/lite/**/*.ts" ] )
45
+ . pipe ( tests . lite ( ) )
46
+ . pipe ( gulp . dest ( "test/lite" ) ) ) ;
47
+
48
+ gulp . task ( "build:tests:no-conflict" , [ "build:reflect" ] , ( ) => gulp
49
+ . src ( [ "test/no-conflict/**/*.ts" ] )
50
+ . pipe ( tests [ "no-conflict" ] ( ) )
51
+ . pipe ( gulp . dest ( "test/no-conflict" ) ) ) ;
52
+
53
+ gulp . task ( "build:tests:registry" , [ "build:reflect" ] , ( ) => gulp
54
+ . src ( [ "test/registry/**/*.ts" ] )
55
+ . pipe ( tests . registry ( ) )
56
+ . pipe ( gulp . dest ( "test/registry" ) ) ) ;
57
+
58
+ gulp . task ( "build:tests" , [
59
+ "build:tests:full" ,
60
+ "build:tests:lite" ,
61
+ "build:tests:no-conflict" ,
62
+ "build:tests:registry"
63
+ ] ) ;
37
64
38
65
gulp . task ( "build:spec" , ( ) => gulp
39
66
. src ( [ "spec.html" ] )
@@ -55,31 +82,37 @@ gulp.task("use-polyfill", () => {
55
82
process . env [ "REFLECT_METADATA_USE_MAP_POLYFILL" ] = "true" ;
56
83
} ) ;
57
84
58
- gulp . task ( "test:full" , [ "build:tests" , "no-polyfill" ] , ( ) => {
85
+ gulp . task ( "test:full" , [ "build:tests:full " , "no-polyfill" ] , ( ) => {
59
86
console . log ( "Running tests w/o polyfill..." ) ;
60
87
return gulp
61
88
. src ( [ "test/full/**/*.js" ] , { read : false } )
62
89
. pipe ( mocha ( { reporter : "dot" } ) ) ;
63
90
} ) ;
64
- gulp . task ( "test:lite" , [ "build:tests" , "no-polyfill" ] , ( ) => {
91
+ gulp . task ( "test:lite" , [ "build:tests:lite " , "no-polyfill" ] , ( ) => {
65
92
console . log ( "Running lite-mode tests w/o polyfill..." ) ;
66
93
return gulp
67
94
. src ( [ "test/lite/**/*.js" ] , { read : false } )
68
95
. pipe ( mocha ( { reporter : "dot" } ) ) ;
69
96
} ) ;
70
- gulp . task ( "test:no-conflict" , [ "build:tests" , "no-polyfill" ] , ( ) => {
97
+ gulp . task ( "test:no-conflict" , [ "build:tests:no-conflict " , "no-polyfill" ] , ( ) => {
71
98
console . log ( "Running no-conflict-mode tests w/o polyfill..." ) ;
72
99
return gulp
73
100
. src ( [ "test/no-conflict/**/*.js" ] , { read : false } )
74
101
. pipe ( mocha ( { reporter : "dot" } ) ) ;
75
102
} ) ;
76
- gulp . task ( "test:use-polyfill" , [ "build:tests" , "use-polyfill" ] , ( ) => {
103
+ gulp . task ( "test:registry" , [ "build:tests:registry" , "no-polyfill" ] , ( ) => {
104
+ console . log ( "Running registry..." ) ;
105
+ return gulp
106
+ . src ( [ "test/registry/**/*.js" ] , { read : false } )
107
+ . pipe ( mocha ( { reporter : "dot" } ) ) ;
108
+ } ) ;
109
+ gulp . task ( "test:use-polyfill" , [ "build:tests:full" , "use-polyfill" ] , ( ) => {
77
110
console . log ( "Running tests w/ polyfill..." ) ;
78
111
return gulp
79
112
. src ( [ "test/full/**/*.js" ] , { read : false } )
80
113
. pipe ( mocha ( { reporter : "dot" } ) ) ;
81
114
} ) ;
82
- gulp . task ( "test" , sequence ( "test:full" , "test:lite" , "test:no-conflict" , "test:use-polyfill" ) ) ;
115
+ gulp . task ( "test" , sequence ( "test:full" , "test:lite" , "test:no-conflict" , "test:registry" , "test: use-polyfill") ) ;
83
116
84
117
85
118
gulp . task ( "watch:reflect" , ( ) => gulp . watch ( [
0 commit comments