Add tests

This commit is contained in:
Mohamed Hegazy 2017-03-06 14:49:50 -08:00
parent 9f0c5ce141
commit 0b247b12a3
6 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,13 @@
error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
tests/cases/compiler/a.js(3,1): error TS2322: Type '0' is not assignable to type 'string'.
!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
==== tests/cases/compiler/a.js (1 errors) ====
var x = "string";
x = 0;
~
!!! error TS2322: Type '0' is not assignable to type 'string'.

View File

@ -0,0 +1,14 @@
error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
tests/cases/compiler/a.js(4,1): error TS2322: Type '0' is not assignable to type 'string'.
!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
==== tests/cases/compiler/a.js (1 errors) ====
// @check
var x = "string";
x = 0;
~
!!! error TS2322: Type '0' is not assignable to type 'string'.

View File

@ -0,0 +1,14 @@
error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
tests/cases/compiler/a.js(4,1): error TS2322: Type '0' is not assignable to type 'string'.
!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
!!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.
==== tests/cases/compiler/a.js (1 errors) ====
// @check
var x = "string";
x = 0;
~
!!! error TS2322: Type '0' is not assignable to type 'string'.

View File

@ -0,0 +1,6 @@
// @allowJs: true
// @checkJsFiles: true
// @fileName: a.js
var x = "string";
x = 0;

View File

@ -0,0 +1,7 @@
// @allowJs: true
// @checkJsFiles: false
// @fileName: a.js
// @check
var x = "string";
x = 0;

View File

@ -0,0 +1,6 @@
// @allowJs: true
// @fileName: a.js
// @check
var x = "string";
x = 0;