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