Skip to content

Commit

Permalink
Failing test, expected Plane to be an empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhodine-orleans-lindsay committed Jan 31, 2020
1 parent 899a320 commit 1688d72
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
4 changes: 2 additions & 2 deletions JavaScriptAirport/spec/FeatureSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Feature Test', function (){
airport = new Airport();
});
it('allows planes to land at the airport', function(){
airport.land(plane)
expect.airport.plane().toContain(plane)
airport.land(plane);
expect(airport.planes()).toContain(plane)
});
});
4 changes: 2 additions & 2 deletions JavaScriptAirport/spec/airportSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ describe('Airport', function(){
beforeEach(function(){
airport = new Airport();
});
it('can allow planes to land', function(){
it('can land at airport', function() {
expect(airport.land).not.toBeUndefined()
});
it('has no planes by default', function(){
expect(airport.plane()).toEqual([]);
expect(airport.planes()).toEqual([]);
});
});
7 changes: 7 additions & 0 deletions JavaScriptAirport/spec/planeSpec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict'
describe('Plane', function(){
var plane;
beforeEach(function(){
plane = new Plane();
});
});
13 changes: 9 additions & 4 deletions JavaScriptAirport/src/airport.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
'use strict'
class Airport{

land(){

}
}
land(){

};

planes(){
return [];
};

};
2 changes: 1 addition & 1 deletion JavaScriptAirport/src/plane.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict'
class Plane{

}

0 comments on commit 1688d72

Please sign in to comment.