@@ -33,44 +33,44 @@ function importDefinitelyTypedTest(testCaseName: string, testFiles: string[], re
3333 fs . mkdirSync ( testDirectoryPath ) ;
3434
3535 child_process . exec ( cmd , {
36- maxBuffer : 1 * 1024 * 1024 ,
37- cwd : testDirectoryPath
38- } , ( error , stdout , stderr ) => {
39- // console.log("importing " + testCaseName + " ...");
40- // console.log(cmd);
41-
42- if ( error ) {
43- console . log ( "importing " + testCaseName + " ..." ) ;
44- console . log ( cmd ) ;
45- console . log ( "==> error " + JSON . stringify ( error ) ) ;
46- console . log ( "==> stdout " + String ( stdout ) ) ;
47- console . log ( "==> stderr " + String ( stderr ) ) ;
48- console . log ( "\r\n" ) ;
49- return ;
50- }
51-
52- // copy generated file to output location
53- var outputFilePath = path . join ( testDirectoryPath , "iocapture0.json" ) ;
54- var testCasePath = path . join ( rwcTestPath , "DefinitelyTyped_" + testCaseName + ".json" ) ;
55- copyFileSync ( outputFilePath , testCasePath ) ;
56-
57- //console.log("output generated at: " + outputFilePath);
58-
59- if ( ! fs . existsSync ( testCasePath ) ) {
60- throw new Error ( "could not find test case at: " + testCasePath ) ;
61- }
62- else {
63- fs . unlinkSync ( outputFilePath ) ;
64- fs . rmdirSync ( testDirectoryPath ) ;
65- //console.log("testcase generated at: " + testCasePath);
66- //console.log("Done.");
67- }
68- //console.log("\r\n");
69-
70- } )
71- . on ( 'error' , function ( error ) {
72- console . log ( "==> error " + JSON . stringify ( error ) ) ;
73- console . log ( "\r\n" ) ;
36+ maxBuffer : 1 * 1024 * 1024 ,
37+ cwd : testDirectoryPath
38+ } , ( error , stdout , stderr ) => {
39+ console . log ( "importing " + testCaseName + " ..." ) ;
40+ console . log ( cmd ) ;
41+
42+ if ( error ) {
43+ console . log ( "importing " + testCaseName + " ..." ) ;
44+ console . log ( cmd ) ;
45+ console . log ( "==> error " + JSON . stringify ( error ) ) ;
46+ console . log ( "==> stdout " + String ( stdout ) ) ;
47+ console . log ( "==> stderr " + String ( stderr ) ) ;
48+ console . log ( "\r\n" ) ;
49+ return ;
50+ }
51+
52+ // copy generated file to output location
53+ var outputFilePath = path . join ( testDirectoryPath , "iocapture0.json" ) ;
54+ var testCasePath = path . join ( rwcTestPath , "DefinitelyTyped_" + testCaseName + ".json" ) ;
55+ copyFileSync ( outputFilePath , testCasePath ) ;
56+
57+ //console.log("output generated at: " + outputFilePath);
58+
59+ if ( ! fs . existsSync ( testCasePath ) ) {
60+ throw new Error ( "could not find test case at: " + testCasePath ) ;
61+ }
62+ else {
63+ fs . unlinkSync ( outputFilePath ) ;
64+ fs . rmdirSync ( testDirectoryPath ) ;
65+ //console.log("testcase generated at: " + testCasePath);
66+ //console.log("Done.");
67+ }
68+ //console.log("\r\n");
69+
70+ } )
71+ . on ( 'error' , function ( error ) {
72+ console . log ( "==> error " + JSON . stringify ( error ) ) ;
73+ console . log ( "\r\n" ) ;
7474 } ) ;
7575}
7676
@@ -79,7 +79,8 @@ function importDefinitelyTypedTests(definitelyTypedRoot: string): void {
7979 if ( err ) throw err ;
8080
8181 subDirectorys
82- . filter ( d => [ "_infrastructure" , "node_modules" , ".git" ] . indexOf ( d ) >= 0 )
82+ . filter ( d => [ "_infrastructure" , "node_modules" , ".git" ] . indexOf ( d ) < 0 )
83+ . filter ( i => i . indexOf ( "sipml" ) >= 0 )
8384 . filter ( i => fs . statSync ( path . join ( definitelyTypedRoot , i ) ) . isDirectory ( ) )
8485 . forEach ( d => {
8586 var directoryPath = path . join ( definitelyTypedRoot , d ) ;
0 commit comments