From 790a21aee4b4c0d86f5a3da91a3995ab72521c5e Mon Sep 17 00:00:00 2001 From: Sean Hamilton Date: Wed, 5 Dec 2018 16:17:51 +0000 Subject: [PATCH] test(index): add tests for index --- tests/index.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/index.test.js diff --git a/tests/index.test.js b/tests/index.test.js new file mode 100644 index 00000000..00418c56 --- /dev/null +++ b/tests/index.test.js @@ -0,0 +1,12 @@ +import * as o from '../src/index'; + +describe('index', () => { + test('should return 24 functions', () => { + expect(Object.keys(o).length).toBe(25); + }); + + test('all functions are typeof function', () => { + const reducer = (last, current) => last && typeof current === 'function'; + expect(Object.values(o).reduce(reducer)).toBe(true); + }); +});