Advertisement
Dennisaa

JasEmp02

Sep 5th, 2015
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Jasmine functions...
  2. var expect, it, describe, beforeEach, afterEach;
  3. // my function defined elsewhere..
  4. var Employee;
  5.  
  6. describe("Employee", function () {
  7.     'use strict';
  8.    
  9.     var emp;
  10.    
  11.     beforeEach(function () {
  12.         emp = new Employee();
  13.         emp.Add("Freda Whatnot", 2000);
  14.     });
  15.    
  16.     afterEach(function () {
  17.         emp = null;
  18.     });
  19.    
  20.     it('should hold name details', function () {
  21.         expect(emp.GetName()).toBe("Freda Whatnot");
  22.     });
  23.    
  24.     it('should hold salary details', function () {
  25.         expect(emp.GetSalary()).toBe(2000);
  26.     });
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement