react-children-utilities
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -7,3 +7,3 @@ { | ||
}, | ||
"plugins": ["flowtype", "react", "import"], | ||
"plugins": ["flowtype", "react", "import", "jest"], | ||
"overrides": [{ | ||
@@ -15,3 +15,2 @@ "files": [ | ||
"env": { | ||
"browser": true, | ||
"jest": true | ||
@@ -21,6 +20,35 @@ } | ||
"rules": { | ||
"function-paren-newline": "off", | ||
"react/jsx-filename-extension": "off", | ||
"jsx-a11y/href-no-hash": "off", | ||
"function-paren-newline": "off" | ||
"jest/consistent-test-it": ["error", {"fn": "test"}], | ||
"jest/expect-expect": "error", | ||
"jest/lowercase-name": ["error", { "ignore": ["describe"] }], | ||
"jest/no-alias-methods": "error", | ||
"jest/no-disabled-tests": "error", | ||
"jest/no-focused-tests": "error", | ||
"jest/no-hooks": "off", | ||
"jest/no-identical-title": "error", | ||
"jest/no-jasmine-globals": "error", | ||
"jest/no-jest-import": "error", | ||
"jest/no-large-snapshots": "error", | ||
"jest/no-test-callback": "error", | ||
"jest/no-test-prefixes": "error", | ||
"jest/no-test-return-statement": "error", | ||
"jest/no-truthy-falsy": "error", | ||
"jest/prefer-called-with": "error", | ||
"jest/prefer-expect-assertions": "off", | ||
"jest/prefer-inline-snapshots": "error", | ||
"jest/prefer-spy-on": "error", | ||
"jest/prefer-strict-equal": "error", | ||
"jest/prefer-to-be-null": "error", | ||
"jest/prefer-to-be-undefined": "error", | ||
"jest/prefer-to-contain": "error", | ||
"jest/prefer-to-have-length": "error", | ||
"jest/prefer-todo": "error", | ||
"jest/require-tothrow-message": "error", | ||
"jest/valid-describe": "error", | ||
"jest/valid-expect-in-promise": "error", | ||
"jest/valid-expect": "error" | ||
} | ||
} |
{ | ||
"name": "react-children-utilities", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Extended utils for React.Children opaque data structure", | ||
@@ -46,7 +46,7 @@ "keywords": [ | ||
"@babel/cli": "^7.2.3", | ||
"@babel/core": "^7.2.2", | ||
"@babel/preset-env": "^7.3.1", | ||
"@babel/core": "^7.3.4", | ||
"@babel/preset-env": "^7.3.4", | ||
"@babel/preset-flow": "^7.0.0", | ||
"@babel/preset-react": "^7.0.0", | ||
"@commitlint/cli": "^7.5.1", | ||
"@commitlint/cli": "^7.5.2", | ||
"@commitlint/config-conventional": "^7.5.0", | ||
@@ -57,25 +57,26 @@ "babel-core": "^7.0.0-0", | ||
"bundlesize": "^0.17.1", | ||
"codecov": "^3.1.0", | ||
"codecov": "^3.2.0", | ||
"del-cli": "^1.1.0", | ||
"enzyme": "^3.8.0", | ||
"enzyme-adapter-react-16": "^1.9.1", | ||
"eslint": "^5.13.0", | ||
"enzyme": "^3.9.0", | ||
"enzyme-adapter-react-16": "^1.10.0", | ||
"eslint": "^5.15.0", | ||
"eslint-config-airbnb": "^17.1.0", | ||
"eslint-plugin-flowtype": "^3.2.1", | ||
"eslint-plugin-flowtype": "^3.4.2", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-jest": "^22.3.0", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-react": "^7.12.4", | ||
"flow-bin": "^0.92.1", | ||
"flow-bin": "^0.94.0", | ||
"husky": "^1.3.1", | ||
"jest": "^24.1.0", | ||
"jest-enzyme": "^7.0.1", | ||
"jest-junit": "^6.2.1", | ||
"lint-staged": "^8.1.3", | ||
"make-dir-cli": "^1.0.0", | ||
"prop-types": "^15.7.0", | ||
"jest-junit": "^6.3.0", | ||
"lint-staged": "^8.1.5", | ||
"make-dir-cli": "^2.0.0", | ||
"prop-types": "^15.7.2", | ||
"raf": "^3.4.1", | ||
"react": "^16.8.1", | ||
"react-dom": "^16.8.1", | ||
"react-test-renderer": "^16.8.1" | ||
"react": "^16.8.3", | ||
"react-dom": "^16.8.3", | ||
"react-test-renderer": "^16.8.3" | ||
} | ||
} |
@@ -10,3 +10,3 @@ import React, { cloneElement } from 'react'; | ||
describe('Children', () => { | ||
it('filter', () => { | ||
test('filter', () => { | ||
const Filtered = ({ children }) => <div>{ Children.filter(children, item => item.type === 'span') }</div>; | ||
@@ -26,3 +26,3 @@ Filtered.propTypes = { children: PropTypes.node.isRequired }; | ||
it('deep filter', () => { | ||
test('deep filter', () => { | ||
const DeepFiltered = ({ children }) => <div>{ Children.deepFilter(children, item => item.type === 'span') }</div>; | ||
@@ -48,3 +48,3 @@ DeepFiltered.propTypes = { children: PropTypes.node.isRequired }; | ||
it('group by type', () => { | ||
test('group by type', () => { | ||
const Grouped = ({ children }) => ( | ||
@@ -74,3 +74,3 @@ <div> | ||
it('deep map', () => { | ||
test('deep map', () => { | ||
const DeepMapped = ({ children }) => ( | ||
@@ -109,3 +109,3 @@ <div> | ||
it('deep each', () => { | ||
test('deep each', () => { | ||
const texts = []; | ||
@@ -139,6 +139,6 @@ const DeepForEached = ({ children }) => ( | ||
); | ||
expect(texts).toEqual(['1', '2', '3', '4']); | ||
expect(texts).toStrictEqual(['1', '2', '3', '4']); | ||
}); | ||
it('deep find', () => { | ||
test('deep find', () => { | ||
const DeepFound = ({ children }) => (<div>{ Children.deepFind(children, child => child.type === 'i') }</div>); | ||
@@ -164,3 +164,3 @@ DeepFound.propTypes = { children: PropTypes.node.isRequired }; | ||
it('only text', () => { | ||
test('only text', () => { | ||
const OnlyText = ({ children }) => (<div>{ Children.onlyText(children) }</div>); | ||
@@ -167,0 +167,0 @@ OnlyText.propTypes = { children: PropTypes.node.isRequired }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38228
395
34