Skip to content

Commit

Permalink
feat(data-point/helpers): Do not export type checking functions (#220)
Browse files Browse the repository at this point in the history
closes #215
  • Loading branch information
raingerber authored and acatl committed Feb 21, 2018
1 parent 8fc75c1 commit 6e54252
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 27 deletions.
7 changes: 0 additions & 7 deletions packages/data-point/lib/__snapshots__/index.test.js.snap
Expand Up @@ -10,13 +10,6 @@ Object {
"constant": [Function],
"filter": [Function],
"find": [Function],
"isArray": [Function],
"isBoolean": [Function],
"isError": [Function],
"isFunction": [Function],
"isNumber": [Function],
"isObject": [Function],
"isString": [Function],
"map": [Function],
"omit": [Function],
"parallel": [Function],
Expand Down
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Helpers API 1`] = `
exports[`helpers API check what methods are exported in the helpers modules 1`] = `
Object {
"createAccumulator": [Function],
"createEntity": [Function],
Expand All @@ -11,13 +11,6 @@ Object {
"constant": [Function],
"filter": [Function],
"find": [Function],
"isArray": [Function],
"isBoolean": [Function],
"isError": [Function],
"isFunction": [Function],
"isNumber": [Function],
"isObject": [Function],
"isString": [Function],
"map": [Function],
"omit": [Function],
"parallel": [Function],
Expand Down
10 changes: 1 addition & 9 deletions packages/data-point/lib/helpers/helpers.js
Expand Up @@ -4,7 +4,6 @@ const resolveReducer = require('../reducer-types').resolve
const AccumulatorFactory = require('../accumulator/factory')

const { stubFactories } = require('../reducer-types/reducer-helpers')
const typeCheckFunctionReducers = require('./type-check-functions')

module.exports.helpers = {
assign: stubFactories.assign,
Expand All @@ -15,14 +14,7 @@ module.exports.helpers = {
omit: stubFactories.omit,
parallel: stubFactories.parallel,
pick: stubFactories.pick,
withDefault: stubFactories.withDefault,
isString: typeCheckFunctionReducers.isString,
isNumber: typeCheckFunctionReducers.isNumber,
isBoolean: typeCheckFunctionReducers.isBoolean,
isFunction: typeCheckFunctionReducers.isFunction,
isError: typeCheckFunctionReducers.isError,
isArray: typeCheckFunctionReducers.isArray,
isObject: typeCheckFunctionReducers.isObject
withDefault: stubFactories.withDefault
}

module.exports.isReducer = require('../reducer-types').isReducer
Expand Down
7 changes: 4 additions & 3 deletions packages/data-point/lib/helpers/helpers.test.js
Expand Up @@ -3,9 +3,10 @@
const _ = require('lodash')
const helpers = require('./helpers')

test('Helpers API', () => {
// To keep an eye on new methods added to the helpers module
expect(helpers).toMatchSnapshot()
describe('helpers API', () => {
test('check what methods are exported in the helpers modules', () => {
expect(helpers).toMatchSnapshot()
})
})

describe('helpers.reducify', () => {
Expand Down

0 comments on commit 6e54252

Please sign in to comment.