Skip to content

Instantly share code, notes, and snippets.

@JitendraZaa
Created March 10, 2018 18:54
Show Gist options
  • Select an option

  • Save JitendraZaa/2f504149b4d9fac196daa24bf9de1e43 to your computer and use it in GitHub Desktop.

Select an option

Save JitendraZaa/2f504149b4d9fac196daa24bf9de1e43 to your computer and use it in GitHub Desktop.
Jasmine Test method example
describe("Test Person Object", function(){
var per;
beforeEach(function(){
per = new Person("Rudra","Zaa",20,"Black");
});
it("Get Correct Full Name", function(){
expect(per.name()).toEqual("Rudra Zaa");
});
it("Confirm if age changed",function(){
expect(per.getAge()).toEqual(20);
per.changeAge(21);
expect(per.getAge()).toEqual(21);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment