Add license information.
[ustaxlib.git] / src / fed2019 / FormW2.test.ts
1 // Copyright 2020 Blue Static <https://www.bluestatic.org>
2 // This program is free software licensed under the GNU General Public License,
3 // version 3.0. The full text of the license can be found in LICENSE.txt.
4 // SPDX-License-Identifier: GPL-3.0-only
5
6 import { Person } from '../core';
7
8 import TaxReturn from './TaxReturn';
9 import W2 from './W2';
10
11 test('input', () => {
12 const p = Person.self('Bob');
13 const w2 = new W2({ employer: 'Acme', employee: p, wages: 1000, fedIncomeTax: 100.40 });
14 const tr = new TaxReturn();
15 tr.addForm(w2);
16 expect(w2.getValue(tr, 'c')).toBe('Acme');
17 expect(w2.getValue(tr, 'e')).toBe(p);
18 expect(w2.getValue(tr, '1')).toBe(1000);
19 expect(w2.getValue(tr, '2')).toBe(100.40);
20 });