UNPKG

@jonstuebe/allot-utils

Version:

Util functions for Allot

119 lines 3.65 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const payPeriod_1 = require("./payPeriod"); const paycheck_1 = require("./paycheck"); const payday_1 = require("./payday"); const bill_1 = require("./bill"); describe("Integration Tests", () => { it("", () => { const startingDate = new Date(2019, 10, 22, 0, 0, 0); const bills = [ bill_1.createBill({ name: "Rent", amount: 1500, autoPay: false, startOn: startingDate, due: { monthly: 1 } }), bill_1.createBill({ name: "EOS", amount: 22, autoPay: true, startOn: startingDate, due: { monthly: 5 } }), bill_1.createBill({ name: "Spotify", amount: 10.82, autoPay: true, startOn: startingDate, due: { monthly: 16 } }), bill_1.createBill({ name: "SRP", amount: 101, autoPay: true, startOn: startingDate, due: { monthly: 19 } }), bill_1.createBill({ name: "Car Insurance", amount: 85, autoPay: false, startOn: startingDate, due: { monthly: 21 } }), bill_1.createBill({ name: "Car Payment", amount: 341.31, autoPay: true, startOn: startingDate, due: { monthly: 16 } }), bill_1.createBill({ name: "Cox", amount: 69.99, autoPay: true, startOn: startingDate, due: { monthly: 23 } }), bill_1.createBill({ name: "Mesa Utilities", amount: 100, autoPay: true, startOn: startingDate, due: { monthly: 18 } }), bill_1.createBill({ name: "Verizon", amount: 60, autoPay: false, startOn: startingDate, due: { monthly: 12 } }), bill_1.createBill({ name: "Dollar Shave Club", amount: 5, autoPay: true, startOn: startingDate, due: { monthly: 30 } }) ].map(bill => bill_1.addFutureBillDates(bill, 24)); const paydays = payday_1.getPaydays("bi_weekly", startingDate); const paychecks = [ paycheck_1.createPaycheck({ amount: 1337.94, date: new Date(2019, 10, 22, 0, 0, 0), source: "SmartRent" }), paycheck_1.createPaycheck({ amount: 1823.3, date: new Date(2019, 11, 6, 0, 0, 0), source: "SmartRent" }) ]; const payPeriods = payPeriod_1.validatePayPeriods(payPeriod_1.getPayPeriods(paydays), bills, paychecks); // renderTable(payPeriods); }); }); //# sourceMappingURL=index.test.js.map