mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 12:57:11 -06:00
Add tests
This commit is contained in:
parent
9f0c5ce141
commit
0b247b12a3
13
tests/baselines/reference/checkJsFiles.errors.txt
Normal file
13
tests/baselines/reference/checkJsFiles.errors.txt
Normal 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'.
|
||||
14
tests/baselines/reference/checkJsFiles2.errors.txt
Normal file
14
tests/baselines/reference/checkJsFiles2.errors.txt
Normal 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'.
|
||||
14
tests/baselines/reference/checkJsFiles3.errors.txt
Normal file
14
tests/baselines/reference/checkJsFiles3.errors.txt
Normal 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'.
|
||||
6
tests/cases/compiler/checkJsFiles.ts
Normal file
6
tests/cases/compiler/checkJsFiles.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// @allowJs: true
|
||||
// @checkJsFiles: true
|
||||
|
||||
// @fileName: a.js
|
||||
var x = "string";
|
||||
x = 0;
|
||||
7
tests/cases/compiler/checkJsFiles2.ts
Normal file
7
tests/cases/compiler/checkJsFiles2.ts
Normal file
@ -0,0 +1,7 @@
|
||||
// @allowJs: true
|
||||
// @checkJsFiles: false
|
||||
|
||||
// @fileName: a.js
|
||||
// @check
|
||||
var x = "string";
|
||||
x = 0;
|
||||
6
tests/cases/compiler/checkJsFiles3.ts
Normal file
6
tests/cases/compiler/checkJsFiles3.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// @allowJs: true
|
||||
|
||||
// @fileName: a.js
|
||||
// @check
|
||||
var x = "string";
|
||||
x = 0;
|
||||
Loading…
x
Reference in New Issue
Block a user