Skip to content

Commit f777762

Browse files
committed
Merge pull request #2711 from SaschaNaz/formatChainedCallbacks
Formatting test for callback function chaining
2 parents c767e0f + 5543f64 commit f777762

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
////Promise
4+
//// .resolve()
5+
//// .then(() => {/*1*/""/*2*/
6+
////}).then(() => {/*3*//*4*/
7+
////})/*semi1*/ /*semi2*/
8+
9+
////function foo() {
10+
//// return Promise.resolve()
11+
//// .then(function () {
12+
//// ""/*a*/
13+
//// })/*b*/
14+
////}
15+
16+
goTo.marker('1');
17+
edit.insertLine('');
18+
goTo.marker('2');
19+
// Expected, with bug 1888: verify.currentLineContentIs(' ""');
20+
verify.currentLineContentIs(' ""');
21+
goTo.marker('4');
22+
edit.insertLine('');
23+
goTo.marker('3');
24+
verify.currentLineContentIs(' }).then(() => {');
25+
26+
goTo.marker("semi1");
27+
edit.insert(';');
28+
// Expected, with bug 1888: verify.currentLineContentIs(' });');
29+
verify.currentLineContentIs('}); ');
30+
goTo.marker("semi2");
31+
edit.insert(';');
32+
verify.currentLineContentIs(' });;');
33+
34+
goTo.marker('a');
35+
edit.insert(';');
36+
verify.currentLineContentIs(' "";');
37+
goTo.marker('b');
38+
edit.insert(';');
39+
// Expected, with bug 1888: verify.currentLineContentIs(' });');
40+
verify.currentLineContentIs(' });');

0 commit comments

Comments
 (0)