parent
aa61cccda5
commit
2829b5f37d
@ -1,6 +1,11 @@ |
||||
import t from 'tap'; |
||||
import { Marker, ReducerAction } from './types'; |
||||
import { createChangeStateMethods, markersReducer } from './reducer.js'; |
||||
import { createChangeStateMethods, markersReducer } from './useMarkers.js'; |
||||
|
||||
// Testing entire `useMarkers` custom hook would require us to create test preact components here
|
||||
// and render them into virtual DOM and check the results, which is just too much hassle
|
||||
// (but that's how Facebook designed API of hooks, with all that stateful contextful magic hidden under the hood).
|
||||
// So we'll only test `markersReducer` and `createChangeStateMethods` here.
|
||||
|
||||
const createReducerWithState = () => { |
||||
let markers: Marker[] = []; |
Loading…
Reference in new issue