mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update test harness to pick up new ScriptTarget of ES7
This commit is contained in:
@@ -204,7 +204,7 @@ namespace ts {
|
||||
{
|
||||
name: "target",
|
||||
shortName: "t",
|
||||
type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6 },
|
||||
type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6, "es7": ScriptTarget.ES7 },
|
||||
description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental,
|
||||
paramType: Diagnostics.VERSION,
|
||||
error: Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES6
|
||||
|
||||
+10
-1
@@ -932,7 +932,16 @@ module Harness {
|
||||
}
|
||||
else {
|
||||
if (fn === defaultLibFileName) {
|
||||
return languageVersion === ts.ScriptTarget.ES6 ? defaultES6LibSourceFile : defaultLibSourceFile;
|
||||
switch (languageVersion) {
|
||||
case ts.ScriptTarget.ES6:
|
||||
case ts.ScriptTarget.ES7:
|
||||
// TODO : Update to use ES7 specific lib file
|
||||
return defaultES6LibSourceFile;
|
||||
case ts.ScriptTarget.ES3:
|
||||
case ts.ScriptTarget.ES5:
|
||||
default:
|
||||
return defaultLibSourceFile;
|
||||
}
|
||||
}
|
||||
// Don't throw here -- the compiler might be looking for a test that actually doesn't exist as part of the TC
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user