Created
December 2, 2015 21:59
-
-
Save samueleresca/cc633004736213f60b6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//FIX to the error : "expect is not defined" | |
var expect = chai.expect; | |
//describe Telefilm tests | |
describe('Telefilm', function() { | |
//Before the execution, initialize the object | |
before(function() { | |
this.telefilm = new Telefilm("Scrubs", ["John Dorian"]); | |
}); | |
//LIst of tests | |
it('should be able to init new telefilm object', function() { | |
expect(this.telefilm).to.exist; | |
}); | |
it('should be able to get characters', function() { | |
expect(this.telefilm.getCharacters()).to.ok; | |
}); | |
it('should be able to get name', function() { | |
expect(this.telefilm.getName()).to.ok; | |
}); | |
it('should be able to add character', function(){ | |
var localTelefilm= new Telefilm("Scrubs",[]); | |
localTelefilm.addCharacter("Elliot Reid"); | |
expect(localTelefilm.getCharacters().length).to.be.equals(1); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment