From 65220cc8db0d7c63f49627526466d54969958fe1 Mon Sep 17 00:00:00 2001 From: Nick Van Doorn Date: Fri, 29 Mar 2019 00:35:56 -0700 Subject: Init commit --- src/use-sunlight.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/use-sunlight.test.js (limited to 'src/use-sunlight.test.js') diff --git a/src/use-sunlight.test.js b/src/use-sunlight.test.js new file mode 100644 index 0000000..a4f4719 --- /dev/null +++ b/src/use-sunlight.test.js @@ -0,0 +1,10 @@ +import { computeLightLevel } from './use-sunlight' + +// Test the calculations used in the hook. +// Not sure if it's worth testing the public hook +// API +test('computeLightLevel', () => { + expect( + computeLightLevel({ latitude: 0, longitude: 0, loading: false }) + ).toMatchSnapshot() +}) -- cgit v1.2.3