From ad77f02023a3a2ae72997f13606a2bad4e554cd4 Mon Sep 17 00:00:00 2001 From: Gabriel Reis Date: Mon, 14 Sep 2020 07:59:08 -0300 Subject: [PATCH] migrating counter-plugin (#1476) * removing class components and migrating tests from chai/enzyme to jest/RTL * update mocha to support --exlude flag and rename jest files to .test Co-authored-by: Gabriel --- .../__test__/{index.js => index.test.js} | 11 +- .../src/CharCounter/index.js | 35 +++-- .../__test__/{index.js => index.test.js} | 11 +- .../src/CustomCounter/index.js | 48 +++--- .../__test__/{index.js => index.test.jsx} | 7 +- .../src/LineCounter/index.js | 36 +++-- .../__test__/{index.js => index.test.js} | 7 +- .../src/WordCounter/index.js | 34 ++--- package.json | 6 +- yarn.lock | 141 +++++------------- 10 files changed, 131 insertions(+), 205 deletions(-) rename draft-js-counter-plugin/src/CharCounter/__test__/{index.js => index.test.js} (81%) rename draft-js-counter-plugin/src/CustomCounter/__test__/{index.js => index.test.js} (84%) rename draft-js-counter-plugin/src/LineCounter/__test__/{index.js => index.test.jsx} (82%) rename draft-js-counter-plugin/src/WordCounter/__test__/{index.js => index.test.js} (83%) diff --git a/draft-js-counter-plugin/src/CharCounter/__test__/index.js b/draft-js-counter-plugin/src/CharCounter/__test__/index.test.js similarity index 81% rename from draft-js-counter-plugin/src/CharCounter/__test__/index.js rename to draft-js-counter-plugin/src/CharCounter/__test__/index.test.js index 7ecd409e84..495e89ccb2 100644 --- a/draft-js-counter-plugin/src/CharCounter/__test__/index.js +++ b/draft-js-counter-plugin/src/CharCounter/__test__/index.test.js @@ -1,6 +1,5 @@ import React from 'react'; -import { mount } from 'enzyme'; -import { expect } from 'chai'; +import { screen, render } from '@testing-library/react'; import { EditorState, ContentState } from 'draft-js'; import createCounterPlugin from '../../index'; @@ -23,8 +22,8 @@ describe('CounterPlugin Character Counter', () => { }); const { CharCounter } = counterPlugin; - const result = mount(); - expect(result).to.have.text('12'); + render(); + expect(screen.getByText('12')).toBeInTheDocument(); }); it('instantiates plugin and counts 3 unicode characters', () => { @@ -34,7 +33,7 @@ describe('CounterPlugin Character Counter', () => { }); const { CharCounter } = counterPlugin; - const result = mount(); - expect(result).to.have.text('3'); + render(); + expect(screen.getByText('3')).toBeInTheDocument(); }); }); diff --git a/draft-js-counter-plugin/src/CharCounter/index.js b/draft-js-counter-plugin/src/CharCounter/index.js index 38485d9cc6..875f021140 100644 --- a/draft-js-counter-plugin/src/CharCounter/index.js +++ b/draft-js-counter-plugin/src/CharCounter/index.js @@ -1,35 +1,34 @@ -import React, { Component } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import punycode from 'punycode'; -class CharCounter extends Component { - static propTypes = { - theme: PropTypes.any, - }; - - getCharCount(editorState) { +const CharCounter = ({ theme = {}, className, store, limit }) => { + const getCharCount = editorState => { const decodeUnicode = str => punycode.ucs2.decode(str); // func to handle unicode characters const plainText = editorState.getCurrentContent().getPlainText(''); const regex = /(?:\r\n|\r|\n)/g; // new line, carriage return, line feed const cleanString = plainText.replace(regex, '').trim(); // replace above characters w/ nothing return decodeUnicode(cleanString).length; - } + }; - getClassNames(count, limit) { - const { theme = {}, className } = this.props; + const getClassNames = count => { const defaultStyle = clsx(theme.counter, className); const overLimitStyle = clsx(theme.counterOverLimit, className); return count > limit ? overLimitStyle : defaultStyle; - } + }; + + const count = getCharCount(store.getEditorState()); + const classNames = getClassNames(count); - render() { - const { store, limit } = this.props; - const count = this.getCharCount(store.getEditorState()); - const classNames = this.getClassNames(count, limit); + return {count}; +}; - return {count}; - } -} +CharCounter.propTypes = { + theme: PropTypes.any, + className: PropTypes.any, + store: PropTypes.any, + limit: PropTypes.any, +}; export default CharCounter; diff --git a/draft-js-counter-plugin/src/CustomCounter/__test__/index.js b/draft-js-counter-plugin/src/CustomCounter/__test__/index.test.js similarity index 84% rename from draft-js-counter-plugin/src/CustomCounter/__test__/index.js rename to draft-js-counter-plugin/src/CustomCounter/__test__/index.test.js index f82a35644d..35d4d832b4 100644 --- a/draft-js-counter-plugin/src/CustomCounter/__test__/index.js +++ b/draft-js-counter-plugin/src/CustomCounter/__test__/index.test.js @@ -1,6 +1,5 @@ import React from 'react'; -import { mount } from 'enzyme'; -import { expect } from 'chai'; +import { screen, render } from '@testing-library/react'; import { EditorState, ContentState } from 'draft-js'; import createCounterPlugin from '../../index'; @@ -30,8 +29,8 @@ describe('CounterPlugin Line Counter', () => { return wordArray ? wordArray.length : 0; }; - const result = mount(); - expect(result).to.have.text('5'); + render(); + expect(screen.getByText('5')).toBeInTheDocument(); }); it('instantiates plugin with number counter and counts 6 number characters', () => { @@ -48,7 +47,7 @@ describe('CounterPlugin Line Counter', () => { return numArray ? numArray.length : 0; }; - const result = mount(); - expect(result).to.have.text('6'); + render(); + expect(screen.getByText('6')).toBeInTheDocument(); }); }); diff --git a/draft-js-counter-plugin/src/CustomCounter/index.js b/draft-js-counter-plugin/src/CustomCounter/index.js index e6d61299be..97ef1fd869 100644 --- a/draft-js-counter-plugin/src/CustomCounter/index.js +++ b/draft-js-counter-plugin/src/CustomCounter/index.js @@ -1,32 +1,36 @@ -import React, { Component } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -class CustomCounter extends Component { - static propTypes = { - theme: PropTypes.any, - limit: PropTypes.number, - countFunction: PropTypes.func.isRequired, - }; - - getClassNames(count, limit) { - const { theme = {}, className } = this.props; +const CustomCounter = ({ + store, + limit, + countFunction, + theme = {}, + className, +}) => { + const getClassNames = count => { const defaultStyle = clsx(theme.counter, className); const overLimitStyle = clsx(theme.counterOverLimit, className); return count > limit ? overLimitStyle : defaultStyle; - } + }; + + const plainText = store + .getEditorState() + .getCurrentContent() + .getPlainText(''); + const count = countFunction(plainText); + const classNames = getClassNames(count, limit); - render() { - const { store, limit, countFunction } = this.props; - const plainText = store - .getEditorState() - .getCurrentContent() - .getPlainText(''); - const count = countFunction(plainText); - const classNames = this.getClassNames(count, limit); + return {count}; +}; - return {count}; - } -} +CustomCounter.propTypes = { + theme: PropTypes.any, + store: PropTypes.any, + className: PropTypes.any, + limit: PropTypes.number, + countFunction: PropTypes.func.isRequired, +}; export default CustomCounter; diff --git a/draft-js-counter-plugin/src/LineCounter/__test__/index.js b/draft-js-counter-plugin/src/LineCounter/__test__/index.test.jsx similarity index 82% rename from draft-js-counter-plugin/src/LineCounter/__test__/index.js rename to draft-js-counter-plugin/src/LineCounter/__test__/index.test.jsx index 089f3623b3..915bf53bc0 100644 --- a/draft-js-counter-plugin/src/LineCounter/__test__/index.js +++ b/draft-js-counter-plugin/src/LineCounter/__test__/index.test.jsx @@ -1,6 +1,5 @@ import React from 'react'; -import { mount } from 'enzyme'; -import { expect } from 'chai'; +import { screen, render } from '@testing-library/react'; import { EditorState, ContentState } from 'draft-js'; import createCounterPlugin from '../../index'; @@ -23,7 +22,7 @@ describe('CounterPlugin Line Counter', () => { }); const { LineCounter } = counterPlugin; - const result = mount(); - expect(result).to.have.text('3'); + render(); + expect(screen.getByText('3')).toBeInTheDocument(); }); }); diff --git a/draft-js-counter-plugin/src/LineCounter/index.js b/draft-js-counter-plugin/src/LineCounter/index.js index 651412b800..33161d73c4 100644 --- a/draft-js-counter-plugin/src/LineCounter/index.js +++ b/draft-js-counter-plugin/src/LineCounter/index.js @@ -1,32 +1,30 @@ -import React, { Component } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -class LineCounter extends Component { - static propTypes = { - theme: PropTypes.any, - limit: PropTypes.number, - }; - - getLineCount(editorState) { +const LineCounter = ({ store, limit, theme = {}, className }) => { + const getLineCount = editorState => { const blockArray = editorState.getCurrentContent().getBlocksAsArray(); return blockArray ? blockArray.length : null; - } + }; - getClassNames(count, limit) { - const { theme = {}, className } = this.props; + const getClassNames = count => { const defaultStyle = clsx(theme.counter, className); const overLimitStyle = clsx(theme.counterOverLimit, className); return count > limit ? overLimitStyle : defaultStyle; - } + }; + + const count = getLineCount(store.getEditorState()); + const classNames = getClassNames(count); - render() { - const { store, limit } = this.props; - const count = this.getLineCount(store.getEditorState()); - const classNames = this.getClassNames(count, limit); + return {count}; +}; - return {count}; - } -} +LineCounter.propTypes = { + theme: PropTypes.any, + store: PropTypes.any, + className: PropTypes.any, + limit: PropTypes.number, +}; export default LineCounter; diff --git a/draft-js-counter-plugin/src/WordCounter/__test__/index.js b/draft-js-counter-plugin/src/WordCounter/__test__/index.test.js similarity index 83% rename from draft-js-counter-plugin/src/WordCounter/__test__/index.js rename to draft-js-counter-plugin/src/WordCounter/__test__/index.test.js index c46998c4ba..a8f16e0e5d 100644 --- a/draft-js-counter-plugin/src/WordCounter/__test__/index.js +++ b/draft-js-counter-plugin/src/WordCounter/__test__/index.test.js @@ -1,6 +1,5 @@ import React from 'react'; -import { mount } from 'enzyme'; -import { expect } from 'chai'; +import { screen, render } from '@testing-library/react'; import { EditorState, ContentState } from 'draft-js'; import createCounterPlugin from '../../index'; @@ -24,7 +23,7 @@ describe('CounterPlugin Word Counter', () => { }); const { WordCounter } = counterPlugin; - const result = mount(); - expect(result).to.have.text('5'); + render(); + expect(screen.getByText('5')).toBeInTheDocument(); }); }); diff --git a/draft-js-counter-plugin/src/WordCounter/index.js b/draft-js-counter-plugin/src/WordCounter/index.js index 6a7567cc1c..acf1663119 100644 --- a/draft-js-counter-plugin/src/WordCounter/index.js +++ b/draft-js-counter-plugin/src/WordCounter/index.js @@ -1,35 +1,31 @@ -import React, { Component } from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -class WordCounter extends Component { - static propTypes = { - theme: PropTypes.any, - limit: PropTypes.number, - }; - - getWordCount(editorState) { +const WordCounter = ({ store, limit, theme = {}, className }) => { + const getWordCount = editorState => { const plainText = editorState.getCurrentContent().getPlainText(''); const regex = /(?:\r\n|\r|\n)/g; // new line, carriage return, line feed const cleanString = plainText.replace(regex, ' ').trim(); // replace above characters w/ space const wordArray = cleanString.match(/\S+/g); // matches words according to whitespace return wordArray ? wordArray.length : 0; - } + }; - getClassNames(count, limit) { - const { theme = {}, className } = this.props; + const getClassNames = count => { const defaultStyle = clsx(theme.counter, className); const overLimitStyle = clsx(theme.counterOverLimit, className); return count > limit ? overLimitStyle : defaultStyle; - } + }; + + const count = getWordCount(store.getEditorState()); + const classNames = getClassNames(count); - render() { - const { store, limit } = this.props; - const count = this.getWordCount(store.getEditorState()); - const classNames = this.getClassNames(count, limit); + return {count}; +}; - return {count}; - } -} +WordCounter.propTypes = { + theme: PropTypes.any, + limit: PropTypes.number, +}; export default WordCounter; diff --git a/package.json b/package.json index cfb405e789..b087d8cf29 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "linaria": "^1.4.0-alpha.1", "lint-staged": "^9.2.3", "matched": "^4.0.0", - "mocha": "^3.0.2", + "mocha": "^5.0.0", "multer": "^1.3.0", "postcss-loader": "^1.3.3", "prettier": "^1.18.2", @@ -136,8 +136,8 @@ "lint:eslint:fix": "eslint --fix --rule 'mocha/no-exclusive-tests: 2' ./", "lint:flow": "flow status", "storybook": "start-storybook -p 6006 -s ./stories/public", - "test": "mocha --compilers @babel/register --require testHelper.js \"./*/src/**/__test__/*.js\"", - "test:jest": "jest --passWithNoTests", + "test": "mocha --compilers @babel/register --exclude \"./*/src/**/__test__/*test.js\" --require testHelper.js \"./*/src/**/__test__/*.js\"", + "test:jest": "jest", "test:watch": "yarn test -- --watch" }, "workspaces": [ diff --git a/yarn.lock b/yarn.lock index 4d606c8af8..97ac1fc86b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4331,9 +4331,10 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.1.1" @@ -5077,11 +5078,10 @@ comma-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.7.tgz#419cd7fb3258b1ed838dc0953167a25e152f5b59" integrity sha512-Jrx3xsP4pPv4AwJUDWY9wOXGtwPXARej6Xd99h4TUGotmf8APuquKMpK+dnD3UgyxK7OEWaisjZz+3b5jtL6xQ== -commander@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - dependencies: - graceful-readlink ">= 1.0.0" +commander@2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== commander@^2.19.0, commander@^2.20.0, commander@~2.20.0: version "2.20.0" @@ -5708,21 +5708,16 @@ date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" -debug@2.6.8: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" -debug@^3.1.0: +debug@3.1.0, debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" @@ -5917,9 +5912,10 @@ diff-sequences@^26.3.0: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.3.0.tgz#62a59b1b29ab7fd27cef2a33ae52abe73042d0a2" integrity sha512-5j5vdRcw3CNctePNYN0Wy2e/JbWT6cAYnXv5OuqPhDpyCGc0uLu2TK0zOCJWNB9kOIfYMSpIulRaDgIi4HJ6Ig== -diff@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== diffie-hellman@^5.0.0: version "5.0.2" @@ -7666,18 +7662,7 @@ glob2base@^0.0.12: dependencies: find-index "^0.1.1" -glob@7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: +glob@7.1.2, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -7830,13 +7815,10 @@ graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - -growl@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== growly@^1.3.0: version "1.3.0" @@ -8020,6 +8002,7 @@ hawk@~6.0.2: he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= he@^1.2.0: version "1.2.0" @@ -9561,10 +9544,6 @@ json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json3@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - json3@^3.3.2: version "3.3.3" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" @@ -9913,29 +9892,6 @@ lodash-es@^4.17.11, lodash-es@^4.17.15: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" - dependencies: - lodash._basecopy "^3.0.0" - lodash.keys "^3.0.0" - -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basecreate@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash._isiterateecall@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" - lodash.assignin@^4.0.9: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" @@ -9952,14 +9908,6 @@ lodash.cond@^4.3.0: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" -lodash.create@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" - dependencies: - lodash._baseassign "^3.0.0" - lodash._basecreate "^3.0.0" - lodash._isiterateecall "^3.0.0" - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -9997,27 +9945,11 @@ lodash.intersection@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.intersection/-/lodash.intersection-4.4.0.tgz#0a11ba631d0e95c23c7f2f4cbb9a692ed178e705" -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" - lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - lodash.map@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" @@ -10549,22 +10481,22 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd dependencies: minimist "0.0.8" -mocha@^3.0.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d" +mocha@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" + integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== dependencies: - browser-stdout "1.3.0" - commander "2.9.0" - debug "2.6.8" - diff "3.2.0" + browser-stdout "1.3.1" + commander "2.15.1" + debug "3.1.0" + diff "3.5.0" escape-string-regexp "1.0.5" - glob "7.1.1" - growl "1.9.2" + glob "7.1.2" + growl "1.10.5" he "1.1.1" - json3 "3.3.2" - lodash.create "3.1.1" + minimatch "3.0.4" mkdirp "0.5.1" - supports-color "3.1.2" + supports-color "5.4.0" moo@^0.4.3: version "0.4.3" @@ -14461,11 +14393,12 @@ superagent@^3.5.0: qs "^6.5.1" readable-stream "^2.0.5" -supports-color@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" +supports-color@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== dependencies: - has-flag "^1.0.0" + has-flag "^3.0.0" supports-color@^2.0.0: version "2.0.0"