Add Form 1099-INT.
[ustaxlib.git] / src / fed2019 / Form1040.test.ts
1 import Person from '../Person';
2 import TaxReturn from '../TaxReturn';
3
4 import Form1040 from './Form1040';
5 import Form1099INT from './Form1099INT';
6 import FormW2 from './FormW2';
7
8 test('w2 wages', () => {
9 const pa = Person.self('A');
10 const pb = Person.spouse('B');
11 const tr = new TaxReturn(2019);
12 tr.addForm(new FormW2({ employer: 'AA', employee: pa, wages: 100.00, fedIncomeTax: 0 }));
13 tr.addForm(new FormW2({ employer: 'BB', employee: pb, wages: 36.32, fedIncomeTax: 0 }));
14 const f1040 = new Form1040();
15 tr.addForm(f1040);
16 expect(f1040.getValue(tr, '1')).toBe(136.32);
17 f1040.getValue(tr, '23');
18 });
19
20 test('interest income', () => {
21 const p = Person.self('A');
22 const tr = new TaxReturn(2019);
23 tr.addForm(new Form1099INT({
24 payer: 'Bank',
25 payee: p,
26 interest: 100,
27 taxExemptInterest: 0
28 }));
29 tr.addForm(new Form1099INT({
30 payer: 'Bank 2',
31 payee: p,
32 interest: 3.50,
33 taxExemptInterest: 95
34 }));
35
36 const f1040 = new Form1040();
37 tr.addForm(f1040);
38
39 expect(f1040.getValue(tr, '2a')).toBe(95);
40 expect(f1040.getValue(tr, '2b')).toBe(103.5);
41 });