From 3adfb0db3493a55276b126bdbcb343da89218601 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Mon, 12 Oct 2020 17:56:49 +0100 Subject: Add many new tests --- src/tests/api/forms.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/tests/api/forms.test.ts (limited to 'src/tests/api/forms.test.ts') diff --git a/src/tests/api/forms.test.ts b/src/tests/api/forms.test.ts new file mode 100644 index 0000000..7c851a7 --- /dev/null +++ b/src/tests/api/forms.test.ts @@ -0,0 +1,11 @@ +import { getForm, getForms } from "../../api/forms"; + +test('fetch a list of all forms', () => { + expect(getForms()).toBeInstanceOf(Array); +}); + +test('fetch a specific form', () => { + expect(getForm("ban-appeals")).resolves.toHaveProperty("title", "Ban Appeals") +}); + +export default null; -- cgit v1.2.3