From 14b608241dad8212b374e7529876a6d29dba35e8 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Sep 2015 12:52:33 -0700 Subject: [PATCH] Tests when the .ts and .js files are mixed in compilation with tscconfig file doesnt specifying any names --- ...ileCompilationDifferentNamesNotSpecified.json | 16 ++++++++++++++++ .../amd/test.d.ts | 2 ++ .../amd/test.js | 2 ++ ...ileCompilationDifferentNamesNotSpecified.json | 16 ++++++++++++++++ .../node/test.d.ts | 2 ++ .../node/test.js | 2 ++ ...ileCompilationDifferentNamesNotSpecified.json | 7 +++++++ .../DifferentNamesNotSpecified/a.ts | 1 + .../DifferentNamesNotSpecified/b.js | 1 + .../DifferentNamesNotSpecified/tsconfig.json | 3 +++ 10 files changed, 52 insertions(+) create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts create mode 100644 tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js create mode 100644 tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js create mode 100644 tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 0000000000..7a7e0b2c45 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecified/a.ts", + "DifferentNamesNotSpecified/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts new file mode 100644 index 0000000000..bbae04a30b --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.d.ts @@ -0,0 +1,2 @@ +declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js new file mode 100644 index 0000000000..f211570346 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/amd/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 0000000000..7a7e0b2c45 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,16 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified", + "resolvedInputFiles": [ + "lib.d.ts", + "DifferentNamesNotSpecified/a.ts", + "DifferentNamesNotSpecified/b.js" + ], + "emittedFiles": [ + "test.js", + "test.d.ts" + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts new file mode 100644 index 0000000000..bbae04a30b --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.d.ts @@ -0,0 +1,2 @@ +declare var test: number; +declare var test2: number; diff --git a/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js new file mode 100644 index 0000000000..f211570346 --- /dev/null +++ b/tests/baselines/reference/project/jsFileCompilationDifferentNamesNotSpecified/node/test.js @@ -0,0 +1,2 @@ +var test = 10; +var test2 = 10; // Should get compiled diff --git a/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json new file mode 100644 index 0000000000..43fe621e06 --- /dev/null +++ b/tests/cases/project/jsFileCompilationDifferentNamesNotSpecified.json @@ -0,0 +1,7 @@ +{ + "scenario": "Verify when different named .ts and .js file exists in the folder and tsconfig.json doesnt specify anyt files", + "projectRoot": "tests/cases/projects/jsFileCompilation", + "baselineCheck": true, + "declaration": true, + "project": "DifferentNamesNotSpecified" +} \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts new file mode 100644 index 0000000000..6d820a0093 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/a.ts @@ -0,0 +1 @@ +var test = 10; \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js new file mode 100644 index 0000000000..9fdf6253b8 --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/b.js @@ -0,0 +1 @@ +var test2 = 10; // Should get compiled \ No newline at end of file diff --git a/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json new file mode 100644 index 0000000000..1b726957fd --- /dev/null +++ b/tests/cases/projects/jsFileCompilation/DifferentNamesNotSpecified/tsconfig.json @@ -0,0 +1,3 @@ +{ + "compilerOptions": { "out": "test.js" } +} \ No newline at end of file