diff options
| author | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-03-29 00:35:56 -0700 |
|---|---|---|
| committer | Nick Van Doorn <vandoorn.nick@gmail.com> | 2019-03-29 00:35:56 -0700 |
| commit | 65220cc8db0d7c63f49627526466d54969958fe1 (patch) | |
| tree | e2989cb16576f177e60f75f9a733487adfd868f5 /src/use-sunlight.test.js | |
| parent | 51687fe7a2de2d4ed2800af46f9b6a9ac6c929ee (diff) | |
Init commit
Diffstat (limited to 'src/use-sunlight.test.js')
| -rw-r--r-- | src/use-sunlight.test.js | 10 |
1 files changed, 10 insertions, 0 deletions
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() +}) |
