Simplify core imports.
[ustaxlib.git] / src / fed2019 / Form8606.test.ts
1 import { Person, TaxReturn } from '../core';
2
3 import Form1040, { FilingStatus } from './Form1040';
4 import Form8606 from './Form8606';
5
6 test('skip part 1', () => {
7 const p = Person.self('A');
8 const tr = new TaxReturn(2019);
9 const f = new Form8606({
10 person: p,
11 nondeductibleContributions: 6000,
12 traditionalIraBasis: 0,
13 distributionFromTradSepOrSimpleIraOrMadeRothConversion: false
14 });
15 tr.addForm(f);
16
17 expect(f.getValue(tr, '14')).toBe(6000);
18 });
19
20 test('Roth conversion no basis', () => {
21 const p = Person.self('A');
22 const tr = new TaxReturn(2019);
23 const f = new Form8606({
24 person: p,
25 nondeductibleContributions: 6000,
26 traditionalIraBasis: 0,
27 distributionFromTradSepOrSimpleIraOrMadeRothConversion: true,
28 contributionsMadeInCurrentYear: 0,
29 valueOfAllTradSepSimpleIras: 0,
30 distributionsFromAllTradSepSimpleIras: 0,
31 amountConvertedFromTradSepSimpleToRoth: 6000,
32 });
33 tr.addForm(f);
34
35 expect(f.getValue(tr, '9')).toBe(6000);
36 expect(f.getValue(tr, '13')).toBe(6000);
37 expect(f.getValue(tr, '14')).toBe(0);
38 expect(f.getValue(tr, '15c')).toBe(0);
39 expect(f.getValue(tr, '16')).toBe(6000);
40 expect(f.getValue(tr, '17')).toBe(6000);
41 expect(f.getValue(tr, '18')).toBe(0);
42 });