Update test harness to pick up new ScriptTarget of ES7

This commit is contained in:
Yui T
2015-10-05 18:56:39 -07:00
parent 69dc707c14
commit 7b3de842a0
2 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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;