Skip to content

Commit 97bcb01

Browse files
committed
adds more tests
1 parent 9916edf commit 97bcb01

File tree

2 files changed

+40
-13
lines changed

2 files changed

+40
-13
lines changed

test/es5/continuation.js

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

test/es5/indent.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
'use strict';
2+
3+
// Continuation, aka MemberExpression
4+
var promise = window.Promise.resolve(true);
5+
promise.
6+
then(function (data) {
7+
return data;
8+
}).
9+
then(function (truthy) {
10+
return !truthy;
11+
}).
12+
catch(function () {
13+
return false;
14+
});
15+
16+
// Function expression
17+
var fun = function (first, second) {
18+
return first + second;
19+
};
20+
21+
// Function declaration
22+
function Constructor(first, second) {
23+
this.data = {
24+
first: first,
25+
second: second
26+
};
27+
}
28+
29+
// Calling site arguments
30+
var myObject = new Constructor(
31+
'Petya',
32+
'Vasya'
33+
);
34+
myObject.toString();
35+
36+
var result = fun(
37+
'one',
38+
'two'
39+
);
40+
result.toString();

0 commit comments

Comments
 (0)