From dfc92d70a5595fe79198d8b97355c46ed5cb0d39 Mon Sep 17 00:00:00 2001 From: sammanthp007 Date: Fri, 2 Dec 2016 20:45:54 -0500 Subject: [PATCH] add a sample unit test. Does not work but for future reference for syntax --- test/paymentFormTest.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/paymentFormTest.ts diff --git a/test/paymentFormTest.ts b/test/paymentFormTest.ts new file mode 100644 index 0000000..f518998 --- /dev/null +++ b/test/paymentFormTest.ts @@ -0,0 +1,22 @@ +/// +import PaymentFormPage from '../src/pages/payment-form/payment-form' + +describe('Payment Form Page', () => { + var payment: PaymentFormPage; + + beforeEach(function () { + payment = new PaymentFormPage(); + }); + + + describe('#getAmount', () => { + it('should return the same number as string if single digit', () => { + var result : string = payment.getAmount('3'); + if (result !== '3'){ + throw new Error('Expected 3 but was ' + result); + } + }); + + }); + +});