UNPKG

350 BJavaScriptView Raw
1/**
2 * Imports
3 */
4
5import test from 'tape'
6import cookie from '../src'
7
8/**
9 * Tests
10 */
11
12test('should work', ({equal, end}) => {
13 const store = cookie({})({dispatch: () => {}})(() => {})
14
15 store({type: 'SET_COOKIE', name: 'test', value: 'testing'})
16 const result = store({type: 'GET_COOKIE', name: 'test'})
17 equal(result, 'testing')
18 end()
19})