File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ var BankSecurity = {
2+ foo : 42
3+ }
4+
5+ var BankAccount = {
6+ balance : 0 ,
7+ deposit : function ( money ) {
8+ this . balance = this . balance + money ;
9+ } ,
10+ widthraw : function ( cash ) {
11+ this . balance = this . balance - cash ;
12+ return this . balance ;
13+ }
14+ } ;
15+
16+ module . exports = {
17+ BankAccount : BankAccount ,
18+ BankSecurity : BankSecurity
19+ }
20+
21+
Original file line number Diff line number Diff line change 1+ var assert = require ( 'assert' ) ;
2+ var BankAccount = require ( '../bank-account' ) . BankAccount ;
3+
4+ describe ( 'Bank account' , ( ) => {
5+ it ( 'should have no money on deposit in the beginning' , ( ) => {
6+
7+ var obj = {
8+ foo : "hello world" ,
9+ fn : function ( ) {
10+ console . log ( this . foo . split ( '' ) ) ;
11+ }
12+ }
13+
14+ var boo = obj . fn ;
15+ console . log ( boo ( ) ) ;
16+ //assert.equal(BankAccount.balance, 0);
17+ } ) ;
18+ } )
Original file line number Diff line number Diff line change 11var assert = require ( 'assert' ) ;
22
3- describe ( 'JS Basics' , function ( ) {
3+ xdescribe ( 'JS Basics' , function ( ) {
44 describe ( 'Numbers' , function ( ) {
55 it ( 'should be able to add number' , function ( ) {
66 var a = 42.9902822 ;
You can’t perform that action at this time.
0 commit comments