Update based on PR feedback

This commit is contained in:
Ron Buckton
2019-08-06 10:46:17 -07:00
parent 5710f7d5ff
commit 3ff0a249d2
17 changed files with 23 additions and 23 deletions

View File

@@ -3645,7 +3645,7 @@ namespace ts {
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};`
};

View File

@@ -66,7 +66,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
}
`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
assert.throws(() => result.main(), "undefined is not iterable (cannot read property Symbol(Symbol.iterator))");
assert.throws(() => result.main(), /cannot read property.*Symbol\(Symbol\.iterator\).*/i);
});
it("es5 over object with no Symbol.iterator with no Symbol", () => {
@@ -93,7 +93,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
}
`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
assert.throws(() => result.main(), "Object not iterable");
assert.throws(() => result.main(), "Object is not iterable");
});
it("es5 over object with Symbol.iterator", () => {
@@ -110,7 +110,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
{
output.push(value)
}
}`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
result.main();