-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.min.js
1 lines (1 loc) · 922 Bytes
/
spec.min.js
1
describe("Calculate bill",function(){var e=new Bill;it("Test case 1",()=>{var c=e.calculate(0,1,0);expect(c).ce(50)}),it("Test case 2",()=>{var c=e.calculate(0,1,100);expect(c).ce(150)}),it("Test case 3",()=>{var c=e.calculate(1,1,0);expect(c).ce(52)}),it("Test case 4",()=>{var c=e.calculate(91,1,0);expect(c).ce(235)}),it("Test case 5",()=>{var c=e.calculate(92,1,0);expect(c).ce(240)}),it("Test case 6",()=>{var c=e.calculate(1,2,0);expect(c).ce(55)}),it("Test case 7",()=>{var c=e.calculate(91,2,0);expect(c).ce(507)}),it("Test case 8",()=>{var c=e.calculate(92,2,0);expect(c).ce(514)}),it("Test case 9",()=>{var c=e.calculate(1,3,0);expect(c).ce(51)}),it("Test case 10",()=>{var c=e.calculate(91,3,0);expect(c).ce(142)})}),beforeEach(function(){jasmine.addMatchers({ce:function(){return{compare:function(e,c){return this.message=function(){return["Test case failed."]},{pass:e===c,message:"Test case failed."}}}}})});