Add --target esnext tests and update baselines

This commit is contained in:
Nathan Shively-Sanders
2016-11-07 09:56:48 -08:00
parent 7b9a42f995
commit d4a5b0855c
6 changed files with 39 additions and 2 deletions

View File

@@ -165,7 +165,7 @@ namespace ts {
start: undefined,
length: undefined,
}, {
messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017'",
messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'",
category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category,
code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code,

View File

@@ -176,7 +176,7 @@ namespace ts {
file: undefined,
start: 0,
length: 0,
messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017'",
messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'",
code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code,
category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category
}]

View File

@@ -0,0 +1,8 @@
//// [objectSpreadNoTransform.ts]
const y = { a: 'yes', b: 'no' };
const o = { x: 1, ...y };
//// [objectSpreadNoTransform.js]
const y = { a: 'yes', b: 'no' };
const o = { x: 1, ...y };

View File

@@ -0,0 +1,10 @@
=== tests/cases/conformance/types/spread/objectSpreadNoTransform.ts ===
const y = { a: 'yes', b: 'no' };
>y : Symbol(y, Decl(objectSpreadNoTransform.ts, 0, 5))
>a : Symbol(a, Decl(objectSpreadNoTransform.ts, 0, 11))
>b : Symbol(b, Decl(objectSpreadNoTransform.ts, 0, 21))
const o = { x: 1, ...y };
>o : Symbol(o, Decl(objectSpreadNoTransform.ts, 1, 5))
>x : Symbol(x, Decl(objectSpreadNoTransform.ts, 1, 11))

View File

@@ -0,0 +1,16 @@
=== tests/cases/conformance/types/spread/objectSpreadNoTransform.ts ===
const y = { a: 'yes', b: 'no' };
>y : { a: string; b: string; }
>{ a: 'yes', b: 'no' } : { a: string; b: string; }
>a : string
>'yes' : "yes"
>b : string
>'no' : "no"
const o = { x: 1, ...y };
>o : { a: string; b: string; x: number; }
>{ x: 1, ...y } : { a: string; b: string; x: number; }
>x : number
>1 : 1
>y : any

View File

@@ -0,0 +1,3 @@
// @target: esnext
const y = { a: 'yes', b: 'no' };
const o = { x: 1, ...y };