Skip to content

Commit f11d995

Browse files
committed
last changes
2 parents afc44ad + 4f8b406 commit f11d995

File tree

21 files changed

+1359
-0
lines changed

21 files changed

+1359
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

chapter1/bank-account.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,34 @@ var BankSecurity = {
44

55
var BankAccount = {
66
balance: 0,
7+
<<<<<<< HEAD
78

89
deposit: function (money) {
910
this.balance = this.balance + money;
1011
return this.balance;
1112
},
1213

14+
=======
15+
deposit: function (money) {
16+
this.balance = this.balance + money;
17+
},
18+
>>>>>>> 4f8b4060407687a11e26eb422cb4e79289fe505c
1319
widthraw: function (cash) {
1420
this.balance = this.balance - cash;
1521
return this.balance;
1622
}
23+
<<<<<<< HEAD
1724
}
25+
=======
26+
};
27+
>>>>>>> 4f8b4060407687a11e26eb422cb4e79289fe505c
1828

1929
module.exports = {
2030
BankAccount: BankAccount,
2131
BankSecurity: BankSecurity
2232
}
33+
<<<<<<< HEAD
34+
=======
35+
36+
37+
>>>>>>> 4f8b4060407687a11e26eb422cb4e79289fe505c

chapter1/test/bank-account.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var BankAccount = require('../bank-account').BankAccount;
33

44
describe('Bank account', () => {
55
it('should have no money on deposit in the beginning', () => {
6+
<<<<<<< HEAD
67
assert.equal(BankAccount.balance, 0);
78
});
89

@@ -12,5 +13,18 @@ describe('Bank account', () => {
1213

1314
it('should be able to deposit money', () => {
1415
assert.equal(BankAccount.deposit(30), 10);
16+
=======
17+
18+
var obj = {
19+
foo: "hello world",
20+
fn: function () {
21+
console.log(arguments.join(''));
22+
}
23+
}
24+
25+
obj.fn(1,2,3,4,45,6, "", {}, [], Infinity,1,23,1,12,12,3,12,3123,123,123,123,123,123,123);
26+
27+
//assert.equal(BankAccount.balance, 0);
28+
>>>>>>> 4f8b4060407687a11e26eb422cb4e79289fe505c
1529
});
1630
})

chapter1/test/index.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ describe('JS Basics', function () {
99
assert.equal(Formulas.add(a, b), 99);
1010
});
1111

12+
<<<<<<< HEAD
1213
it('should be able to divide and multiply number', function () {
1314
var a = 4;
1415
var b = 2;
1516
assert.equal(Formulas.divideMultiply(a, b), 8);
17+
=======
18+
xdescribe('JS Basics', function() {
19+
describe('Numbers', function() {
20+
it('should be able to add number', function() {
21+
var a = 42.9902822;
22+
var b = 43.2929112;
23+
assert.equal(a + b, 99);
24+
>>>>>>> 4f8b4060407687a11e26eb422cb4e79289fe505c
1625
});
1726

1827
it('should return undefined if divided by 0', function () {

0 commit comments

Comments
 (0)