Skip to content

Commit c11b560

Browse files
committed
es6 test conformance cleanup
1 parent 278a350 commit c11b560

File tree

73 files changed

+548
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+548
-224
lines changed

tests/baselines/reference/arrowFunctionWithParameterNameAsync.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/baselines/reference/arrowFunctionWithParameterNameAsync.symbols

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [arrowFunctionWithParameterNameAsync_es6.ts]
2+
3+
const x = async => async;
4+
5+
//// [arrowFunctionWithParameterNameAsync_es6.js]
6+
var x = function (async) { return async; };
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
=== tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es6.ts ===
2+
3+
const x = async => async;
4+
>x : Symbol(x, Decl(arrowFunctionWithParameterNameAsync_es6.ts, 1, 5))
5+
>async : Symbol(async, Decl(arrowFunctionWithParameterNameAsync_es6.ts, 1, 9))
6+
>async : Symbol(async, Decl(arrowFunctionWithParameterNameAsync_es6.ts, 1, 9))
7+

tests/baselines/reference/arrowFunctionWithParameterNameAsync.types renamed to tests/baselines/reference/arrowFunctionWithParameterNameAsync_es6.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
=== tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync.ts ===
1+
=== tests/cases/conformance/async/es6/asyncArrowFunction/arrowFunctionWithParameterNameAsync_es6.ts ===
22

33
const x = async => async;
44
>x : (async: any) => any

tests/baselines/reference/asyncArrowFunction10_es6.errors.txt

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1-
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(2,11): error TS2304: Cannot find name 'async'.
2-
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(2,17): error TS1005: ',' expected.
3-
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(2,20): error TS1005: '=' expected.
4-
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(2,24): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
51
tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts(4,11): error TS2304: Cannot find name 'await'.
62

73

8-
==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts (5 errors) ====
4+
==== tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts (1 errors) ====
95

10-
var foo = async foo(): Promise<void> => {
11-
~~~~~
12-
!!! error TS2304: Cannot find name 'async'.
13-
~~~
14-
!!! error TS1005: ',' expected.
15-
~
16-
!!! error TS1005: '=' expected.
17-
~~~~~~~~~~~~~
18-
!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
6+
var foo = async (): Promise<void> => {
197
// Legal to use 'await' in a type context.
208
var v: await;
219
~~~~~
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//// [asyncArrowFunction10_es6.ts]
22

3-
var foo = async foo(): Promise<void> => {
3+
var foo = async (): Promise<void> => {
44
// Legal to use 'await' in a type context.
55
var v: await;
66
}
77

88

99
//// [asyncArrowFunction10_es6.js]
10-
var foo = async, foo = () => {
10+
var foo = () => __awaiter(this, void 0, void 0, function* () {
1111
// Legal to use 'await' in a type context.
1212
var v;
13-
};
13+
});

tests/baselines/reference/asyncMultiFile.js renamed to tests/baselines/reference/asyncMultiFile_es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//// [tests/cases/conformance/async/es6/asyncMultiFile.ts] ////
1+
//// [tests/cases/conformance/async/es6/asyncMultiFile_es6.ts] ////
22

33
//// [a.ts]
44
async function f() {}

0 commit comments

Comments
 (0)