]> src.bluestatic.org Git - ustaxlib.git/blob - fed2020/Form1040.test.ts
Upgrade to Node v16 for Github workflows.
[ustaxlib.git] / fed2020 / Form1040.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 import { NotFoundError } from '../core/Errors';
8
9 import { Form1040, FilingStatus } from '.';
10 import TaxReturn from './TaxReturn';
11
12 test('standard deduction', () => {
13 const filingStatusToResult = {
14 [FilingStatus.MarriedFilingJoint]: 24800,
15 [FilingStatus.Single]: 12400,
16 [FilingStatus.MarriedFilingSeparate]: 12400,
17 };
18
19 for (const filingStatus of Object.values(FilingStatus)) {
20 const tr = new TaxReturn();
21 const f = new Form1040({ filingStatus });
22 tr.addForm(f);
23 expect(f.getValue(tr, '12')).toBe(filingStatusToResult[filingStatus]);
24 }
25 });