1 import { Person, TaxReturn } from '../core';
2 import { UnsupportedFeatureError } from '../core/Errors';
4 import Form1040, { FilingStatus } from './Form1040';
5 import Schedule1, { Schedule1Input } from './Schedule1';
7 test('state tax refund', () => {
8 const p = Person.self('A');
9 const tr = new TaxReturn(2019);
10 tr.addForm(new Form1040({
11 filingStatus: FilingStatus.Single
13 const f = new Schedule1({
14 stateAndLocalTaxableRefunds: 500
18 expect(f.getValue(tr, '9')).toBe(500);
19 expect(tr.getForm(Form1040).getValue(tr, '7a')).toBe(500);
22 test('unsupported inputs', () => {
23 const keys: (keyof Schedule1Input)[] = [
26 'rentalRealEstateRoyaltiesPartnershipsSCorps',
28 'businessExpensesForm2106',
30 'armedForcesMovingExpenses',
31 'deductibleSelfEmploymentTax',
34 for (const input of keys) {
35 const p = Person.self('A');
36 const tr = new TaxReturn(2019);
37 const f = new Schedule1({
41 expect(() => f.getValue(tr, '9') + f.getValue(tr, '22')).toThrow(UnsupportedFeatureError);