Make core/TaxReturn an abstract class.
[ustaxlib.git] / src / fed2019 / FormW2.test.ts
1 import { Person } from '../core';
2
3 import TaxReturn from './TaxReturn';
4 import W2 from './W2';
5
6 test('input', () => {
7 const p = Person.self('Bob');
8 const w2 = new W2({ employer: 'Acme', employee: p, wages: 1000, fedIncomeTax: 100.40 });
9 const tr = new TaxReturn();
10 tr.addForm(w2);
11 expect(w2.getValue(tr, 'c')).toBe('Acme');
12 expect(w2.getValue(tr, 'e')).toBe(p);
13 expect(w2.getValue(tr, '1')).toBe(1000);
14 expect(w2.getValue(tr, '2')).toBe(100.40);
15 });