From 87a30e3655c046a16a348cbbc29db026ed7e371a Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 12:52:55 -0700 Subject: [PATCH 01/13] Update package scripts --- package-scripts.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/package-scripts.js b/package-scripts.js index bd2472aaa..3986ca3e7 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -22,16 +22,15 @@ module.exports = { }, jest: { native: "jest --config=jest-native-config.js", - default: "cross-env BABEL_ENV=commonjs jest --config=jest-config.js" + default: "cross-env BABEL_ENV=commonjs jest --config=jest-config.js", + watch: "cross-env BABEL_ENV=commonjs jest --watch --config=jest-config.js" }, "test-node": { default: "mocha ./test/node" }, test: { - cov: npsUtils.series.nps("build-package-libs", "karma.cov"), - dev: "karma start ./config/karma/karma.conf.dev.js", - watch: npsUtils.concurrent.nps("watch", "karma.watch"), - default: npsUtils.series.nps("build-package-libs", "karma") + watch: npsUtils.concurrent.nps("watch", "jest.watch"), + default: npsUtils.series.nps("build-package-libs", "jest.default") }, storybook: { server: "start-storybook -p 6006", @@ -91,8 +90,7 @@ module.exports = { "build-package-dists", "test-node", "jest", - "jest.native", - "karma.ci" + "jest.native" ), cov: npsUtils.series.nps("lint", "test.cov"), dev: npsUtils.series.nps("lint", "test.dev"), From 07037784efade7dafa7a19dbfda0536b68c2785f Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 12:53:04 -0700 Subject: [PATCH 02/13] Delete old test files --- CONTRIBUTING.md | 2 +- test/client/main.js | 47 - test/client/spec/mock-components.js | 124 -- test/client/spec/svg-test-helper-pie.js | 244 ---- test/client/spec/svg-test-helper.js | 327 ----- test/client/spec/victory-area/area.spec.js | 42 - .../spec/victory-area/helper-methods.spec.js | 75 -- .../spec/victory-area/victory-area.spec.js | 252 ---- .../spec/victory-axis/victory-axis.spec.js | 367 ------ test/client/spec/victory-bar/bar.spec.js | 73 -- .../geometry-helper-methods.spec.js | 117 -- .../spec/victory-bar/victory-bar.spec.js | 254 ---- .../victory-box-plot/victory-box-plot.spec.js | 210 ---- .../brush-helpers.spec.js | 75 -- .../spec/victory-candlestick/candle.spec.js | 64 - .../helper-methods.spec.js | 76 -- .../victory-candlestick.spec.js | 283 ----- .../spec/victory-chart/helper-methods.spec.js | 59 - .../spec/victory-chart/victory-chart.spec.js | 95 -- .../victory-accessible-group.spec.js | 59 - .../victory-animation/util.spec.js | 76 -- .../victory-animation.spec.js | 24 - .../victory-container.spec.js | 71 -- .../victory-label/victory-label.spec.js | 225 ---- .../victory-primitives/clip-path.spec.js | 44 - .../victory-primitives/curve.spec.js | 29 - .../victory-core/victory-primitives/index.js | 0 .../victory-primitives/line.spec.js | 22 - .../victory-primitives/point.spec.js | 38 - .../victory-primitives/slice.spec.js | 28 - .../victory-transition.spec.js | 33 - .../victory-util/add-events.spec.js | 225 ---- .../victory-core/victory-util/axis.spec.js | 183 --- .../victory-util/collection.spec.js | 158 --- .../victory-core/victory-util/data.spec.js | 380 ------ .../victory-core/victory-util/domain.spec.js | 361 ------ .../victory-core/victory-util/events.spec.js | 77 -- .../victory-core/victory-util/helpers.spec.js | 189 --- .../victory-util/label-helpers.spec.js | 126 -- .../victory-util/point-path-helpers.js | 75 -- .../victory-util/prop-types.spec.js | 366 ------ .../victory-core/victory-util/scale.spec.js | 132 -- .../victory-util/selection.spec.js | 52 - .../victory-core/victory-util/style.spec.js | 28 - .../victory-util/textsize.spec.js | 176 --- .../victory-util/transitions.spec.js | 142 --- .../victory-core/victory-util/wrapper.spec.js | 85 -- .../spec/victory-errorbars/error-bar.spec.js | 101 -- .../victory-errorbars.spec.js | 1094 ----------------- .../spec/victory-group/victory-group.spec.js | 54 - .../victory-histogram.spec.js | 211 ---- .../victory-legend/victory-legend.spec.js | 235 ---- .../spec/victory-line/victory-line.spec.js | 339 ----- .../spec/victory-pie/victory-pie.spec.js | 407 ------ .../victory-scatter/helper-methods.spec.js | 82 -- .../victory-scatter/victory-scatter.spec.js | 280 ----- .../selection-helpers.spec.js | 80 -- .../victory-shared-events.spec.js | 136 -- .../spec/victory-stack/victory-stack.spec.js | 89 -- .../spec/victory-tooltip/flyout.spec.js | 25 - .../victory-tooltip/victory-tooltip.spec.js | 57 - .../victory-voronoi/victory-voronoi.spec.js | 205 --- test/client/spec/victory/victory.spec.js | 260 ---- test/client/test.html | 18 - 64 files changed, 1 insertion(+), 9862 deletions(-) delete mode 100644 test/client/main.js delete mode 100644 test/client/spec/mock-components.js delete mode 100644 test/client/spec/svg-test-helper-pie.js delete mode 100644 test/client/spec/svg-test-helper.js delete mode 100644 test/client/spec/victory-area/area.spec.js delete mode 100644 test/client/spec/victory-area/helper-methods.spec.js delete mode 100644 test/client/spec/victory-area/victory-area.spec.js delete mode 100644 test/client/spec/victory-axis/victory-axis.spec.js delete mode 100644 test/client/spec/victory-bar/bar.spec.js delete mode 100644 test/client/spec/victory-bar/geometry-helper-methods.spec.js delete mode 100644 test/client/spec/victory-bar/victory-bar.spec.js delete mode 100644 test/client/spec/victory-box-plot/victory-box-plot.spec.js delete mode 100644 test/client/spec/victory-brush-container/brush-helpers.spec.js delete mode 100644 test/client/spec/victory-candlestick/candle.spec.js delete mode 100644 test/client/spec/victory-candlestick/helper-methods.spec.js delete mode 100644 test/client/spec/victory-candlestick/victory-candlestick.spec.js delete mode 100644 test/client/spec/victory-chart/helper-methods.spec.js delete mode 100644 test/client/spec/victory-chart/victory-chart.spec.js delete mode 100644 test/client/spec/victory-core/victory-accessible-group/victory-accessible-group.spec.js delete mode 100644 test/client/spec/victory-core/victory-animation/util.spec.js delete mode 100644 test/client/spec/victory-core/victory-animation/victory-animation.spec.js delete mode 100644 test/client/spec/victory-core/victory-container/victory-container.spec.js delete mode 100644 test/client/spec/victory-core/victory-label/victory-label.spec.js delete mode 100644 test/client/spec/victory-core/victory-primitives/clip-path.spec.js delete mode 100644 test/client/spec/victory-core/victory-primitives/curve.spec.js delete mode 100644 test/client/spec/victory-core/victory-primitives/index.js delete mode 100644 test/client/spec/victory-core/victory-primitives/line.spec.js delete mode 100644 test/client/spec/victory-core/victory-primitives/point.spec.js delete mode 100644 test/client/spec/victory-core/victory-primitives/slice.spec.js delete mode 100644 test/client/spec/victory-core/victory-transition/victory-transition.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/add-events.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/axis.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/collection.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/data.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/domain.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/events.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/helpers.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/label-helpers.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/point-path-helpers.js delete mode 100644 test/client/spec/victory-core/victory-util/prop-types.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/scale.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/selection.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/style.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/textsize.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/transitions.spec.js delete mode 100644 test/client/spec/victory-core/victory-util/wrapper.spec.js delete mode 100644 test/client/spec/victory-errorbars/error-bar.spec.js delete mode 100644 test/client/spec/victory-errorbars/victory-errorbars.spec.js delete mode 100644 test/client/spec/victory-group/victory-group.spec.js delete mode 100644 test/client/spec/victory-histogram/victory-histogram.spec.js delete mode 100644 test/client/spec/victory-legend/victory-legend.spec.js delete mode 100644 test/client/spec/victory-line/victory-line.spec.js delete mode 100644 test/client/spec/victory-pie/victory-pie.spec.js delete mode 100644 test/client/spec/victory-scatter/helper-methods.spec.js delete mode 100644 test/client/spec/victory-scatter/victory-scatter.spec.js delete mode 100644 test/client/spec/victory-selection-container/selection-helpers.spec.js delete mode 100644 test/client/spec/victory-shared-events/victory-shared-events.spec.js delete mode 100644 test/client/spec/victory-stack/victory-stack.spec.js delete mode 100644 test/client/spec/victory-tooltip/flyout.spec.js delete mode 100644 test/client/spec/victory-tooltip/victory-tooltip.spec.js delete mode 100644 test/client/spec/victory-voronoi/victory-voronoi.spec.js delete mode 100644 test/client/spec/victory/victory.spec.js delete mode 100644 test/client/test.html diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b81daf83c..1b24705d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ Use [Yarn](https://yarnpkg.com/) to install dependencies: $ yarn install ``` -> *Note*: We use Yarn 1 and not the newer, different Yarn 2+ projects. Please use at least the minimum `yarn` version specified in `package.json:engines.yarn`. +> _Note_: We use Yarn 1 and not the newer, different Yarn 2+ projects. Please use at least the minimum `yarn` version specified in `package.json:engines.yarn`. Run a development server and check out the demos. This command will also build and watch `lib/` and `es/` directories in all packages, so your demos will always be in sync with code changes. diff --git a/test/client/main.js b/test/client/main.js deleted file mode 100644 index 498bcf74c..000000000 --- a/test/client/main.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Test setup for client-side tests. - * - * Intended for: - * - Karma tests: `yarn nps karma` - * - Browser tests: `http://localhost:3000/test/client/test.html` - */ -/*globals window:false*/ -const chai = require("chai"); -const sinonChai = require("sinon-chai"); -const enzyme = require("enzyme"); -const Adapter = require("enzyme-adapter-react-16"); - -enzyme.configure({ adapter: new Adapter() }); -// -------------------------------------------------------------------------- -// Chai / Sinon / Mocha configuration. -// -------------------------------------------------------------------------- -// Exports -window.expect = chai.expect; - -// Plugins -chai.use(sinonChai); - -// Mocha (part of static include). -window.mocha.setup({ - ui: "bdd", - bail: false -}); - -// -------------------------------------------------------------------------- -// Bootstrap -// -------------------------------------------------------------------------- -// Optional env var filter for module tests. -const TEST_MODULE = process.env.TEST_MODULE; - -// Use webpack to infer and `require` tests automatically. -const testsReq = require.context(".", true, /\.spec.jsx?$/); -testsReq - .keys() - // TODO: Expand to WIN friendly with `normalize|relative` etc? - .filter((m) => (TEST_MODULE ? m.startsWith(`./spec/${TEST_MODULE}/`) : true)) - .map(testsReq); - -// Only start mocha in browser. -if (!window.__karma__) { - window.mocha.run(); -} diff --git a/test/client/spec/mock-components.js b/test/client/spec/mock-components.js deleted file mode 100644 index 7dae03112..000000000 --- a/test/client/spec/mock-components.js +++ /dev/null @@ -1,124 +0,0 @@ -/*eslint-disable react/no-multi-comp*/ -import React from "react"; -import PropTypes from "prop-types"; -import { Data } from "victory-core"; -import { defaults, get, reduce, map } from "lodash"; - -class MockDataComponent extends React.Component { - static displayName = "MockDataComponent"; - static role = "dataComponent"; - - static propTypes = { - datum: PropTypes.object, - events: PropTypes.object, - style: PropTypes.object - }; - - render() { - const { - datum: { x, y }, - events, - style - } = this.props; - return ( -

- `$ - {x}: ${y}` -

- ); - } -} - -class MockLabel extends React.Component { - static displayName = "MockLabel"; - static role = "label"; - - static propTypes = { - text: PropTypes.string - }; - - render() { - const { text } = this.props; - - return ( -

- `$ - {text}` -

- ); - } -} - -class MockVictoryComponent extends React.Component { - static animationWhitelist = ["data", "style"]; - static displayName = "MockVictoryComponent"; - static role = "chart"; - - static defaultProps = { - dataComponent: , - labelComponent: , - groupComponent:
- }; - - static getBaseProps = (props) => { - const data = Data.getData(props); - const childProps = reduce( - data, - (accum, datum, index) => { - return defaults({}, accum, { - [index]: { - data: { - index, - datum, - data, - style: {} - } - } - }); - }, - {} - ); - - return { - parent: { - data - }, - ...childProps - }; - }; - - render() { - const { animationWhitelist } = MockVictoryComponent; - const props = defaults({}, this.props, this.defaultProps); - const { animate, dataComponent, labelComponent, groupComponent } = props; - - if (animate) { - return this.animateComponent(props, animationWhitelist); - } - - const dataComponents = map(this.dataKeys, (_key, index) => { - const dataProps = this.getComponentProps(dataComponent, "data", index); - return React.cloneElement(dataComponent, dataProps); - }); - - const labelComponents = map(this.dataKeys, (_key, index) => { - const labelProps = this.getComponentProps( - labelComponent, - "labels", - index - ); - return get(labelProps, "text") - ? React.cloneElement(labelComponent, labelProps) - : undefined; - }); - - return React.cloneElement( - groupComponent, - {}, - ...dataComponents, - ...labelComponents - ); - } -} - -export { MockVictoryComponent, MockLabel, MockDataComponent }; diff --git a/test/client/spec/svg-test-helper-pie.js b/test/client/spec/svg-test-helper-pie.js deleted file mode 100644 index 2851acd0e..000000000 --- a/test/client/spec/svg-test-helper-pie.js +++ /dev/null @@ -1,244 +0,0 @@ -/* eslint-disable no-use-before-define, no-unused-expressions */ - -/** - * Collection of helper functions to be used with - * SVG DOM elements & Enzyme wrappers in tests. - * - * This class ASSUMES it will be run in a test environment, - * meaning it will use `expect` & other test utilities without warning. - */ -const SvgTestHelper = { - /** - * Assert the given wrapper renders to an SVG path - * in the shape of a circular sector. - * - * A circular sector is "pizza slice shaped" - * - * "Naive" analysis of rendered shape - only works for normal - * D3 direction sequence for creating a circular section - * - * @param {ShallowWrapper} wrapper Enzyme wrapper - * @return {boolean} Whether or not it's a circular section - */ - expectIsCircularSection: (wrapper) => { - expect( - exhibitsCircularSectionDirectionSequence(wrapper), - "Wrapper has a circular section command sequence" - ).to.be.true; - }, - - /** - * Assert the given wrapper renders to a path in the shape - * of an annular section - * - * "Naive" analysis of rendered shape - only works for normal - * D3 direction sequence for creating an annular section - * - * @param {ShallowWrapper} wrapper Enzyme wrapper - * @return {boolean} Whether or not it's a circular section - */ - expectIsAnnularSection: (wrapper) => { - // eslint-disable-line max-statements - const commands = getPathCommandsFromSliceWrapper(wrapper); - - expect(commands).to.have.lengthOf(5); - expect(commands[0].name).to.equal("M"); - expect(commands[1].name).to.equal("A"); - expect(commands[2].name).to.equal("L"); - expect(commands[3].name).to.equal("A"); - expect(commands[4].name).to.equal("Z"); - - const firstSweepFlag = commands[1].args[4]; - const secondSweepFlag = commands[3].args[4]; - expect( - firstSweepFlag, - "The 2 arcs are drawn in opposite directions" - ).to.not.eql(secondSweepFlag); - - const startOfOuterArc = { - x: commands[0].args[0], - y: commands[0].args[1] - }; - const endOfOuterArc = { - x: commands[1].args[5], - y: commands[1].args[6] - }; - - expect( - SvgTestHelper.getDistanceFromOrigin(startOfOuterArc), - "The outer arc begins and ends the same distance from the origin" - ).to.be.closeTo(SvgTestHelper.getDistanceFromOrigin(endOfOuterArc), 0.001); - - const startOfInnerArc = { - x: commands[2].args[0], - y: commands[2].args[1] - }; - const endOfInnerArc = { - x: commands[3].args[5], - y: commands[3].args[6] - }; - expect( - SvgTestHelper.getDistanceFromOrigin(startOfInnerArc), - "The inner arc begins and ends the same distance from the origin" - ).to.be.closeTo(SvgTestHelper.getDistanceFromOrigin(endOfInnerArc), 0.001); - }, - - getInnerRadiusOfCircularOrAnnularSlice: (wrapper) => { - if (exhibitsCircularSectionDirectionSequence(wrapper)) { - return 0; - } - - const commands = getPathCommandsFromSliceWrapper(wrapper); - expect(commands[2].name).to.equal("L"); - const startOfInnerArc = { - x: commands[2].args[0], - y: commands[2].args[1] - }; - - return SvgTestHelper.getDistanceFromOrigin(startOfInnerArc); - }, - - /** - * Translate SVG coordinates to cartesian system and get clockwise - * from positive Y axis - * - * @todo Refactor to us `self::getAngleBetweenSVGCoordinates` internally - * @param {{x: number, y: number}} coord X & Y values in SVG coordinate system - * @return {number} Degrees from normal Cartesian positive Y axis axis, counter clockwise - */ - getSvgCoordinatesAngleFromCartesianYAxis: (coord) => { - const cartesianY = coord.y * -1; // Y coordinate in SVG system is inverse of normal Cartesian - const theta = Math.atan2(coord.x, cartesianY) * (180 / Math.PI); - - return theta < 0 ? 360 + theta : theta; - }, - - /** - * Parse SVG path direction into usable data structure - * - * @param {string} str SVG path direction ("d" attribute) - * @return {Object[]} Parsed directions - */ - parseSvgPathCommands: (str) => { - // Match on all valid SVG path commands - const matches = str.match( - /[MmLlHhVvCcSsQqTtAaZz]+[^MmLlHhVvCcSsQqTtAaZz]*/g - ); - - return matches.map((match) => { - return { - raw: match, - name: match.charAt(0), - args: match - .substring(1) - .split(",") - .map((arg) => parseFloat(arg, 10)) - }; - }); - }, - - /** - * Get the initial coordinates of the arc drawn in an SVG pie slice - * - * @param {ShallowWrapper} sliceWrapper Enzyme ShallowWrapper around a Slice - * @return {{x: number, y: number}} SVG coordinates - */ - getSliceArcStart: (sliceWrapper) => { - const pathDescriptions = sliceWrapper.find("path").prop("d"); - const cmds = SvgTestHelper.parseSvgPathCommands(pathDescriptions); - expect(cmds[0].name).to.eql("M"); - - return { - x: cmds[0].args[0], - y: cmds[0].args[1] - }; - }, - - /** - * Get the final coordinates of the arc drawn in an SVG pie slice - * - * @param {ShallowWrapper} sliceWrapper Enzyme ShallowWrapper around a Slice - * @return {{x: number, y: number}} SVG coordinates - */ - getSliceArcEnd: (sliceWrapper) => { - const pathDescriptions = sliceWrapper.find("path").prop("d"); - const cmds = SvgTestHelper.parseSvgPathCommands(pathDescriptions); - expect(cmds[1].name).to.eql("A"); - - // @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Arcto - return { - x: cmds[1].args[5], - y: cmds[1].args[6] - }; - }, - - /** - * Get inner degress of a Slice or similar component rendered - * by the VictoryPie component - * - * Assumes the start & end points of the arc are available in the first - * 2 SVG commands of the path description - * - * @param {ShallowWrapper} slice Enzyme ShallowWrapper around a Slice - * @return {number} Degrees, 0 to 360 - */ - getSliceInnerDegrees: (slice) => { - const pathDescriptions = slice.find("path").prop("d"); - const cmds = SvgTestHelper.parseSvgPathCommands(pathDescriptions); - expect(cmds[0].name).to.eql("M"); - expect(cmds[1].name).to.eql("A"); - - const coord1 = { - x: cmds[0].args[0], - y: cmds[0].args[1] - }; - // @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Arcto - const coord2 = { - x: cmds[1].args[5], - y: cmds[1].args[6] - }; - - return SvgTestHelper.getAngleBetweenSVGCoordinates(coord1, coord2); - }, - - /** - * Get the angle between 2 arbitrary SVG coordinates, - * using 0, 0 as origin - * - * @param {{x: number, y: number}} coord1 SVG coordinates for point 1 - * @param {{x: number, y: number}} coord2 SVG coordinates for point 2 - * @return {number} Degrees, 0 - 360 - */ - getAngleBetweenSVGCoordinates: (coord1, coord2) => { - const cartesianY1 = coord1.y * -1; - const cartesianY2 = coord2.y * -1; - - const radians = - Math.atan2(cartesianY1, coord1.x) - Math.atan2(cartesianY2, coord2.x); - const theta = radians * (180 / Math.PI); - - return theta < 0 ? 360 + theta : theta; - }, - - getDistanceFromOrigin: (coord) => { - return Math.sqrt(Math.pow(coord.x, 2) + Math.pow(coord.y, 2)); - } -}; - -const getPathCommandsFromSliceWrapper = (wrapper) => { - const dAttr = /path d="([^"]*)"/.exec(wrapper.html())[1]; - - return SvgTestHelper.parseSvgPathCommands(dAttr); -}; - -const exhibitsCircularSectionDirectionSequence = (wrapper) => { - const CIRCULAR_SECTION_SIMPLE_DIRECTIONS = ["M", "A", "L", "Z"]; - - const commands = getPathCommandsFromSliceWrapper(wrapper); - - return commands.every((cmd, i) => { - return cmd.name === CIRCULAR_SECTION_SIMPLE_DIRECTIONS[i]; - }); -}; - -export default SvgTestHelper; diff --git a/test/client/spec/svg-test-helper.js b/test/client/spec/svg-test-helper.js deleted file mode 100644 index 678bae428..000000000 --- a/test/client/spec/svg-test-helper.js +++ /dev/null @@ -1,327 +0,0 @@ -import * as d3Shape from "victory-vendor/d3-shape"; -import * as d3Scale from "victory-vendor/d3-scale"; -import { _internalD3Voronoi as d3Voronoi } from "victory-voronoi/es/helper-methods"; -import { assign, without, min, max, property } from "lodash"; - -const RECTANGULAR_SEQUENCE = ["M", "A", "L", "A", "L", "A", "L", "A", "z"]; -const CIRCULAR_SEQUENCE = ["M", "m", "a", "a"]; -const FLYOUT_SEQUENCE = [ - "M", - "L", - "L", - "L", - "A", - "L", - "A", - "L", - "A", - "L", - "A", - "z" -]; - -const parseSvgPathCommands = (commandStr) => { - const matches = commandStr.match( - /[MmLlHhVvCcSsQqTtAaZz]+[^MmLlHhVvCcSsQqTtAaZz]*/g - ); - - return matches.map((match) => { - const name = match.charAt(0); - const args = match - .substring(1) - .split(",") - .map((arg) => { - return parseFloat(arg, 10); - }); - - return { - raw: match, - name, - args - }; - }); -}; - -const getPathCommandsFromWrapper = (wrapper) => { - const commandStr = wrapper.find("path").prop("d"); - return parseSvgPathCommands(commandStr); -}; - -const exhibitsShapeSequence = (wrapper, shapeSequence) => { - const commands = getPathCommandsFromWrapper(wrapper); - return commands.every((command, index) => { - return command.name === shapeSequence[index]; - }); -}; - -const calculateD3Path = (props, pathType, index) => { - // eslint-disable-line max-statements - const { width, height, padding, scale, interpolation, data, domain } = props; - const scaleType = scale - ? `scale${scale[0].toUpperCase() + scale.slice(1)}` - : "scaleLinear"; - const curveType = - typeof interpolation === "string" - ? `curve${interpolation[0].toUpperCase() + interpolation.slice(1)}` - : undefined; - const curveFunction = - typeof interpolation === "function" ? interpolation : d3Shape[curveType]; - - const dataDomain = data.reduce( - (prev, datum) => { - if (datum.x < prev.x[0]) { - prev.x[0] = datum.x; - } else if (datum.x > prev.x[1]) { - prev.x[1] = datum.x; - } - - if (datum.y < prev.y[0]) { - prev.y[0] = datum.y; - } else if (datum.y > prev.y[1]) { - prev.y[1] = datum.y; - } - - return prev; - }, - { x: [0, 0], y: [0, 0] } - ); - - const range = { - x: [padding, width - padding], - y: [height - padding, padding] - }; - - const scaleX = d3Scale[scaleType]() - .domain((domain && domain.x) || dataDomain.x) - .range(range.x); - const scaleY = d3Scale[scaleType]() - .domain((domain && domain.y) || dataDomain.y) - .range(range.y); - - switch (pathType) { - case "line": { - return d3Shape - .line() - .curve(curveFunction) - .x((d) => scaleX(d.x)) - .y((d) => scaleY(d.y))(data); - } - case "area": { - const modifiedData = props.data.map((datum) => { - return { x: datum.x, y: datum.y, y1: datum.y, y0: datum.y0 }; - }); - return d3Shape - .area() - .curve(curveFunction) - .x((d) => scaleX(d.x)) - .y1((d) => scaleY(d.y1)) - .y0((d) => scaleY(d.y0))(modifiedData); - } - case "voronoi": { - const minRange = [Math.min(...range.x), Math.min(...range.y)]; - const maxRange = [Math.max(...range.x), Math.max(...range.y)]; - const voronoi = d3Voronoi() - .x((d) => scaleX(d.x)) - .y((d) => scaleY(d.y)) - .extent([minRange, maxRange]); - const polygons = voronoi.polygons(data); - const polygon = without(polygons[index], "data"); - return `M ${polygon.join("L")} Z`; - } - } - - return undefined; -}; - -const expectations = { - /** - * Assert the wrapper renders a rectangular shape. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper that wraps a single - * `path` node. - * @returns {undefined} - */ - expectIsRectangular(wrapper) { - const isBar = exhibitsShapeSequence(wrapper, RECTANGULAR_SEQUENCE); - expect(isBar).to.equal(true); - }, - - /** - * Assert the wrapper renders a circular shape. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper. - * @returns {undefined} - */ - expectIsCircular(wrapper) { - expect(exhibitsShapeSequence(wrapper, CIRCULAR_SEQUENCE)).to.equal(true); - }, - - /** - * Assert the wrapper renders a line svg element. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper that wraps a single - * node. - * @returns {undefined} - */ - expectIsALine(wrapper) { - expect(wrapper.find("line").is("line")).to.equal(true); - }, - - /** - * Assert the wrapper renders the correct path. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper that wraps a single - * `path` node. - * @param {Object} props - Props passed to the component. - * @param {Number} props.width - The width of the svg. - * @param {Number} props.height - The height of the svg. - * @param {Number} props.padding - The padding of the svg. - * @param {String} props.scale - The type of scale. - * @param {String} props.interpolation - The type of curve. - * @param {Array} props.data - The raw data for the chart. - * @param {String} pathType - The type of path d3 should generate (e.g. - * @param {Numner} index - Optional: the index of the data element in the data array - * @returns {undefined} - */ - // eslint-disable-next-line max-params - expectCorrectD3Path(wrapper, props, pathType, index) { - const path = wrapper.find("path").prop("d"); - expect(path).to.not.equal(undefined); - expect(path).to.equal(calculateD3Path(props, pathType, index)); - }, - /** - * Assert the wrapper renders a flyout shape. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper. - * @returns {undefined} - */ - expectIsFlyout(wrapper) { - const commands = getPathCommandsFromWrapper(wrapper); - expect(exhibitsShapeSequence(wrapper, FLYOUT_SEQUENCE, commands)).to.equal( - true - ); - } -}; - -const helpers = { - /** - * Retrieve the raw svg height of a bar. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper that wraps a single - * `path` node. - * @returns {Number} The height of the bar in svg units. - */ - getBarHeight(wrapper) { - expectations.expectIsRectangular(wrapper); - const commands = getPathCommandsFromWrapper(wrapper); - return Math.abs(commands[0].args[1] - commands[2].args[1]); - }, - - /** - * Assert the wrapper renders a 4-sided shape and return dimensions. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper. - * @returns {Object} Dimensions of the shape - */ - getBarShape(wrapper) { - const commands = getPathCommandsFromWrapper(wrapper); - - const points = commands.filter((command) => { - return command.name !== "z"; - }); - const verticalPoints = points.map(property("args.1")); - const horizontalPoints = points.map(property("args.0")); - const height = max(verticalPoints) - min(verticalPoints); - const width = max(horizontalPoints) - min(horizontalPoints); - - return { - height, - width - }; - }, - /** - * Retrieve the raw svg coordinates for the center of a point. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper that wraps a single - * `path` node. - * @returns {Array} The x and y coordinates, respectively. - */ - getSvgPointCoordinates(wrapper) { - const commands = getPathCommandsFromWrapper(wrapper); - return commands[0].args; - }, - - /** - * Convert the raw svg coordinates to scaled Cartesian coordinates. - * - * @param {Array} coords - The x and y coordinates, respectively. - * @param {Object} svgDimensions - The width, height, and padding of the svg. - * @param {Number} svgDimensions.width - The width of the svg. - * @param {Number} svgDimensions.height - The height of the svg. - * @param {Number} svgDimensions.padding - The space between the edge of the - * svg and the chart area. - * @param {Object} domain - The x and y domains. - * @param {Array} domain.x - The lower and upper x bounds, respectively. - * @param {Array} domain.y - The lower and upper y bounds, respectively. - * @returns {Array} The Cartesian x and y coordinates, respectively. - */ - convertSvgCoordinatesToCartesian(coords, svgDimensions, domain) { - const { width, height, padding } = svgDimensions; - - const cartesianX = coords[0] - padding; - const cartesianY = height - coords[1] - padding; - - const chartWidth = width - padding * 2; - const chartHeight = height - padding * 2; - - const scaledX = (cartesianX / chartWidth) * (domain.x[1] - domain.x[0]); - const scaledY = (cartesianY / chartHeight) * (domain.y[1] - domain.y[0]); - - const shiftedX = scaledX + domain.x[0]; - const shiftedY = scaledY + domain.y[0]; - - return [shiftedX, shiftedY]; - }, - - /** - * Determine if the axis is an horizontal axis. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper that wraps a single - * `line` node. - * @param {Object} svgDimensions - The dimensions of the axis. - * @param {Number} svgDimensions.width - The width of the line. - * @param {Number} svgDimenions.padding - The padding around the line. - * @returns {Boolean} Whether the wrapper renders an independent axis. - */ - isHorizontalAxis(wrapper, svgDimensions) { - const { width, padding } = svgDimensions; - const { x1, x2, y1, y2 } = wrapper.find("line").props(); - - const isHorizontalLine = x1 !== x2 && y1 === y2; - const isCorrectWidth = width - padding * 2 === x2 - x1; - - return isHorizontalLine && isCorrectWidth; - }, - - /** - * Determine if the axis is a vertical axis. - * - * @param {ShallowWrapper} wrapper - An enzyme wrapper that wraps a single - * `line` node. - * @param {Object} svgDimensions - The dimensions of the axis. - * @param {Number} svgDimensions.height - The height of the line. - * @param {Number} svgDimenions.padding - The padding around the line. - * @returns {Boolean} Whether the wrapper renders a dependent axis. - */ - isVerticalAxis(wrapper, svgDimensions) { - const { height, padding } = svgDimensions; - const { x1, x2, y1, y2 } = wrapper.find("line").props(); - - const isVerticalLine = x1 === x2 && y1 !== y2; - const isCorrectHeight = height - padding * 2 === y2 - y1; - - return isVerticalLine && isCorrectHeight; - } -}; - -export default assign({}, expectations, helpers); diff --git a/test/client/spec/victory-area/area.spec.js b/test/client/spec/victory-area/area.spec.js deleted file mode 100644 index ab4832b03..000000000 --- a/test/client/spec/victory-area/area.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import React from "react"; -import { mount } from "enzyme"; -import { Area } from "victory-area"; -import { Path } from "victory-core"; -import { merge } from "lodash"; - -describe("victory-primitives/area", () => { - const baseProps = { - data: [ - { _x1: 1, x1: 1, _y1: 4, y1: 4, _y0: 0, eventKey: 0 }, - { _x1: 2, x1: 2, _y1: 5, y1: 5, _y0: 0, eventKey: 1 }, - { _x1: 3, x1: 3, _y1: 7, y1: 7, _y0: 0, eventKey: 2 }, - { _x1: 4, x1: 4, _y1: 10, y1: 10, _y0: 0, eventKey: 3 }, - { _x1: 5, x1: 5, _y1: 15, y1: 15, _y0: 0, eventKey: 4 } - ], - scale: { - x: (x) => x, - y: (y) => y - }, - interpolation: "basis", - style: { - stroke: "tomato" - } - }; - - it("should render a single area and no line when no line style is given", () => { - const props = merge({}, baseProps, { - style: { - stroke: "none" - } - }); - - const wrapper = mount(); - expect(wrapper.find(Path).length).to.eql(1); - }); - - it("should render an area and line when a line style is given", () => { - const wrapper = mount(); - // multiple paths should be grouped - expect(wrapper.find("g").find(Path).length).to.eql(2); - }); -}); diff --git a/test/client/spec/victory-area/helper-methods.spec.js b/test/client/spec/victory-area/helper-methods.spec.js deleted file mode 100644 index fa92cacc6..000000000 --- a/test/client/spec/victory-area/helper-methods.spec.js +++ /dev/null @@ -1,75 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* eslint-disable max-nested-callbacks */ -/* global sinon */ -import { getDataWithBaseline } from "victory-area/es/helper-methods"; -import { Data } from "victory-core"; -import * as d3Scale from "victory-vendor/d3-scale"; - -describe("victory-area/helper-methods", () => { - describe("getDataWithBaseline", () => { - let sandbox; - beforeEach(() => { - sandbox = sinon.createSandbox(); - sandbox.stub(Data, "getData").callsFake((props) => props.data); - }); - - afterEach(() => { - sandbox.restore(); - }); - - const data = [ - { _x: 1, _y: 1 }, - { _x: 2, _y: 1 } - ]; - const stackedData = [ - { _x: 1, _x0: 0, _x1: 1, _y: 1, _y0: 1, _y1: 2 }, - { _x: 2, _x0: 0, _x1: 2, _y: 1, _y0: 1, _y1: 2 } - ]; - const defaultDomain = { x: [0, 10], y: [0, 10] }; - const nonZeroDomain = { x: [0, 10], y: [1, 10] }; - const negativeDomain = { x: [0, 10], y: [-1, 10] }; - const scale = (domain) => { - return { - x: d3Scale.scaleLinear().domain(domain.x), - y: d3Scale.scaleLinear().domain(domain.y) - }; - }; - - it("should return the minimum if yOffset is not present", () => { - const props = { data }; - const result = getDataWithBaseline(props, scale(defaultDomain)); - const expectedResult = [ - { _y0: 0, _y1: 1, _y: 1, _x: 1, _x0: 0, _x1: 1 }, - { _y0: 0, _y1: 1, _y: 1, _x: 2, _x0: 0, _x1: 2 } - ]; - expect(result).to.eql(expectedResult); - }); - - it("should return the domain minimum when it is greater than zero", () => { - const props = { data }; - const result = getDataWithBaseline(props, scale(nonZeroDomain)); - const expectedResult = [ - { _y0: 1, _y1: 1, _y: 1, _x: 1, _x0: 0, _x1: 1 }, - { _y0: 1, _y1: 1, _y: 1, _x: 2, _x0: 0, _x1: 2 } - ]; - expect(result).to.eql(expectedResult); - }); - - it("should return zero when the domain minimum is negative", () => { - const props = { data }; - const result = getDataWithBaseline(props, scale(negativeDomain)); - const expectedResult = [ - { _y0: 0, _y1: 1, _y: 1, _x: 1, _x0: 0, _x1: 1 }, - { _y0: 0, _y1: 1, _y: 1, _x: 2, _x0: 0, _x1: 2 } - ]; - expect(result).to.eql(expectedResult); - }); - - it("should return yOffset if present", () => { - const props = { data: stackedData }; - const result = getDataWithBaseline(props, scale(defaultDomain)); - const expectedResult = stackedData; - expect(result).to.eql(expectedResult); - }); - }); -}); diff --git a/test/client/spec/victory-area/victory-area.spec.js b/test/client/spec/victory-area/victory-area.spec.js deleted file mode 100644 index 45264223d..000000000 --- a/test/client/spec/victory-area/victory-area.spec.js +++ /dev/null @@ -1,252 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -/* eslint-disable max-nested-callbacks */ -/* eslint no-unused-expressions: 0 */ -import React from "react"; -import { range, omit } from "lodash"; -import { shallow, mount } from "enzyme"; -import { curveCatmullRom } from "victory-vendor/d3-shape"; -import SvgTestHelper from "../svg-test-helper"; -import { VictoryArea, Area } from "victory-area"; -import { VictoryLabel } from "victory-core"; - -describe("components/victory-area", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-area"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewbox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - }); - - describe("component rendering with data", () => { - it("renders the correct d3 path", () => { - const props = { - width: 400, - height: 300, - padding: 50, - scale: "linear", - interpolation: "linear", - data: [ - { x: 0, y: 0, y0: 0 }, - { x: 2, y: 3, y0: 0 }, - { x: 4, y: 1, y0: 0 } - ] - }; - const wrapper = mount(); - const area = wrapper.find(Area); - SvgTestHelper.expectCorrectD3Path(area, props, "area"); - }); - - it("renders the correct d3 path with custom interpolation", () => { - const props = { - width: 400, - height: 300, - padding: 50, - scale: "linear", - data: [ - { x: 0, y: 0, y0: 0 }, - { x: 2, y: 3, y0: 0 }, - { x: 4, y: 1, y0: 0 } - ] - }; - const stringWrapper = mount( - - ); - const stringArea = stringWrapper.find(Area); - const stringPath = stringArea.find("path").prop("d"); - SvgTestHelper.expectCorrectD3Path( - stringArea, - { ...props, interpolation: "catmullRom" }, - "area" - ); - - const functionWrapper = mount( - - ); - const functionArea = functionWrapper.find(Area); - const functionPath = functionArea.find("path").prop("d"); - SvgTestHelper.expectCorrectD3Path( - functionArea, - { ...props, interpolation: curveCatmullRom }, - "area" - ); - - expect(functionPath).to.equal(stringPath); - }); - - it("sorts data according to sortKey prop", () => { - const props = { - scale: "linear", - interpolation: "linear", - sortKey: "x", - data: range(5) - .map((i) => ({ x: i, y: i, y0: 0 })) - .reverse() - }; - const wrapper = shallow(); - - const xValues = wrapper - .find(Area) - .first() - .prop("data") - .map((datum) => datum._x); - expect(xValues).to.eql([0, 1, 2, 3, 4]); - }); - - it("sorts data according to sortOrder prop", () => { - const props = { - scale: "linear", - interpolation: "linear", - sortKey: "x", - sortOrder: "descending", - data: range(5) - .map((i) => ({ x: i, y: i, y0: 0 })) - .reverse() - }; - const wrapper = shallow(); - - const xValues = wrapper - .find(Area) - .first() - .prop("data") - .map((datum) => datum._x); - expect(xValues).to.eql([4, 3, 2, 1, 0]); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "data", - "scale", - "width", - "height", - "style" - ); - }); - - it("attaches an event to data", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const DataComponent = wrapper.find(Area); - DataComponent.forEach((node, index) => { - const initialProps = DataComponent.at(index).props(); - node.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - }); - }); - - it("attaches an event to a label", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Labels = wrapper.find(VictoryLabel); - Labels.forEach((node, index) => { - node.childAt(0).simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[index][1]).to.contain({ text: "okay" }); - }); - }); - }); - - describe("accessibility", () => { - it("adds an aria role to the path area", () => { - const wrapper = mount(); - wrapper.find("path").forEach((p) => { - const role = p.prop("role"); - if (role) { - expect(role).to.be.a("string"); - expect(role).to.equal("presentation"); - } - }); - }); - - it("adds aria-label and tabIndex to Area primitive", () => { - const ariaTestData = [ - { x: 1, y: 2 }, - { x: 2, y: 3 }, - { x: 3, y: 5 }, - { x: 4, y: 4 }, - { x: 5, y: 7 } - ]; - const wrapper = mount( - `data point 1's x value is ${data[0].x}`} - tabIndex={4} - /> - } - /> - ); - - expect(wrapper.find("path")).to.have.length(1); - wrapper.find("path").forEach((p, i) => { - expect(p.prop("aria-label")).to.equal( - `data point 1's x value is ${ariaTestData[i].x}` - ); - expect(p.prop("tabIndex")).to.equal(4); - }); - }); - }); -}); diff --git a/test/client/spec/victory-axis/victory-axis.spec.js b/test/client/spec/victory-axis/victory-axis.spec.js deleted file mode 100644 index 176944eb7..000000000 --- a/test/client/spec/victory-axis/victory-axis.spec.js +++ /dev/null @@ -1,367 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -/*eslint-disable max-nested-callbacks */ -/* eslint no-unused-expressions: 0 */ - -import React from "react"; -import { omit } from "lodash"; -import { shallow, mount } from "enzyme"; -import SvgTestHelper from "../svg-test-helper"; -import { VictoryAxis } from "victory-axis"; -import { VictoryLabel, LineSegment } from "victory-core"; -import { _approximateTextSizeInternal } from "victory-core/es/victory-util/textsize"; - -describe("components/victory-axis", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-axis"); - expect(svgNode.getAttribute("aria-label")).to.equal("Axis"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("renders the appropriate number of ticks", () => { - const tickValues = [1, 2, 3]; - const style = { ticks: { stroke: "black" } }; - const wrapper = shallow( - } - /> - ); - const ticks = wrapper.find('[type="tick"]'); - expect(ticks.length).to.equal(tickValues.length); - }); - - it("does not render invisible ticks", () => { - const tickValues = [1, 2, 3]; - const style = { ticks: { stroke: "none" } }; - const wrapper = shallow( - } - /> - ); - const ticks = wrapper.find('[type="tick"]'); - expect(ticks.length).to.equal(0); - }); - - it("renders invisible ticks that have events", () => { - const tickValues = [1, 2, 3]; - const style = { ticks: { stroke: "none" } }; - const wrapper = shallow( - {} - } - } - ]} - tickValues={tickValues} - style={style} - tickComponent={} - /> - ); - const ticks = wrapper.find('[type="tick"]'); - expect(ticks.length).to.equal(tickValues.length); - }); - - it("renders ticks as lines", () => { - const wrapper = mount( - } /> - ); - const ticks = wrapper.find('[type="axis"]'); - ticks.forEach(SvgTestHelper.expectIsALine); - }); - - it("renders a line", () => { - const wrapper = mount( - } /> - ); - const line = wrapper.find('[type="axis"]'); - SvgTestHelper.expectIsALine(line); - }); - }); - - it("renders labels with auto-generated ids if id is not provided", () => { - const wrapper = shallow( - } - /> - ); - const labels = wrapper.find("VictoryLabel"); - expect(labels.length).to.equal(3); - expect(labels.at(0).prop("id")).to.equal("axis-tickLabels-0"); - expect(labels.at(1).prop("id")).to.equal("axis-tickLabels-1"); - expect(labels.at(2).prop("id")).to.equal("axis-tickLabels-2"); - }); - - it("renders labels with calculated ids if a function is provided", () => { - const wrapper = shallow( - - `generated-id-${props.text[props.index].toLowerCase()}` - } - /> - } - /> - ); - const labels = wrapper.find("VictoryLabel"); - expect(labels.length).to.equal(3); - expect(labels.at(0).html()).to.contain('id="generated-id-apple"'); - expect(labels.at(1).html()).to.contain('id="generated-id-banana"'); - expect(labels.at(2).html()).to.contain('id="generated-id-carrot"'); - }); - - describe("dependentAxis prop", () => { - it("renders a horizontal axis by default", () => { - const props = { padding: 50, width: 300 }; - const wrapper = mount( - } /> - ); - const line = wrapper.find('[type="axis"]'); - expect(SvgTestHelper.isHorizontalAxis(line, props)).to.equal(true); - }); - - it("renders a vertical axis if specified", () => { - const props = { padding: 50, height: 300 }; - const wrapper = mount( - } - /> - ); - const line = wrapper.find('[type="axis"]'); - expect(SvgTestHelper.isVerticalAxis(line, props)).to.equal(true); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "ticks", - "scale", - "width", - "height", - "style" - ); - }); - - it("attaches an event to the axis line", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - } - /> - ); - const Data = wrapper.find('[type="axis"]'); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - node.simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - }); - describe("label overlap", () => { - describe("with empty label widths", () => { - let sandbox; - before(() => { - sandbox = sinon.createSandbox(); - sandbox.stub(_approximateTextSizeInternal, "impl").returns({ - width: 0, - height: 0 - }); - }); - after(() => { - sandbox.restore(); - }); - - it("renders the appropriate number of ticks", () => { - const wrapper = shallow( - } - /> - ); - expect(wrapper.find('[type="tick"]').length).to.equal(3); - }); - }); - describe("with not empty label widths", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - sandbox.stub(_approximateTextSizeInternal, "impl").returns({ - width: 30, - height: 30 - }); - }); - - afterEach(() => { - sandbox.restore(); - }); - - it("renders the appropriate number of ticks with default options", () => { - const style = { ticks: { stroke: "black" } }; - const wrapper = shallow( - } - /> - ); - expect(wrapper.find('[type="tick"]').length).to.equal(3); - }); - - it("renders the appropriate number of ticks with fixLabelOverlap options", () => { - const wrapper = shallow( - } - /> - ); - expect(wrapper.find('[type="tick"]').length).to.equal(2); - }); - - it("renders ticks with similar gaps when ticks height sum greater then axis height", () => { - const wrapper = shallow( - - ); - const labelTexts = wrapper - .find("VictoryLabel") - .map((tick) => tick.props("text").text); - expect(labelTexts.filter((text) => text === "1")).to.be.not.empty; - expect(labelTexts.filter((text) => text === "2")).to.be.empty; - expect(labelTexts.filter((text) => text === "3")).to.be.not.empty; - expect(labelTexts.filter((text) => text === "4")).to.be.empty; - }); - it("renders the appropriate ticks for dependent axis", () => { - const wrapper = shallow( - - ); - const labelTexts = wrapper - .find("VictoryLabel") - .map((tick) => tick.props("text").text); - expect(labelTexts.filter((text) => text === "1")).to.be.not.empty; - expect(labelTexts.filter((text) => text === "2")).to.be.empty; - expect(labelTexts.filter((text) => text === "3")).to.be.not.empty; - }); - it("renders the appropriate number of ticks with paddings (number)", () => { - const wrapper = shallow( - } - /> - ); - expect(wrapper.find('[type="tick"]').length).to.equal(2); - }); - it("renders the appropriate number of ticks with paddings (object) and dependentAxis", () => { - const wrapper = shallow( - } - /> - ); - expect(wrapper.find('[type="tick"]').length).to.equal(2); - }); - }); - }); -}); diff --git a/test/client/spec/victory-bar/bar.spec.js b/test/client/spec/victory-bar/bar.spec.js deleted file mode 100644 index 9ebbc7220..000000000 --- a/test/client/spec/victory-bar/bar.spec.js +++ /dev/null @@ -1,73 +0,0 @@ -import React from "react"; -import { mount } from "enzyme"; -import { Bar } from "victory-bar"; -import SvgTestHelper from "../svg-test-helper"; -import * as d3Scale from "victory-vendor/d3-scale"; -import { assign, merge } from "lodash"; - -describe("victory-primitives/bar", () => { - const baseProps = { - data: [ - { _x: 2, x: 2, _y: 4, y: 4, eventKey: 0 }, - { _x: 3, x: 3, _y: 5, y: 5, eventKey: 1 } - ], - datum: { _x: 2, x: 2, _y: 4, y: 4, eventKey: 0 }, - x: 2, - x0: 0, - y: 10, - y0: 0, - scale: { - x: d3Scale.scaleLinear(), - y: d3Scale.scaleLinear() - } - }; - - it("should render a vertical bar", () => { - const wrapper = mount(); - const barShape = SvgTestHelper.getBarShape(wrapper); - expect(Math.round(barShape.height)).to.eql(10); - }); - - it("should render a horizontal bar", () => { - const props = merge({}, baseProps, { horizontal: true }); - - const wrapper = mount(); - const barShape = SvgTestHelper.getBarShape(wrapper); - - expect(Math.round(barShape.width)).to.eql(2); - }); - - it("should render a default bar width when one is not provided", () => { - const props = merge({}, baseProps, { - width: 10, - padding: 1, - data: Array(4) - }); - - const wrapper = mount(); - const barShape = SvgTestHelper.getBarShape(wrapper); - - expect(Math.floor(barShape.width)).to.eql(2); - }); - - it("should allow override of width by passing a style", () => { - const props = assign({}, baseProps, { style: { width: 3 } }); - - const wrapper = mount(); - const barShape = SvgTestHelper.getBarShape(wrapper); - - expect(Math.floor(barShape.width)).to.eql(3); - }); - - it("should allow modification of width by passing barRatio", () => { - const props = assign({}, baseProps, { - data: [{ _x: 2, x: 2, _y: 4, y: 4, eventKey: 0 }], - barRatio: 3 - }); - - const wrapper = mount(); - const barShape = SvgTestHelper.getBarShape(wrapper); - - expect(Math.floor(barShape.width)).to.eql(24); - }); -}); diff --git a/test/client/spec/victory-bar/geometry-helper-methods.spec.js b/test/client/spec/victory-bar/geometry-helper-methods.spec.js deleted file mode 100644 index 6255f4dbd..000000000 --- a/test/client/spec/victory-bar/geometry-helper-methods.spec.js +++ /dev/null @@ -1,117 +0,0 @@ -import { circle, point } from "victory-bar/es/geometry-helper-methods"; - -const epsilon = 0.01; // float imprecision - -describe("point", () => { - it("calculates distance correctly for positive coordinates", () => { - const p0 = point(1, 2); - const p1 = point(2, 3); - const answer = Math.sqrt(2); - expect(p0.distance(p1)).to.be.within(answer - epsilon, answer + epsilon); - }); - it("calculates distance correctly for negative coordinates", () => { - const p0 = point(-1, -2); - const p1 = point(-2, -3); - const answer = Math.sqrt(2); - expect(p0.distance(p1)).to.be.within(answer - epsilon, answer + epsilon); - }); - it("calculates distance correctly for zero coordinates", () => { - const p0 = point(0, 0); - const p1 = point(0, 0); - const answer = 0; - expect(p0.distance(p1)).to.be.within(answer - epsilon, answer + epsilon); - }); - it("can add correctly", () => { - const p0 = point(1, 1); - const p1 = point(2, 3); - const { x, y } = p0.add(p1); - expect(x).to.equal(3); - expect(y).to.equal(4); - }); - it("can subtract correctly", () => { - const p0 = point(1, 1); - const p1 = point(2, 3); - const { x, y } = p1.subtract(p0); - expect(x).to.equal(1); - expect(y).to.equal(2); - }); - it("can scalar multiply correctly", () => { - const p = point(3, 4); - const { x, y } = p.scalarMult(-2); - expect(x).to.equal(-6); - expect(y).to.equal(-8); - }); - it("can scalar divide correctly", () => { - const p = point(3, 4); - const { x, y } = p.scalarDivide(2); - const answerX = 1.5; - const answerY = 2; - expect(x).to.be.within(answerX - epsilon, answerX + epsilon); - expect(y).to.be.within(answerY - epsilon, answerY + epsilon); - }); - it("throws when dividing by zero", () => { - const p = point(3, 4); - expect(() => p.scalarDivide(0)).to.throw(); - }); - it("can check for equality correctly", () => { - const p0 = point(3, 4); - const p1 = point(3, 4); - expect(p0.equals(p1)).to.equal(true); - }); -}); - -describe("circle", () => { - describe("calculates circle-circle intersection correctly", () => { - it("handles separate circles", () => { - const c0 = circle(point(0, 0), 1); - const c1 = circle(point(0, 10), 1); - expect(c0.intersection(c1)).to.eql([]); - }); - it("handles one circle containing another", () => { - const c0 = circle(point(0, 0), 2); - const c1 = circle(point(0, 0), 10); - expect(c0.intersection(c1)).to.eql([]); - }); - it("handles same circle case", () => { - const c0 = circle(point(0, 0), 1); - const c1 = circle(point(0, 0), 1); - expect(c0.intersection(c1)).to.eql([]); - }); - it("handles circles of zero radius", () => { - // I chose to define the intersection as 'none' - // instead of point(0, 0) to stay consistent with - // the "handles same circle case" above - const c0 = circle(point(0, 0), 0); - const c1 = circle(point(0, 0), 0); - expect(c0.intersection(c1)).to.eql([]); - - const c2 = circle(point(0, 0), 0); - const c3 = circle(point(0, 1), 0); - expect(c2.intersection(c3)).to.eql([]); - }); - it("handles circles meeting at exactly one point", () => { - const c0 = circle(point(0, 0), 1); - const c1 = circle(point(0, 2), 1); - const [{ x: x0, y: y0 }, { x: x1, y: y1 }] = c0.intersection(c1); - expect(x0).to.equal(0); - expect(x1).to.equal(0); - expect(y0).to.equal(1); - expect(y1).to.equal(1); - }); - it("handles circles meeting at two points", () => { - const c0 = circle(point(2, 3), 3); - const c1 = circle(point(1, -1), 4); - const [{ x: x0, y: y0 }, { x: x1, y: y1 }] = c0.intersection(c1); - expect(x0).to.be.within(-0.96 - epsilon, -0.96 + epsilon); - expect(y0).to.be.within(2.49 - epsilon, 2.49 + epsilon); - expect(x1).to.be.within(4.37 - epsilon, 4.37 + epsilon); - expect(y1).to.be.within(1.16 - epsilon, 1.16 + epsilon); - }); - it("the left-most point is the 0th element, the right-most is the 1st", () => { - const c0 = circle(point(2, 3), 3); - const c1 = circle(point(1, -1), 4); - const [{ x: x0 }, { x: x1 }] = c0.intersection(c1); - expect(x0 <= x1).to.equal(true); - }); - }); -}); diff --git a/test/client/spec/victory-bar/victory-bar.spec.js b/test/client/spec/victory-bar/victory-bar.spec.js deleted file mode 100644 index a0a68257e..000000000 --- a/test/client/spec/victory-bar/victory-bar.spec.js +++ /dev/null @@ -1,254 +0,0 @@ -/** - * Client tests - */ -/*eslint-disable max-nested-callbacks */ -/* global sinon */ -/* eslint no-unused-expressions: 0 */ - -import React from "react"; -import { shallow, mount } from "enzyme"; -import { omit, range } from "lodash"; -import SvgTestHelper from "../svg-test-helper"; -import { VictoryBar, Bar } from "victory-bar"; - -describe("components/victory-bar", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-bar"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("renders 4 bars", () => { - const wrapper = shallow(); - const bars = wrapper.find(Bar); - expect(bars.length).to.equal(4); - }); - - it("renders each bar as a rectangle", () => { - const wrapper = mount(); - const bars = wrapper.find(Bar); - bars.forEach(SvgTestHelper.expectIsRectangular); - }); - }); - - describe("rendering data", () => { - it("renders bars for {x, y} shaped data (default)", () => { - const data = range(10).map((i) => ({ x: i, y: i })); - const wrapper = shallow(); - const bars = wrapper.find(Bar); - expect(bars.length).to.equal(10); - }); - - it("renders ordered bars when sortKey is passed", () => { - const data = range(5) - .map((i) => ({ x: i, y: i })) - .reverse(); - const wrapper = shallow(); - const xValues = wrapper.find(Bar).map((bar) => bar.prop("datum")._x); - expect(xValues).to.eql([0, 1, 2, 3, 4]); - }); - - it("renders reverse ordered bars when sortOrder is descending", () => { - const data = range(5) - .map((i) => ({ x: i, y: i })) - .reverse(); - const wrapper = shallow( - - ); - const xValues = wrapper.find(Bar).map((bar) => bar.prop("datum")._x); - expect(xValues).to.eql([4, 3, 2, 1, 0]); - }); - - it("renders bars for array-shaped data", () => { - const data = range(20).map((i) => [i, i]); - const wrapper = shallow(); - const bars = wrapper.find(Bar); - expect(bars.length).to.equal(20); - }); - - it("renders bars for deeply-nested data", () => { - const data = range(40).map((i) => ({ a: { b: [{ x: i, y: i }] } })); - const wrapper = shallow( - - ); - const bars = wrapper.find(Bar); - expect(bars.length).to.equal(40); - }); - - it("renders bars values with null accessor", () => { - const data = range(30); - const wrapper = shallow(); - const bars = wrapper.find(Bar); - expect(bars.length).to.equal(30); - }); - - it("renders bars with appropriate relative heights", () => { - const wrapper = mount( - - ); - const bars = wrapper.find(Bar); - const heights = bars.map(SvgTestHelper.getBarHeight); - - expect(heights[1] / 2).to.be.closeTo(heights[0], 0.5); - expect((heights[2] / 3) * 2).to.be.closeTo(heights[1], 0.5); - }); - - it("does not render data with null x or y values", () => { - const data = [ - { x: 1, y: 2 }, - { x: null, y: 4 }, - { x: 5, y: null } - ]; - const wrapper = mount(); - expect(wrapper.find(Bar).length).to.equal(1); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "data", - "scale", - "width", - "height", - "style" - ); - }); - - it("attaches an event to data", () => { - const clickHandler = sinon.spy(); - const data = [ - { x: 0, y: 0, label: "0" }, - { x: 1, y: 1, label: "1" }, - { x: 2, y: 2, label: "2" } - ]; - const wrapper = mount( - - ); - const Data = wrapper.find(Bar); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - node.simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - // It should also include the datum - expect(clickHandler.args[index][1].datum).to.include({ - ...data[index] - }); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - it("attaches an event to a label", () => { - const clickHandler = sinon.spy(); - const data = [ - { x: 0, y: 0, label: "0" }, - { x: 1, y: 1, label: "1" }, - { x: 2, y: 2, label: "2" } - ]; - const wrapper = mount( - - ); - const Labels = wrapper.find("VictoryLabel"); - expect(Labels).to.have.lengthOf(3); - Labels.forEach((node, index) => { - node.childAt(0).simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[index][1]).to.contain({ text: `${index}` }); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - }); - - describe("accessibility", () => { - it("adds an aria role to each bar in the series", () => { - const data = range(20).map((y, x) => ({ x, y })); - const wrapper = mount(); - - wrapper.find("path").forEach((p) => { - const roleValue = p.prop("role"); - expect(roleValue).to.be.a("string"); - expect(roleValue).to.equal("presentation"); - }); - }); - - it("applies aria-label and tabIndex to the Bar primitive", () => { - const data = range(5, 11).map((y, x) => ({ y, x })); - const wrapper = mount( - `x: ${datum.x}`} - tabIndex={({ index }) => index + 1} - /> - } - /> - ); - wrapper.find("path").forEach((p, i) => { - const index = p.prop("index"); - expect(p.prop("tabIndex")).to.equal(index + 1); - expect(p.prop("aria-label")).to.equal(`x: ${data[i].x}`); - }); - }); - }); -}); diff --git a/test/client/spec/victory-box-plot/victory-box-plot.spec.js b/test/client/spec/victory-box-plot/victory-box-plot.spec.js deleted file mode 100644 index b9dfc27cd..000000000 --- a/test/client/spec/victory-box-plot/victory-box-plot.spec.js +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Client tests - */ -/*eslint-disable max-nested-callbacks,no-unused-expressions,react/prop-types */ -import React from "react"; -import { shallow, mount } from "enzyme"; -import { VictoryBoxPlot } from "victory-box-plot"; -import { LineSegment, Whisker, Border, Box } from "victory-core"; - -const dataset = [ - { x: 1, min: 1, max: 18, median: 8, q1: 5, q3: 15 }, - { x: 2, min: 4, max: 20, median: 10, q1: 7, q3: 15 }, - { x: 3, min: 3, max: 12, median: 6, q1: 5, q3: 10 } -]; - -const TestGroup = ({ children }) => { - return {children}; -}; - -describe("components/victory-box-plot", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-boxplot"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("renders 3 points", () => { - const wrapper = shallow(); - const points = wrapper.find(Box); - // two boxes per point - expect(points.length).to.equal(6); - }); - }); - - it("does not render data with null x or y values", () => { - const data = [ - { x: 1, y: 2 }, - { x: 1, y: 3 }, - { x: 1, y: 5 }, - { x: null, y: 2 }, - { x: null, y: 3 }, - { x: null, y: 5 }, - { x: 2, y: null }, - { x: 2, y: null }, - { x: 2, y: null } - ]; - const wrapper = mount( - } /> - ); - expect(wrapper.find('[data-test="testGroup"]').length).to.equal(1); - }); - - it("does not render data with null y values when given an array", () => { - const data = [ - { x: 1, y: [1, 2, 3, 5, 8] }, - { x: 1, y: [null, 2, 5, 9, 14] } - ]; - const wrapper = mount( - } /> - ); - expect(wrapper.find('[data-test="testGroup"]').length).to.equal(1); - }); - - it("does not render data with null min, max, median, q1, or q3 values", () => { - const data = [ - { x: 1, min: 2, median: 5, max: 10, q1: 3, q3: 7 }, - { x: 2, min: null, median: 4, max: 9, q1: 3, q3: 6 }, - { x: 3, min: 1, median: null, max: 12, q1: 4, q3: 10 }, - { x: 4, min: 3, median: 9, max: null, q1: 5, q3: 13 }, - { x: 5, min: 2, median: 8, max: 15, q1: null, q3: 12 }, - { x: 5, min: 2, median: 10, max: 20, q1: 8, q3: null } - ]; - const wrapper = mount( - } /> - ); - expect(wrapper.find('[data-test="testGroup"]').length).to.equal(1); - }); - - describe("accessibility", () => { - it("adds an aria role to each point in the series", () => { - const wrapper = mount(); - - wrapper.find("rect").forEach((r) => { - const roleValue = r.prop("role"); - if (roleValue) { - expect(roleValue).to.be.a("string"); - expect(roleValue).to.equal("presentation"); - } - }); - }); - - it("applies tabIndex and aria-label to whisker primitive ", () => { - const wrapper = mount( - `${datum.x} max is ${datum._max}`} - tabIndex={({ index }) => index + 1} - /> - } - /> - ); - - const whiskersWithAriaLabel = wrapper - .find("line") - .filterWhere((l) => l.prop("aria-label")); - expect( - whiskersWithAriaLabel.first().html().includes("1 max is 18") - ).to.equal(true); - expect( - whiskersWithAriaLabel.last().html().includes("3 max is 12") - ).to.equal(true); - expect( - whiskersWithAriaLabel.at(3).html().includes("2 max is 25") - ).to.equal(false); - // 2 whiskers for each max value for "T" shape - expect(whiskersWithAriaLabel).to.have.length(6); - }); - - it("applies tabIndex and aria-label to border primitive ", () => { - const wrapper = mount( - `${datum.x} q3 value is ${datum._q3}`} - tabIndex={({ index }) => index + 2.1} - /> - } - /> - ); - const q3Elements = wrapper - .find("rect") - .filterWhere((l) => l.prop("aria-label")); - expect(q3Elements.first().html().includes("1 q3 value is 15")).to.equal( - true - ); - expect(q3Elements.at(1).html().includes("2 q3 value is 15")).to.equal( - true - ); - expect(q3Elements.at(1).html().includes("2 q3 value is 8")).to.equal( - false - ); - expect(q3Elements.last().html().includes("3 q3 value is 10")).to.equal( - true - ); - // 2 whiskers for each max value for "T" shape - expect(q3Elements).to.have.length(3); - }); - - it("applies tabIndex and aria-label to line-segmnet primitive ", () => { - const wrapper = mount( - - `${datum.x} median value is ${datum._median}` - } - tabIndex={({ index }) => index + 1.3} - /> - } - /> - ); - const medianLine = wrapper - .find("line") - .filterWhere((l) => l.prop("aria-label")); - expect( - medianLine.first().html().includes("1 median value is 8") - ).to.equal(true); - expect(medianLine.at(1).html().includes("2 median value is 10")).to.equal( - true - ); - expect(medianLine.at(1).html().includes("2 median value is 8")).to.equal( - false - ); - expect(medianLine.last().html().includes("3 median value is 6")).to.equal( - true - ); - // 2 whiskers for each max value for "T" shape - expect(medianLine).to.have.length(3); - }); - }); -}); diff --git a/test/client/spec/victory-brush-container/brush-helpers.spec.js b/test/client/spec/victory-brush-container/brush-helpers.spec.js deleted file mode 100644 index 76f65eed7..000000000 --- a/test/client/spec/victory-brush-container/brush-helpers.spec.js +++ /dev/null @@ -1,75 +0,0 @@ -/* eslint-disable no-unused-expressions,react/no-multi-comp */ -import { BrushHelpers } from "victory-brush-container"; - -describe("containers/brush-helpers", () => { - describe("withinBounds", () => { - it("returns true when within bounds", () => { - const point = { x: 1, y: 1 }; - const bounds = { x1: 0, x2: 2, y1: 0, y2: 2 }; - const isWithinBoundsResults = BrushHelpers.withinBounds(point, bounds); - expect(isWithinBoundsResults).to.eql(true); - }); - - it("returns false when not within bounds", () => { - const point = { x: 10, y: 1 }; - const bounds = { x1: 0, x2: 2, y1: 0, y2: 2 }; - const isWithinBoundsResults = BrushHelpers.withinBounds(point, bounds); - expect(isWithinBoundsResults).to.eql(false); - }); - - it("returns true when within bounds using dates", () => { - const point = { x: new Date("1/2/2017"), y: 1 }; - const bounds = { - x1: new Date("1/1/2017"), - x2: new Date("2/1/2017"), - y1: 0, - y2: 2 - }; - const isWithinBoundsResults = BrushHelpers.withinBounds(point, bounds); - expect(isWithinBoundsResults).to.eql(true); - }); - - it("returns false when not within bounds using dates", () => { - const point = { x: new Date("3/2/2017"), y: 1 }; - const bounds = { - x1: new Date("1/1/2017"), - x2: new Date("2/1/2017"), - y1: 0, - y2: 2 - }; - const isWithinBoundsResults = BrushHelpers.withinBounds(point, bounds); - expect(isWithinBoundsResults).to.eql(false); - }); - }); - - describe("constrainBox", () => { - it("returns correct box", () => { - const fullDomainBox = { x1: 0, x2: 2, y1: 0, y2: 2 }; - const box = { x1: 1, x2: 2, y1: 1, y2: 2 }; - const constrainBoxResult = BrushHelpers.constrainBox(box, fullDomainBox); - expect(constrainBoxResult).to.eql({ x1: 1, y1: 1, x2: 2, y2: 2 }); - }); - - it("returns correct box when x axis is dates", () => { - const fullDomainBox = { - x1: new Date("1/2/2017 PST"), - x2: new Date("2/1/2017 PST"), - y1: 0, - y2: 2 - }; - const box = { - x1: new Date("1/1/2017 PST"), - x2: new Date("1/10/2017 PST"), - y1: 1, - y2: 2 - }; - const constrainBoxResult = BrushHelpers.constrainBox(box, fullDomainBox); - expect(constrainBoxResult).to.eql({ - x1: 1483344000000, - y1: 1, - x2: 1484121600000, - y2: 2 - }); - }); - }); -}); diff --git a/test/client/spec/victory-candlestick/candle.spec.js b/test/client/spec/victory-candlestick/candle.spec.js deleted file mode 100644 index dc82a1959..000000000 --- a/test/client/spec/victory-candlestick/candle.spec.js +++ /dev/null @@ -1,64 +0,0 @@ -import React from "react"; -import { shallow } from "enzyme"; -import { Candle } from "victory-candlestick"; -import { Line, Rect } from "victory-core"; -import * as d3Scale from "victory-vendor/d3-scale"; - -describe("victory-primitives/candle", () => { - const baseProps = { - data: [ - { x: 1, open: 10, close: 30, high: 50, low: 5, eventKey: 0 }, - { x: 2, open: 40, close: 80, high: 100, low: 10, eventKey: 1 } - ], - datum: { x: 1, open: 10, close: 30, high: 50, low: 5, eventKey: 0 }, - scale: { - x: d3Scale.scaleLinear(), - y: d3Scale.scaleLinear() - }, - candleWidth: 2, - x: 5, - high: 50, - low: 5, - close: 30, - open: 10 - }; - - it("should render a wick line", () => { - const wrapper = shallow(); - const wicks = wrapper.find(Line); - const values = [ - { - x1: 5, - x2: 5, - y1: 50, - y2: 10 - }, - { - x1: 5, - x2: 5, - y1: 30, - y2: 5 - } - ]; - - wicks.forEach((wick, i) => { - expect(wick.prop("x1")).to.eql(values[i].x1); - expect(wick.prop("x2")).to.eql(values[i].x2); - expect(wick.prop("y1")).to.eql(values[i].y1); - expect(wick.prop("y2")).to.eql(values[i].y2); - }); - }); - - it("should render a candle rectangle", () => { - const wrapper = shallow(); - const rect = wrapper.find(Rect); - - // width = style.width || 0.5 * (width - 2 * padding) / data.length; - - expect(rect.prop("width")).to.eql(2); - expect(rect.prop("height")).to.eql(20); - // x = x - width / 2 - expect(rect.prop("x")).to.eql(4); - expect(rect.prop("y")).to.eql(10); - }); -}); diff --git a/test/client/spec/victory-candlestick/helper-methods.spec.js b/test/client/spec/victory-candlestick/helper-methods.spec.js deleted file mode 100644 index 430155db3..000000000 --- a/test/client/spec/victory-candlestick/helper-methods.spec.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* eslint max-nested-callbacks: 0 */ -import { getData, getDomain } from "victory-candlestick/es/helper-methods"; -import { range } from "lodash"; -import { fromJS } from "immutable"; - -const immutableGetDataTest = { - createData: (x) => fromJS(x), - testLabel: "with immutable data" -}; -const getDataTest = { - createData: (x) => x, - testLabel: "with js data" -}; - -[getDataTest, immutableGetDataTest].forEach(({ createData, testLabel }) => { - describe(`victory-candlestick/helper-methods ${testLabel}`, () => { - describe("getData", () => { - it("sorts data by sortKey", () => { - const data = createData( - range(5) - .map((i) => ({ x: i, open: i, close: i, high: i, low: i })) - .reverse() - ); - - const dataResult = getData({ - data, - x: "x", - open: "open", - close: "close", - high: "high", - low: "low", - sortKey: "x" - }); - - expect(dataResult.map((datum) => datum.x)).to.eql([0, 1, 2, 3, 4]); - }); - }); - - describe("getDomain", () => { - const dataSet = createData([ - { x: 5, open: 10, close: 20, high: 25, low: 5 }, - { x: 10, open: 15, close: 25, high: 30, low: 10 } - ]); - - it("returns a domain array for the x axis", () => { - const domainXResult = getDomain( - { - data: dataSet, - x: "x", - open: "open", - close: "close", - high: "high", - low: "low" - }, - "x" - ); - expect(domainXResult).to.eql([5, 10]); - }); - - it("returns a domain array for the y axis", () => { - const domainYResult = getDomain( - { - data: dataSet, - open: "open", - close: "close", - high: "high", - low: "low" - }, - "y" - ); - expect(domainYResult).to.eql([5, 30]); - }); - }); - }); -}); diff --git a/test/client/spec/victory-candlestick/victory-candlestick.spec.js b/test/client/spec/victory-candlestick/victory-candlestick.spec.js deleted file mode 100644 index cd050a0a4..000000000 --- a/test/client/spec/victory-candlestick/victory-candlestick.spec.js +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -/*eslint-disable max-nested-callbacks,no-unused-expressions */ -import React from "react"; -import { shallow, mount } from "enzyme"; -import { range, omit } from "lodash"; -import { VictoryCandlestick, Candle } from "victory-candlestick"; -import { VictoryLabel } from "victory-core"; - -class MyCandle extends React.Component { - render() {} -} - -const dataSet = [ - { x: 5, open: 10, close: 20, high: 25, low: 5 }, - { x: 1, open: 80, close: 40, high: 120, low: 10, label: "1" } -]; - -describe("components/victory-candlestick", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal( - "victory-candlestick" - ); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("renders 8 points", () => { - const wrapper = shallow(); - const points = wrapper.find(Candle); - expect(points.length).to.equal(8); - }); - }); - - describe("rendering data", () => { - it("renders injected points for {x, y} shaped data (default)", () => { - const data = range(10).map((i) => ({ - x: i, - open: i, - close: i, - high: i, - low: i - })); - const wrapper = shallow( - } /> - ); - - const points = wrapper.find(MyCandle); - expect(points.length).to.equal(10); - }); - - it("renders points for {x, y} shaped data (default)", () => { - const data = range(10).map((i) => ({ - x: i, - open: i, - close: i, - high: i, - low: i - })); - const wrapper = shallow(); - const points = wrapper.find(Candle); - expect(points.length).to.equal(10); - }); - - it("renders ordered bars when sortKey is passed", () => { - const data = range(5) - .map((i) => ({ x: i, open: i, close: i, high: i, low: i })) - .reverse(); - const wrapper = shallow(); - const xValues = wrapper.find(Candle).map((bar) => bar.prop("datum")._x); - expect(xValues).to.eql([0, 1, 2, 3, 4]); - }); - - it("renders reverse ordered bars when sortOrder is descending", () => { - const data = range(5) - .map((i) => ({ x: i, open: i, close: i, high: i, low: i })) - .reverse(); - const wrapper = shallow( - - ); - const xValues = wrapper.find(Candle).map((bar) => bar.prop("datum")._x); - expect(xValues).to.eql([4, 3, 2, 1, 0]); - }); - - it("renders points for array-shaped data", () => { - const data = range(20).map((i) => [i, i, i, i, i]); - const wrapper = shallow( - - ); - const points = wrapper.find(Candle); - expect(points.length).to.equal(20); - }); - - it("renders points for deeply-nested data", () => { - const data = range(40).map((i) => ({ - a: { b: [{ x: i, open: i, close: i, high: i, low: i }] } - })); - const wrapper = shallow( - - ); - const points = wrapper.find(Candle); - expect(points.length).to.equal(40); - }); - - it("renders data values with null accessor", () => { - const data = range(30); - const wrapper = shallow( - - ); - const points = wrapper.find(Candle); - expect(points.length).to.equal(30); - }); - - it("does not render data with null x, open, close, high, or low values", () => { - const data = [ - { x: 1, open: 10, close: 17, high: 19, low: 8 }, - { x: null, open: 17, close: 17, high: 17, low: 17 }, - { x: 2, open: null, close: 17, high: 17, low: 17 }, - { x: 3, open: 17, close: null, high: 17, low: 17 }, - { x: 4, open: 17, close: 17, high: null, low: 17 }, - { x: 5, open: 17, close: 17, high: 17, low: null } - ]; - const wrapper = mount(); - expect(wrapper.find(Candle).length).to.equal(1); - }); - }); - - describe("event handling", () => { - it("attaches an event to data", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Data = wrapper.find(Candle); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - node.find("rect").simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - it("attaches an event to a label", () => { - const clickHandler = sinon.spy(); - const data = [ - { x: 0, open: 9, close: 30, high: 56, low: 7, label: "0" }, - { x: 1, open: 80, close: 40, high: 120, low: 10, label: "1" }, - { x: 2, open: 50, close: 80, high: 90, low: 20, label: "2" } - ]; - const wrapper = mount( - - ); - const Labels = wrapper.find(VictoryLabel); - Labels.forEach((node, index) => { - node.childAt(0).simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(clickHandler.args[index][1]).to.contain({ text: `${index}` }); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - }); - - describe("accessibility", () => { - it("adds an aria role to each point in the series", () => { - const data = [ - { x: 0, open: 9, close: 30, high: 56, low: 7 }, - { x: 1, open: 80, close: 40, high: 120, low: 10 }, - { x: 2, open: 50, close: 80, high: 90, low: 20 } - ]; - const wrapper = mount(); - - wrapper.find("rect").forEach((r) => { - const roleValue = r.prop("role"); - if (roleValue) { - expect(roleValue).to.be.a("string"); - expect(roleValue).to.equal("presentation"); - } - }); - }); - - it("adds an aria-label and tabIndex to Candle primitive", () => { - const data = [ - { x: new Date(2016, 6, 1), open: 20, close: 43, high: 66, low: 7 }, - { x: new Date(2016, 6, 2), open: 80, close: 40, high: 120, low: 10 }, - { x: new Date(2016, 6, 3), open: 50, close: 80, high: 90, low: 20 } - ]; - const wrapper = mount( - - `open ${datum.open}, close ${datum.close}` - } - tabIndex={({ index }) => index + 5} - /> - } - /> - ); - - expect(wrapper.find("rect")).to.have.length(3); - expect(wrapper.find("line")).to.have.length(6); - wrapper.find("rect").forEach((p, i) => { - expect(p.prop("aria-label")).to.equal( - `open ${data[i].open}, close ${data[i].close}` - ); - expect(p.prop("tabIndex")).to.equal(i + 5); - }); - wrapper.find("line").forEach((p, i) => { - const dataI = Math.floor(i / 2); - expect(p.prop("aria-label")).to.equal( - `open ${data[dataI].open}, close ${data[dataI].close}` - ); - expect(p.prop("tabIndex")).to.equal(dataI + 5); - }); - }); - }); -}); diff --git a/test/client/spec/victory-chart/helper-methods.spec.js b/test/client/spec/victory-chart/helper-methods.spec.js deleted file mode 100644 index 43c2defea..000000000 --- a/test/client/spec/victory-chart/helper-methods.spec.js +++ /dev/null @@ -1,59 +0,0 @@ -/* global sinon */ -/* eslint-disable no-unused-expressions,react/no-multi-comp */ -import { getChildComponents } from "victory-chart/es/helper-methods"; -import React from "react"; -import { VictoryAxis } from "victory-axis"; -import { VictoryLine } from "victory-line"; -import { Log as _Log } from "victory-core"; - -// The updated module export syntax doesn't work well with sinon -const Log = Object.assign({}, _Log); - -describe("victory-chart/helpers-methods", () => { - const getVictoryLine = (props) => React.createElement(VictoryLine, props); - const getVictoryAxis = (props) => React.createElement(VictoryAxis, props); - - describe("getChildComponents", () => { - const defaultAxes = { - independent: getVictoryAxis({}), - dependent: getVictoryAxis({ dependentAxis: true }) - }; - let spy; - beforeEach(() => { - spy = sinon.spy(Log, "warn"); - }); - - afterEach(() => { - spy.restore(); - }); - - it("returns a pair of default axes when no children are given", () => { - const children = []; - const result = getChildComponents({ children }, defaultAxes); - expect(result).to.have.length(2); - expect(result).to.deep.include.members([ - defaultAxes.independent, - defaultAxes.dependent - ]); - }); - - it("adds default axes when none of the children are axis components", () => { - const line = getVictoryLine({}); - const children = [line]; - const result = getChildComponents({ children }, defaultAxes); - expect(result).to.have.length(3); - expect(result).to.deep.include.members([ - defaultAxes.independent, - defaultAxes.dependent - ]); - }); - - it("does not add default axes if axis any axis components exist in children", () => { - const axis = getVictoryAxis({}); - const children = [axis]; - const result = getChildComponents({ children }, defaultAxes); - expect(result).to.have.length(1); - expect(result[0].props).to.eql(axis.props); - }); - }); -}); diff --git a/test/client/spec/victory-chart/victory-chart.spec.js b/test/client/spec/victory-chart/victory-chart.spec.js deleted file mode 100644 index a09e2fdca..000000000 --- a/test/client/spec/victory-chart/victory-chart.spec.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -/*eslint-disable max-nested-callbacks */ -/* eslint no-unused-expressions: 0 */ - -import React from "react"; -import { shallow, mount } from "enzyme"; -import { VictoryChart } from "victory-chart"; -import { VictoryAxis } from "victory-axis"; - -describe("components/victory-chart", () => { - describe("default component rendering", () => { - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - }); - - describe("axis rendering", () => { - it("renders two axes by default", () => { - const wrapper = shallow(); - const axes = wrapper.find(VictoryAxis); - expect(axes).to.have.lengthOf(2); - }); - - it("renders one axis if one axis is given", () => { - const wrapper = shallow( - - - - ); - const axes = wrapper.find(VictoryAxis); - expect(axes).to.have.lengthOf(1); - }); - - it("allows axis to control the crossAxis, and offset props", () => { - const wrapper = shallow( - - - - ); - const axes = wrapper.find(VictoryAxis); - expect(axes.prop("crossAxis")).to.equal(false); - expect(axes.prop("offsetX")).to.equal(50); - expect(axes.prop("offsetY")).to.equal(50); - }); - - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-chart"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "scale", - "width", - "height", - "style" - ); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-accessible-group/victory-accessible-group.spec.js b/test/client/spec/victory-core/victory-accessible-group/victory-accessible-group.spec.js deleted file mode 100644 index 51334062b..000000000 --- a/test/client/spec/victory-core/victory-accessible-group/victory-accessible-group.spec.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Client tests - */ -/*eslint-disable max-nested-callbacks */ -/* eslint no-unused-expressions: 0 */ -import React from "react"; -import { shallow } from "enzyme"; -import { VictoryAccessibleGroup } from "victory-core"; - -describe("components/victory-accessible-group", () => { - it("renders an g with an aria-label", () => { - const wrapper = shallow( - - ); - expect(wrapper.find("g")).to.have.length(1); - expect(wrapper.find("g").prop("aria-label")).to.equal("test-aria-label"); - }); - - it("renders an g with a tabIndex and className", () => { - const wrapper = shallow( - - ); - expect(wrapper.find("g").prop("tabIndex")).to.equal(5); - expect(wrapper.find("g").prop("className")).to.equal("accessibility"); - }); - - it("renders an g with a desc node if given", () => { - const wrapper = shallow( - - ); - expect(wrapper.find("g").prop("aria-describedby")).to.equal( - "describes group" - ); - expect(wrapper.find("desc").text()).to.equal("test description"); - expect(wrapper.find("desc").props().id).to.equal("describes group"); - }); - - it("uses the desc prop value for descId and aria-describedby if no aria-describedby prop value", () => { - const wrapper = shallow( - - ); - expect(wrapper.find("desc").text()).to.equal( - "applies to both aria-describeby and descId" - ); - expect(wrapper.find("g").prop("aria-describedby")).to.equal( - "applies-to-both-aria-describeby-and-descId" - ); - expect(wrapper.find("desc").props().id).to.equal( - "applies-to-both-aria-describeby-and-descId" - ); - }); -}); diff --git a/test/client/spec/victory-core/victory-animation/util.spec.js b/test/client/spec/victory-core/victory-animation/util.spec.js deleted file mode 100644 index 6a8e09591..000000000 --- a/test/client/spec/victory-core/victory-animation/util.spec.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint-disable no-unused-expressions */ -import { victoryInterpolator } from "victory-core/es/victory-animation/util"; - -describe("victoryInterpolator", () => { - it("does not attempt to interpolate identical values", () => { - // This case fails with the default interpolator, returning *almost* 3. - expect(victoryInterpolator(3, 3)(0.25920000000000004)).to.equal(3); - }); - - it("does not attempt to interpolate Boolean values", () => { - // The default interpolator would return 0.5. - expect(victoryInterpolator(false, true)(0.5)).to.equal(true); - }); - - it("always returns the end value if starting from null", () => { - const interpolator = victoryInterpolator(null, 5); - expect(interpolator(0)).to.equal(5); - expect(interpolator(0.49)).to.equal(5); - expect(interpolator(0.5)).to.equal(5); - expect(interpolator(1)).to.equal(5); - }); - - it("always returns the end value if ending on null", () => { - const interpolator = victoryInterpolator(5, null); - expect(interpolator(0)).to.be.null; - expect(interpolator(0.49)).to.be.null; - expect(interpolator(0.5)).to.be.null; - expect(interpolator(1)).to.be.null; - }); - - it("always returns the end value if starting from undefined", () => { - const interpolator = victoryInterpolator(undefined, 5); - expect(interpolator(0)).to.equal(5); - expect(interpolator(0.49)).to.equal(5); - expect(interpolator(0.5)).to.equal(5); - expect(interpolator(1)).to.equal(5); - }); - - it("always returns the end value if ending on undefined", () => { - const interpolator = victoryInterpolator(5, undefined); - expect(interpolator(0)).to.be.undefined; - expect(interpolator(0.49)).to.undefined; - expect(interpolator(0.5)).to.be.undefined; - expect(interpolator(1)).to.be.undefined; - }); - - it("interpolates functions", () => { - const fromFn = () => 5; - const toFn = () => 10; - const interpolator = victoryInterpolator(fromFn, toFn); - const halfwayFn = interpolator(0.5); - expect(halfwayFn).to.be.a("function"); - expect(halfwayFn()).to.equal(7.5); - }); - - it("interpolates string values", () => { - // From https://github.com/d3/d3-interpolate/blob/main/test/value-test.js#L5-L7 - const interpolator = victoryInterpolator("foo", "bar"); - expect(interpolator(0.5)).to.equal("bar"); - }); - - it("interpolates color values", () => { - // From https://github.com/d3/d3-interpolate/blob/main/test/value-test.js#L15 - const interpolator = victoryInterpolator("red", "blue"); - expect(interpolator(0.5)).to.equal("rgb(128, 0, 128)"); - }); - - it("interpolates object values", () => { - // From https://github.com/d3/d3-interpolate/blob/main/test/value-test.js#L44 - const interpolator = victoryInterpolator( - { color: "red" }, - { color: "blue" } - ); - expect(interpolator(0.5)).to.eql({ color: "rgb(128, 0, 128)" }); - }); -}); diff --git a/test/client/spec/victory-core/victory-animation/victory-animation.spec.js b/test/client/spec/victory-core/victory-animation/victory-animation.spec.js deleted file mode 100644 index e8be4caa1..000000000 --- a/test/client/spec/victory-core/victory-animation/victory-animation.spec.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Client tests - */ -import React from "react"; -import { shallow } from "enzyme"; -import { VictoryAnimation } from "victory-core"; - -describe("components/victory-animation", () => { - it("has expected content with shallow render", () => { - // This is a "shallow" render that renders only the current component - // without using the actual DOM. - // - // https://facebook.github.io/react/docs/test-utils.html#shallow-rendering - const wrapper = shallow( - - {() => { - return
I rendered!
; - }} -
- ); - const output = wrapper.find("div"); - expect(output.prop("children")).to.contain("I rendered!"); - }); -}); diff --git a/test/client/spec/victory-core/victory-container/victory-container.spec.js b/test/client/spec/victory-core/victory-container/victory-container.spec.js deleted file mode 100644 index c26f5f19e..000000000 --- a/test/client/spec/victory-core/victory-container/victory-container.spec.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -/*eslint-disable max-nested-callbacks */ -/* eslint no-unused-expressions: 0 */ - -import React from "react"; -import { shallow, mount } from "enzyme"; -import { VictoryContainer } from "victory-core"; - -describe("components/victory-container", () => { - it("renders an svg with a role of img", () => { - const wrapper = shallow(); - const output = wrapper.find("svg").at(0); - expect(output.prop("role")).to.contain("img"); - }); - - it("renders an svg with a custom role", () => { - const wrapper = shallow(); - const output = wrapper.find("svg").at(0); - expect(output.prop("role")).to.contain("presentation"); - }); - - it("renders an svg with a title node", () => { - const wrapper = shallow(); - const output = wrapper.find("title"); - expect(output.html()).to.contain("Victory Chart"); - }); - - it("renders an svg with a desc node", () => { - const wrapper = shallow(); - const output = wrapper.find("desc"); - expect(output.html()).to.contain("description"); - }); - - it("renders an svg with an aria-describedby attribute", () => { - const wrapper = shallow( - - ); - const describedElement = wrapper.find(`[aria-describedby~="testid"]`).at(0); - expect(describedElement.type()).to.equal("svg"); - }); - - it("renders an svg with an aria-labelledby attribute", () => { - const wrapper = shallow( - - ); - const describedElement = wrapper.find(`[aria-labelledby~="testid"]`).at(0); - expect(describedElement.type()).to.equal("svg"); - }); - - it("renders an svg with the correct viewbox", () => { - const width = 300; - const height = 300; - const wrapper = shallow(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${width} ${height}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("attaches an event to the container", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - }); -}); diff --git a/test/client/spec/victory-core/victory-label/victory-label.spec.js b/test/client/spec/victory-core/victory-label/victory-label.spec.js deleted file mode 100644 index caab0730a..000000000 --- a/test/client/spec/victory-core/victory-label/victory-label.spec.js +++ /dev/null @@ -1,225 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -import React from "react"; -import { shallow, mount } from "enzyme"; -import { VictoryLabel, Text, TSpan } from "victory-core"; - -describe("components/victory-label", () => { - it("has expected content with shallow render", () => { - const wrapper = shallow(); - const output = wrapper.find(Text); - expect(output.html()).to.contain("such text, wow"); - }); - - it("sets dx and dy for text element", () => { - const wrapper = shallow( - - ); - const output = wrapper.find(Text); - expect(output.prop("dx")).to.eql(30); - // dy = props.dy + (capHeight(0.71) / 2 + (0.5 - length(1) / 2) * lineHeight(1)) * fontSize(14); - expect(output.prop("dy")).to.eql(undefined); - }); - - it("sets x and y for text element", () => { - const wrapper = shallow( - - ); - const output = wrapper.find(Text); - expect(output.prop("x")).to.eql("100%"); - expect(output.prop("y")).to.eql(34.97); - }); - - it("has a transform property that rotates the text to match the labelAngle prop", () => { - const wrapper = shallow( - - ); - const output = wrapper.find(Text); - expect(output.prop("transform")).to.contain("rotate(46"); - }); - - it("accepts the angle prop as a function", () => { - const wrapper = shallow( - 46} text={"such text, wow"} /> - ); - const output = wrapper.find(Text); - expect(output.prop("transform")).to.contain("rotate(46"); - }); - - it("strips px from fontSize", () => { - const wrapper = shallow( - - ); - const output = wrapper.find(TSpan); - expect(output.prop("style")).to.contain({ fontSize: 10 }); - }); - - it("uses a default fontSize when an invalid fontSize is given", () => { - const wrapper = shallow( - - ); - const output = wrapper.find(TSpan); - expect(output.prop("style")).to.contain({ fontSize: 14 }); - }); - - it("renders an array of text as seperate tspans", () => { - const wrapper = shallow(); - const output = wrapper.find(TSpan); - expect(output.length).to.equal(3); - }); - - it("renders splits newlines into tspans", () => { - const wrapper = shallow(); - const output = wrapper.find(TSpan); - expect(output.length).to.equal(3); - }); - - it("renders title and desc if provided ", () => { - const wrapper = mount( - - ); - - const wrapper2 = mount(); - - const title = wrapper.find("title"); - expect(title.length).to.equal(1); - - const desc = wrapper.find("desc"); - expect(desc.length).to.equal(1); - - const noTitle = wrapper2.find("title"); - expect(noTitle.length).to.equal(0); - - const noDesc = wrapper2.find("desc"); - expect(noDesc.length).to.equal(0); - }); - - it("renders tspan styles independently when `style` is an array", () => { - const fill = ["red", "green", "blue"]; - const wrapper = shallow( - - ); - const output = wrapper.find(TSpan); - output.forEach((tspan, index) => { - expect(tspan.prop("style")).to.contain({ fill: fill[index] }); - }); - }); - - describe("event handling", () => { - it("attaches an to the parent object", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - wrapper.find(Text).simulate("click"); - expect(clickHandler.called).to.equal(true); - }); - }); - - it("renders TSpan elements inline when `inline` prop is passed", () => { - const wrapper = shallow( - - ); - - const output = wrapper.find(TSpan); - output.forEach((tspan) => { - // passing `inline` sets x and dy to undefined - expect(tspan.prop("x")).to.be.eql(undefined); - expect(tspan.prop("dy")).be.oneOf([undefined, 0]); - expect(tspan.prop("dx")).to.be.eql(5); - }); - }); - - it("passes lineHeight as an array if provided", () => { - const lineHeight = [1, 2, 3]; - const expectedDy = [0, 21, 35]; - const wrapper = shallow( - - ); - - const output = wrapper.find(TSpan); - output.forEach((tspan, index) => { - /* - to calculate dy: - ((this.lineHeight[i] + (this.lineHeight[i - 1] || this.lineHeight[0])) / 2) - */ - expect(tspan.prop("dy")).to.be.eql(expectedDy[index]); - }); - }); - - it("defaults lineHeight to 1 if an empty array is provided for lineHeight", () => { - const expectedDy = [0, 14, 14, 14]; - const wrapper = shallow( - - ); - - const output = wrapper.find(TSpan); - output.forEach((tspan, index) => { - expect(tspan.prop("dy")).to.be.eql(expectedDy[index]); - }); - }); - - it("defaults style to `defaultStyles` if an empty array is provided for `style`", () => { - const defaultStyles = { - fill: "#252525", - fontSize: 14, - fontFamily: - "'Gill Sans', 'Gill Sans MT', 'Ser­avek', 'Trebuchet MS', sans-serif", - stroke: "transparent" - }; - - const wrapper = shallow( - - ); - - const output = wrapper.find(TSpan); - output.forEach((tspan) => { - expect(tspan.prop("style")).to.be.eql(defaultStyles); - }); - }); - - it("passes id if provided as a string", () => { - const wrapper = shallow( - - ); - - const output = wrapper.find(Text); - output.forEach((text) => { - expect(text.prop("id")).to.be.eql("my-custom-id"); - }); - }); - - it("passes id if provided as a number", () => { - const wrapper = shallow(); - - const output = wrapper.find(Text); - output.forEach((text) => { - expect(text.prop("id")).to.be.eql(12345); - }); - }); - - it("runs function if id provided as a function", () => { - const wrapper = shallow( - `created-in-function-${Math.random()}`} - /> - ); - - const output = wrapper.find(Text); - output.forEach((text) => { - expect(text.prop("id")).to.match(/^created-in-function-[\d\.]+$/); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-primitives/clip-path.spec.js b/test/client/spec/victory-core/victory-primitives/clip-path.spec.js deleted file mode 100644 index 241108b17..000000000 --- a/test/client/spec/victory-core/victory-primitives/clip-path.spec.js +++ /dev/null @@ -1,44 +0,0 @@ -import React from "react"; -import { mount } from "enzyme"; -import { ClipPath } from "victory-core"; - -describe("victory-primitives/clip-path", () => { - const baseProps = { - clipId: 4, - clipPadding: { - top: 2, - bottom: 2, - left: 2, - right: 2 - }, - clipHeight: 30, - clipWidth: 20, - translateX: 3, - translateY: 8 - }; - - it("should render a children", () => { - const wrapper = mount( - - - - ); - const rect = wrapper.find("defs").find("clipPath").find("rect"); - - expect(rect.length).to.equal(1); - }); - - it("should successfully re-render", () => { - const wrapper = mount(); - - wrapper.render(); - wrapper.setProps(baseProps); - }); - - it("should render a clipPath with the passed id", () => { - const wrapper = mount(); - const clipPath = wrapper.find("defs").find("clipPath"); - - expect(parseFloat(clipPath.prop("id"), 10)).to.eql(4); - }); -}); diff --git a/test/client/spec/victory-core/victory-primitives/curve.spec.js b/test/client/spec/victory-core/victory-primitives/curve.spec.js deleted file mode 100644 index 0fedd22bc..000000000 --- a/test/client/spec/victory-core/victory-primitives/curve.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from "react"; -import { shallow } from "enzyme"; -import { Curve } from "victory-line"; -import { Path } from "victory-core"; - -describe("victory-primitives/curve", () => { - const baseProps = { - data: [ - { _x1: 1, x1: 1, _y1: 4, y1: 4, eventKey: 0 }, - { _x1: 2, x1: 2, _y1: 5, y1: 5, eventKey: 1 }, - { _x1: 3, x1: 3, _y1: 7, y1: 7, eventKey: 2 }, - { _x1: 4, x1: 4, _y1: 10, y1: 10, eventKey: 3 }, - { _x1: 5, x1: 5, _y1: 15, y1: 15, eventKey: 4 } - ], - scale: { - x: (x) => x, - y: (y) => y - }, - interpolation: "basis" - }; - - it("should render a single curve for consecutive data", () => { - const wrapper = shallow(); - - // single curves should not be grouped - expect(wrapper.find("g").find(Path).length).to.eql(0); - expect(wrapper.find(Path).length).to.eql(1); - }); -}); diff --git a/test/client/spec/victory-core/victory-primitives/index.js b/test/client/spec/victory-core/victory-primitives/index.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/client/spec/victory-core/victory-primitives/line.spec.js b/test/client/spec/victory-core/victory-primitives/line.spec.js deleted file mode 100644 index 04121f49c..000000000 --- a/test/client/spec/victory-core/victory-primitives/line.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react"; -import { shallow } from "enzyme"; -import { Line } from "victory-core"; - -describe("victory-primitives/line", () => { - const baseProps = { - x1: 0, - y1: 1, - x2: 2, - y2: 4 - }; - - it("should render a line element with the correct coordinates", () => { - const wrapper = shallow(); - const line = wrapper.find("line"); - - ["x1", "y1", "x2", "y2"].forEach((coordinate) => { - const lineAttr = parseFloat(line.prop(coordinate), 10); - expect(lineAttr).to.eql(baseProps[coordinate]); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-primitives/point.spec.js b/test/client/spec/victory-core/victory-primitives/point.spec.js deleted file mode 100644 index e308f1e4e..000000000 --- a/test/client/spec/victory-core/victory-primitives/point.spec.js +++ /dev/null @@ -1,38 +0,0 @@ -import React from "react"; -import { shallow } from "enzyme"; -import { assign } from "lodash"; -import { Point, Path, PointPathHelpers as pathHelpers } from "victory-core"; - -describe("victory-primitives/point", () => { - const baseProps = { - x: 5, - y: 10, - size: 1 - }; - - [ - "circle", - "square", - "diamond", - "triangleDown", - "triangleUp", - "plus", - "minus", - "star", - "cross" - ].forEach((symbol) => { - it(`should render the appropriate symbol "${symbol}"`, () => { - const props = assign({}, baseProps, { symbol }); - const wrapper = shallow(); - const directions = wrapper.find(Path).prop("d"); - - const expected = pathHelpers[symbol]( - baseProps.x, - baseProps.y, - baseProps.size - ); - - expect(directions).to.eql(expected); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-primitives/slice.spec.js b/test/client/spec/victory-core/victory-primitives/slice.spec.js deleted file mode 100644 index 3eed3aca9..000000000 --- a/test/client/spec/victory-core/victory-primitives/slice.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -/*eslint-disable max-nested-callbacks,no-unused-expressions,max-len */ -import React from "react"; -import { shallow } from "enzyme"; -import { Slice } from "victory-pie"; - -describe("victory-primitives/slice", () => { - describe("rendering", () => { - it("renders a path with attribute `d` equal to the result of `props.pathFunction` called with `props.slice`", () => { - const EXPECTED_D_ATTR = "M1,1"; - const slice = { x: 1, y: 1 }; - const pathFunction = (sli) => { - expect(sli, "The path function is called with `props.slice`").to.eql( - slice - ); - - return EXPECTED_D_ATTR; - }; - - const wrapper = shallow( - - ); - - expect(wrapper.html()).to.eql( - `` - ); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-transition/victory-transition.spec.js b/test/client/spec/victory-core/victory-transition/victory-transition.spec.js deleted file mode 100644 index e92bd54e7..000000000 --- a/test/client/spec/victory-core/victory-transition/victory-transition.spec.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Client tests - */ -import React from "react"; -import PropTypes from "prop-types"; -import { mount } from "enzyme"; -import { VictoryTransition } from "victory-core"; - -class TestComponent extends React.Component { - render() { - return {this.props.message[0]}; - } -} - -TestComponent.propTypes = { - message: PropTypes.array -}; - -describe("components/victory-transition", () => { - it("renders a child component", () => { - const wrapper = mount( - - - - ); - const output = wrapper.find(".foo"); - expect(output.length).to.equal(1); - expect(output.text()).to.equal("HELLO"); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/add-events.spec.js b/test/client/spec/victory-core/victory-util/add-events.spec.js deleted file mode 100644 index b3b61b940..000000000 --- a/test/client/spec/victory-core/victory-util/add-events.spec.js +++ /dev/null @@ -1,225 +0,0 @@ -/* eslint max-params: 0 */ - -import React from "react"; -import { get } from "lodash"; -import { mount } from "enzyme"; -import { addEvents } from "victory-core"; -import { - MockVictoryComponent, - MockLabel, - MockDataComponent -} from "../../mock-components"; - -describe("victory-util/add-events", () => { - const EventedMockVictoryComponent = addEvents(MockVictoryComponent); - - const expectEventsTriggered = ( - getComponentsToTest, - testFn, - expectations, - wrapper - ) => { - expect(getComponentsToTest(wrapper).map(testFn)).to.eql(expectations); - }; - - const getDataComponents = (wrapper) => { - return wrapper.find(MockDataComponent); - }; - - const getLabelComponents = (wrapper) => { - return wrapper.find(MockLabel); - }; - - it("should set up events on data components to target themselves", () => { - const wrapper = mount( - { - return [ - { - target: "data", - mutation: () => { - return { style: { fill: "tomato" } }; - } - } - ]; - } - } - } - ]} - /> - ); - - const dataComponentIsAltered = (dataComponent) => { - return get(dataComponent.props(), "style.fill") === "tomato"; - }; - - expectEventsTriggered( - getDataComponents, - dataComponentIsAltered, - [false, false], - wrapper - ); - getDataComponents(wrapper).at(0).simulate("click"); - expectEventsTriggered( - getDataComponents, - dataComponentIsAltered, - [true, false], - wrapper - ); - getDataComponents(wrapper).at(1).simulate("click"); - expectEventsTriggered( - getDataComponents, - dataComponentIsAltered, - [true, true], - wrapper - ); - }); - - it("should set up events on data components scoped with an event key", () => { - const wrapper = mount( - { - return [ - { - target: "data", - mutation: () => { - return { style: { fill: "tomato" } }; - } - } - ]; - } - } - } - ]} - /> - ); - - const dataComponentIsAltered = (dataComponent) => { - return get(dataComponent.props(), "style.fill") === "tomato"; - }; - - expectEventsTriggered( - getDataComponents, - dataComponentIsAltered, - [false, false], - wrapper - ); - getDataComponents(wrapper).at(0).simulate("click"); - expectEventsTriggered( - getDataComponents, - dataComponentIsAltered, - [false, false], - wrapper - ); - getDataComponents(wrapper).at(1).simulate("click"); - expectEventsTriggered( - getDataComponents, - dataComponentIsAltered, - [false, true], - wrapper - ); - }); - - it("should set up events on data components to target labels", () => { - const wrapper = mount( - } - events={[ - { - target: "data", - eventHandlers: { - onClick: () => { - return [ - { - target: "labels", - mutation: () => { - return { text: "altered" }; - } - } - ]; - } - } - } - ]} - /> - ); - - const labelComponentIsAltered = (labelComponent) => { - return get(labelComponent.props(), "text") === "altered"; - }; - - expectEventsTriggered( - getLabelComponents, - labelComponentIsAltered, - [false, false], - wrapper - ); - getDataComponents(wrapper).at(0).simulate("click"); - expectEventsTriggered( - getLabelComponents, - labelComponentIsAltered, - [true, false], - wrapper - ); - getDataComponents(wrapper).at(1).simulate("click"); - expectEventsTriggered( - getLabelComponents, - labelComponentIsAltered, - [true, true], - wrapper - ); - }); - - describe("when adding animations to the component", () => { - describe("and props.animate.animationWhitelist is not present", () => { - it("passes the default animation whitelist to the component", () => { - const wrapper = mount(); - - const victoryTransitionWrapper = wrapper.find("VictoryTransition"); - - expect(victoryTransitionWrapper.prop("animationWhitelist")).to.equal( - MockVictoryComponent.animationWhitelist - ); - }); - }); - - describe("and props.animate.animationWhitelist is passed in", () => { - it("passes props.animate.animationWhitelist to the component", () => { - const wrapper = mount( - - ); - - const victoryTransitionWrapper = wrapper.find("VictoryTransition"); - - expect( - victoryTransitionWrapper.prop("animationWhitelist") - ).to.deep.equal(["allTheThings"]); - }); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/axis.spec.js b/test/client/spec/victory-core/victory-util/axis.spec.js deleted file mode 100644 index 4fee677b6..000000000 --- a/test/client/spec/victory-core/victory-util/axis.spec.js +++ /dev/null @@ -1,183 +0,0 @@ -/* global sinon */ -/* eslint-disable no-unused-expressions,react/no-multi-comp */ -import { Scale, Axis } from "victory-core"; -import React from "react"; -import { VictoryAxis } from "victory-axis"; -import { VictoryBar } from "victory-bar"; - -describe("helpers/axis", () => { - const getVictoryAxis = (props) => React.createElement(VictoryAxis, props); - const getVictoryBar = (props) => React.createElement(VictoryBar, props); - - describe("isVertical", () => { - it("returns true when the orientation is vertical", () => { - const props = { orientation: "left" }; - const verticalResult = Axis.isVertical(props); - expect(verticalResult).to.equal(true); - }); - - it("returns false when the orientation is horizontal", () => { - const props = { orientation: "bottom" }; - const verticalResult = Axis.isVertical(props); - expect(verticalResult).to.equal(false); - }); - }); - - describe("getDomain", () => { - it("determines a domain from tickValues", () => { - const props = { tickValues: [1, 2, 3] }; - const domainResult = Axis.getDomain(props); - expect(domainResult).to.eql([1, 3]); - }); - - it("determines a domain from string tick values", () => { - const props = { tickValues: ["a", "b", "c", "d"] }; - const domainResult = Axis.getDomain(props); - expect(domainResult).to.eql([1, 4]); - }); - - it("reverses a domain from tickValues when the axis is vertical", () => { - const props = { tickValues: [1, 2, 3], dependentAxis: true }; - const domainResult = Axis.getDomain(props); - expect(domainResult).to.eql([3, 1]); - }); - - it("determines a domain from props", () => { - const props = { domain: [1, 2] }; - const domainResult = Axis.getDomain(props); - expect(domainResult).to.eql([1, 2]); - }); - - it("calculates a domain from a single tickValue", () => { - const props = { tickValues: [1] }; - const domainResult = Axis.getDomain(props); - const verySmallNumber = Math.pow(10, -10); - expect(domainResult).to.eql([1 - verySmallNumber, 1 + verySmallNumber]); - }); - - it("returns undefined if the given axis doesn't match this axis", () => { - const props = { domain: [1, 3] }; - const domainResultX = Axis.getDomain(props, "x"); - expect(domainResultX).to.eql([1, 3]); - const domainResultY = Axis.getDomain(props, "y"); - expect(domainResultY).to.be.undefined; - }); - }); - - describe("getAxis", () => { - it("determines the axis based on type (dependent / independent)", () => { - expect(Axis.getAxis({ dependentAxis: true })).to.equal("y"); - expect(Axis.getAxis({})).to.equal("x"); - }); - }); - - describe("getAxisComponent", () => { - const dependentAxis = getVictoryAxis({ dependentAxis: true }); - const independentAxis = getVictoryAxis({ dependentAxis: false }); - const bar = getVictoryBar({}); - - let spy; - beforeEach(() => { - spy = sinon.spy(dependentAxis.type, "getAxis"); - }); - - afterEach(() => { - spy.restore(); - }); - - it("returns the independent axis when called with 'x'", () => { - const childComponents = [dependentAxis, independentAxis, bar]; - const componentResult = Axis.getAxisComponent(childComponents, "x"); - expect(dependentAxis.type.getAxis) - .calledWith(dependentAxis.props) - .and.returned("y"); - expect(independentAxis.type.getAxis) - .calledWith(independentAxis.props) - .and.returned("x"); - expect(componentResult).to.eql(independentAxis); - }); - }); - - describe("getTickFormat", () => { - let sandbox; - const scale = Scale.getBaseScale({ scale: { x: "linear" } }, "x"); - const ticks = [1, 2, 3, 4, 5]; - beforeEach(() => { - sandbox = sinon.createSandbox(); - sandbox.stub(scale, "tickFormat"); - }); - - afterEach(() => { - sandbox.restore(); - }); - - it("returns tickFormat function from props", () => { - const props = { tickFormat: (x) => x * 5 }; - const tickProps = { scale, ticks }; - const formatResult = Axis.getTickFormat(props, tickProps); - expect(scale.tickFormat).notCalled; - expect(formatResult).to.eql(props.tickFormat); - }); - - it("converts tickFormat array from props to a function", () => { - const props = { tickFormat: [1, 2, 3, 4, 5] }; - const tickProps = { scale, ticks }; - const formatResult = Axis.getTickFormat(props, tickProps); - expect(scale.tickFormat).notCalled; - expect(formatResult).to.be.a("function"); - }); - - it("converts tickFormat string array from props to a function", () => { - const props = { tickValues: ["cats", "dogs", "birds"] }; - const tickProps = { scale, ticks }; - const formatResult = Axis.getTickFormat(props, tickProps); - expect(scale.tickFormat).notCalled; - expect(formatResult).to.be.a("function"); - }); - - it("calculates a tick format from scale", () => { - const props = {}; - const tickProps = { scale, ticks }; - const formatResult = Axis.getTickFormat(props, tickProps); - expect(formatResult).to.be.a("function"); - }); - }); - - describe("getTicks", () => { - let sandbox; - const scale = Scale.getBaseScale({ scale: { x: "linear" } }, "x"); - beforeEach(() => { - sandbox = sinon.createSandbox(); - sandbox.spy(scale, "ticks"); - }); - - afterEach(() => { - sandbox.restore(); - }); - - it("returns tickValues from props", () => { - const props = { tickValues: [1, 2, 3] }; - const tickResult = Axis.getTicks(props); - expect(tickResult).to.eql(props.tickValues); - }); - - it("returns converts string tickValues to numbers", () => { - const props = { tickValues: ["a", "b", "c", "d"] }; - const tickResult = Axis.getTicks(props); - expect(tickResult).to.eql([1, 2, 3, 4]); - }); - - it("calculates tickValues from scale.ticks()", () => { - const props = { tickCount: 5 }; - Axis.getTicks(props, scale); - expect(scale.ticks).calledWith(5); - }); - - it("calculates tickValues from scale.ticks(), and removes zero if axes cross", () => { - const props = { tickCount: 5, crossAxis: true }; - const tickResult = Axis.getTicks(props, scale); - expect(scale.ticks).calledWith(5); - expect(tickResult).to.be.an("array").and.not.have.members([0]); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/collection.spec.js b/test/client/spec/victory-core/victory-util/collection.spec.js deleted file mode 100644 index 078877a50..000000000 --- a/test/client/spec/victory-core/victory-util/collection.spec.js +++ /dev/null @@ -1,158 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* eslint max-statements: 0 */ - -import { Collection } from "victory-core"; - -describe("victory-util/collection", () => { - describe("containsStrings", () => { - it("handles empty argument", () => { - expect(Collection.containsStrings()).to.equal(false); - }); - - it("handles empty array", () => { - expect(Collection.containsStrings([])).to.equal(false); - }); - - it("returns false for collections of non-strings", () => { - expect(Collection.containsStrings([0, 1])).to.equal(false); - expect(Collection.containsStrings([undefined, null, NaN])).to.equal( - false - ); - expect(Collection.containsStrings([{}, { a: "foo" }])).to.equal(false); - }); - - it("returns false for collections with strings", () => { - expect(Collection.containsStrings(["hello"])).to.equal(true); - expect(Collection.containsStrings(["hello", "there"])).to.equal(true); - expect(Collection.containsStrings([0, "hello", {}, null])).to.equal(true); - }); - }); - - describe("containsOnlyStrings", () => { - it("handles empty argument", () => { - expect(Collection.containsOnlyStrings()).to.equal(false); - }); - - it("handles empty array", () => { - expect(Collection.containsOnlyStrings([])).to.equal(false); - }); - - it("returns false for collections of non-strings", () => { - expect(Collection.containsOnlyStrings([0, 1])).to.equal(false); - expect(Collection.containsOnlyStrings([undefined, null, NaN])).to.equal( - false - ); - expect(Collection.containsOnlyStrings([{}, { a: "foo" }])).to.equal( - false - ); - }); - - it("returns false for collections with some strings", () => { - expect(Collection.containsOnlyStrings(["hello", 0])).to.equal(false); - expect(Collection.containsOnlyStrings(["hello", ["not me"]])).to.equal( - false - ); - expect(Collection.containsOnlyStrings([0, "hello", {}, null])).to.equal( - false - ); - }); - - it("returns true for collections with only strings", () => { - expect(Collection.containsOnlyStrings(["hello"])).to.equal(true); - expect(Collection.containsOnlyStrings(["hello", "there"])).to.equal(true); - }); - }); - - describe("isArrayOfArrays", () => { - it("handles empty argument", () => { - expect(Collection.isArrayOfArrays()).to.equal(false); - }); - - it("handles empty array", () => { - expect(Collection.isArrayOfArrays([])).to.equal(false); - }); - - it("returns false for collections of non-arrays", () => { - expect(Collection.isArrayOfArrays([1])).to.equal(false); - expect(Collection.isArrayOfArrays([{}])).to.equal(false); - expect(Collection.isArrayOfArrays(["a"])).to.equal(false); - }); - - it("returns false for mixed collections", () => { - expect(Collection.isArrayOfArrays([[], 1, {}])).to.equal(false); - expect(Collection.isArrayOfArrays([1, [], {}])).to.equal(false); - expect(Collection.isArrayOfArrays([1, {}, []])).to.equal(false); - }); - - it("returns true for collections of arrays", () => { - expect(Collection.isArrayOfArrays([[]])).to.equal(true); - expect(Collection.isArrayOfArrays([[{}]])).to.equal(true); - expect(Collection.isArrayOfArrays([[[]]])).to.equal(true); - expect(Collection.isArrayOfArrays([[], []])).to.equal(true); - }); - }); - - describe("removeUndefined", () => { - it("handles empty array", () => { - expect(Collection.removeUndefined([])).to.eql([]); - }); - - it("does not filter non-undefineds", () => { - const testArray = [0, 1, "a", {}, false, null, NaN]; - expect(Collection.removeUndefined(testArray)).to.eql(testArray); - }); - - it("filters out undefineds", () => { - const testArray = [ - undefined, - 0, - undefined, - {}, - false, - null, - NaN, - undefined - ]; - const expectedArray = [0, {}, false, null, NaN]; - expect(Collection.removeUndefined(testArray)).to.eql(expectedArray); - }); - }); - - describe("getMaxValue", () => { - it("returns a date if array contains dates", () => { - const array = [new Date(2016, 3, 6), new Date(2017, 5, 3), 10]; - expect(Collection.getMaxValue(array)).to.eql(new Date(2017, 5, 3)); - }); - - it("returns a number if array does not contain dates", () => { - const array = [3, 8, 10]; - expect(Collection.getMaxValue(array)).to.eql(10); - }); - - it("allows values to be concated and returns the appropriate number", () => { - const array = [3, 8, 10]; - expect(Collection.getMaxValue(array, 1, 20)).to.eql(20); - }); - }); - - describe("getMinValue", () => { - it("returns a date if array contains dates", () => { - const array = [ - new Date(2016, 3, 6), - new Date(2017, 5, 3), - new Date(2015, 11, 4) - ]; - expect(Collection.getMinValue(array)).to.eql(new Date(2015, 11, 4)); - }); - - it("returns a number if array does not contain dates", () => { - const array = [3, 8, 10]; - expect(Collection.getMinValue(array)).to.eql(3); - }); - - it("allows values to be concated and returns the appropriate number", () => { - const array = [3, 8, 10]; - expect(Collection.getMinValue(array, 1, 20)).to.eql(1); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/data.spec.js b/test/client/spec/victory-core/victory-util/data.spec.js deleted file mode 100644 index 878d67105..000000000 --- a/test/client/spec/victory-core/victory-util/data.spec.js +++ /dev/null @@ -1,380 +0,0 @@ -/* eslint no-unused-expressions: 0, max-nested-callbacks: 0 */ -import React from "react"; -import { Data, VictoryPortal } from "victory-core"; -import { fromJS } from "immutable"; - -const immutableDataTest = { - createData: (data) => fromJS(data), - testLabel: "data in immutable" -}; - -const dataTest = { - createData: (data) => data, - testLabel: "data in js" -}; - -describe("victory-util/data", () => { - describe("createStringMap", () => { - const tickValues = ["one", "two", "three"]; - const categories = ["red", "green", "blue"]; - - it("returns a string map from strings in tickValues", () => { - const props = { tickValues }; - const stringMap = Data.createStringMap(props, "x"); - expect(stringMap).to.eql({ one: 1, two: 2, three: 3 }); - }); - - it("returns a string map from strings in categories", () => { - const props = { categories }; - const stringMap = Data.createStringMap(props, "x"); - expect(stringMap).to.eql({ red: 1, green: 2, blue: 3 }); - }); - - [dataTest, immutableDataTest].forEach(({ createData, testLabel }) => { - describe(`returning string maps with ${testLabel}`, () => { - const data = createData([ - { x: "one", y: 1 }, - { x: "red", y: 2 }, - { x: "cat", y: 3 } - ]); - - it("returns a string map from strings in data", () => { - const props = { data }; - const stringMap = Data.createStringMap(props, "x"); - expect(stringMap).to.eql({ one: 1, red: 2, cat: 3 }); - }); - - it("a unique set of values is returned from multiple sources", () => { - const props = { tickValues, data }; - const stringMap = Data.createStringMap(props, "x"); - expect(stringMap).to.eql({ - one: 1, - two: 2, - three: 3, - red: 4, - cat: 5 - }); - }); - }); - }); - }); - - [dataTest, immutableDataTest].forEach(({ createData, testLabel }) => { - describe(`getStringsFromData with ${testLabel}`, () => { - it("returns an array of strings from a data prop", () => { - const props = { - data: createData([ - { x: "one", y: 1 }, - { x: "red", y: 2 }, - { x: "cat", y: 3 } - ]) - }; - const dataStrings = Data.getStringsFromData(props, "x"); - expect(dataStrings).to.eql(["one", "red", "cat"]); - }); - - it("returns an array of strings from array-type data", () => { - const props = { - data: createData([ - ["one", 1], - ["red", 2], - ["cat", 3] - ]), - x: 0, - y: 1 - }; - const dataStrings = Data.getStringsFromData(props, "x"); - expect(dataStrings).to.eql(["one", "red", "cat"]); - }); - - it("only returns strings, if data is mixed", () => { - const props = { - data: createData([ - { x: 1, y: 1 }, - { x: "three", y: 3 } - ]) - }; - expect(Data.getStringsFromData(props, "x")).to.eql(["three"]); - }); - - it("returns an empty array when no strings are present", () => { - const props = { - data: createData([ - { x: 1, y: 1 }, - { x: 3, y: 3 } - ]) - }; - expect(Data.getStringsFromData(props, "x")).to.eql([]); - }); - - it("returns an empty array when the data prop is undefined", () => { - expect(Data.getStringsFromData({}, "x")).to.eql([]); - }); - }); - }); - - describe("getStringsFromAxes", () => { - it("returns an array of strings when tickValues is an array", () => { - const props = { tickValues: [1, "three", 5] }; - expect(Data.getStringsFromAxes(props, "x")).to.eql(["three"]); - }); - - it("returns an array of strings when tickValues is an object", () => { - const props = { tickValues: { x: [1, "three", 5] } }; - expect(Data.getStringsFromAxes(props, "x")).to.eql(["three"]); - }); - - it("returns an empty array when a given axis is not defined", () => { - const props = { tickValues: { y: [1, "three", 5] } }; - expect(Data.getStringsFromAxes(props, "x")).to.eql([]); - }); - - it("returns an empty array when no strings are present", () => { - const props = { tickValues: [1, 3, 5] }; - expect(Data.getStringsFromAxes(props, "x")).to.eql([]); - }); - - it("returns an empty array when the tickValues prop is undefined", () => { - expect(Data.getStringsFromAxes({}, "x")).to.eql([]); - }); - }); - - describe("getStringsFromCategories", () => { - it("returns an empty array when no strings are present", () => { - const props = { categories: [1, 3, 5] }; - expect(Data.getStringsFromCategories(props, "x")).to.eql([]); - }); - - it("returns an empty array when the category prop is undefined", () => { - expect(Data.getStringsFromCategories({}, "x")).to.eql([]); - }); - }); - - [dataTest, immutableDataTest].forEach(({ createData, testLabel }) => { - describe(`formatData with ${testLabel}`, () => { - it("formats a single dataset", () => { - const dataset = [ - { _x: 1, _y: 3, x: 1, y: 3 }, - { _x: 2, _y: 5, x: 2, y: 5 } - ]; - const props = { data: createData(dataset) }; - const formatted = Data.formatData(dataset, props); - expect(formatted).to.be.an.array; - expect(formatted[0]).to.have.keys(["_x", "_y", "x", "y"]); - }); - }); - }); - - describe("getData", () => { - [dataTest, immutableDataTest].forEach(({ createData, testLabel }) => { - describe(`with ${testLabel}`, () => { - it("formats and returns the data prop", () => { - const data = createData([ - { x: "kittens", y: 3 }, - { x: "cats", y: 5 } - ]); - const props = { data, x: "x", y: "y" }; - const expectedReturnWithEventKeys = [ - { _x: 1, x: "kittens", xName: "kittens", _y: 3, y: 3 }, - { _x: 2, x: "cats", xName: "cats", _y: 5, y: 5 } - ]; - const returnData = Data.getData(props); - expect(returnData).to.eql(expectedReturnWithEventKeys); - }); - - it("uses the event key when it is passed in", () => { - const data = createData([ - { x: 2, y: 2, eventKey: 13 }, - { x: 1, y: 3, eventKey: 21 }, - { x: 3, y: 1, eventKey: 11 } - ]); - - const returnData = Data.getData({ data }); - - expect(returnData).to.eql([ - { _x: 2, x: 2, _y: 2, y: 2, eventKey: 13 }, - { _x: 1, x: 1, _y: 3, y: 3, eventKey: 21 }, - { _x: 3, x: 3, _y: 1, y: 1, eventKey: 11 } - ]); - }); - - it("uses a custom event key when it is passed in", () => { - const data = createData([ - { x: 2, y: 2, myEventKey: 3 }, - { x: 1, y: 3, myEventKey: 2 }, - { x: 3, y: 1, myEventKey: 1 } - ]); - - const returnData = Data.getData({ data, eventKey: "myEventKey" }); - - expect(returnData).to.eql([ - { _x: 2, x: 2, _y: 2, y: 2, eventKey: 3, myEventKey: 3 }, - { _x: 1, x: 1, _y: 3, y: 3, eventKey: 2, myEventKey: 2 }, - { _x: 3, x: 3, _y: 1, y: 1, eventKey: 1, myEventKey: 1 } - ]); - }); - - it("uses a eventKey functions", () => { - const data = createData([ - { x: 2, y: 2 }, - { x: 1, y: 3 }, - { x: 3, y: 1 } - ]); - - const returnData = Data.getData({ data, eventKey: (d) => d.x }); - - expect(returnData).to.eql([ - { _x: 2, x: 2, _y: 2, y: 2, eventKey: 2 }, - { _x: 1, x: 1, _y: 3, y: 3, eventKey: 1 }, - { _x: 3, x: 3, _y: 1, y: 1, eventKey: 3 } - ]); - }); - - it("uses a eventKey functions with index", () => { - const data = createData([ - { x: 2, y: 2 }, - { x: 1, y: 3 }, - { x: 3, y: 1 } - ]); - - const returnData = Data.getData({ data, eventKey: (d, i) => i }); - - expect(returnData).to.eql([ - { _x: 2, x: 2, _y: 2, y: 2, eventKey: 0 }, - { _x: 1, x: 1, _y: 3, y: 3, eventKey: 1 }, - { _x: 3, x: 3, _y: 1, y: 1, eventKey: 2 } - ]); - }); - - it("does not sort data when sort key not passed", () => { - const data = createData([ - { x: 2, y: 2 }, - { x: 1, y: 3 }, - { x: 3, y: 1 } - ]); - - const returnData = Data.getData({ data }); - - expect(returnData).to.eql([ - { _x: 2, x: 2, _y: 2, y: 2 }, - { _x: 1, x: 1, _y: 3, y: 3 }, - { _x: 3, x: 3, _y: 1, y: 1 } - ]); - }); - - it("sorts data according to sort key", () => { - const data = createData([ - { x: 1, y: 1, order: 2 }, - { x: 3, y: 3, order: 1 }, - { x: 2, y: 2, order: 3 } - ]); - - const returnData = Data.getData({ data, sortKey: "order" }); - - expect(returnData).to.eql([ - { _x: 3, x: 3, _y: 3, y: 3, order: 1 }, - { _x: 1, x: 1, _y: 1, y: 1, order: 2 }, - { _x: 2, x: 2, _y: 2, y: 2, order: 3 } - ]); - }); - - it("sorts data according to sort key and sort order", () => { - const data = createData([ - { x: 1, y: 1, order: 2 }, - { x: 3, y: 3, order: 1 }, - { x: 2, y: 2, order: 3 } - ]); - - const returnData = Data.getData({ - data, - sortKey: "order", - sortOrder: "descending" - }); - - expect(returnData).to.eql([ - { _x: 2, x: 2, _y: 2, y: 2, order: 3 }, - { _x: 1, x: 1, _y: 1, y: 1, order: 2 }, - { _x: 3, x: 3, _y: 3, y: 3, order: 1 } - ]); - }); - - // Ensures previous VictoryLine api for sortKey prop stays consistent - it("sorts data according to evaluated sort key when sort key is x or y", () => { - const data = createData([ - { _x: 2, x: 10, _y: 2, y: 10 }, - { _x: 1, x: 20, _y: 3, y: 20 }, - { _x: 3, x: 30, _y: 1, y: 30 } - ]); - - const returnDataX = Data.getData({ data, sortKey: "x" }); - - expect(returnDataX).to.eql([ - { _x: 1, x: 20, _y: 3, y: 20 }, - { _x: 2, x: 10, _y: 2, y: 10 }, - { _x: 3, x: 30, _y: 1, y: 30 } - ]); - - const returnDataY = Data.getData({ data, sortKey: "y" }); - expect(returnDataY).to.eql([ - { _x: 3, x: 30, _y: 1, y: 30 }, - { _x: 2, x: 10, _y: 2, y: 10 }, - { _x: 1, x: 20, _y: 3, y: 20 } - ]); - }); - }); - }); - - it("generates a dataset from domain", () => { - const generatedReturn = [ - { x: 0, y: 0 }, - { x: 10, y: 10 } - ]; - const props = { x: "x", y: "y", domain: { x: [0, 10], y: [0, 10] } }; - const returnData = Data.generateData(props); - expect(returnData).to.eql(generatedReturn); - }); - - it("generates a dataset from domain and samples", () => { - const generatedReturn = [ - { x: 0, y: 0 }, - { x: 5, y: 5 }, - { x: 10, y: 10 } - ]; - const props = { - x: "x", - y: "y", - domain: { x: [0, 10], y: [0, 10] }, - samples: 2 - }; - const returnData = Data.generateData(props); - expect(returnData).to.eql(generatedReturn); - }); - }); - - describe("isDataComponent", () => { - class TestDataComponent extends React.Component { - static role = "area"; - } - it("returns true when a component has a static role matching a whitelist", () => { - expect(Data.isDataComponent()).to.be.true; - }); - - it("returns false when a component has a role that does not match the whitelist", () => { - // eslint-disable-next-line react/no-multi-comp - class TestFooComponent extends React.Component { - static role = "foo"; - } - expect(Data.isDataComponent()).to.be.false; - }); - - it("returns true when a data component is wrapped in VictoryPortal", () => { - expect( - Data.isDataComponent( - - - - ) - ).to.be.true; - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/domain.spec.js b/test/client/spec/victory-core/victory-util/domain.spec.js deleted file mode 100644 index fb7cc4d0d..000000000 --- a/test/client/spec/victory-core/victory-util/domain.spec.js +++ /dev/null @@ -1,361 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* eslint max-nested-callbacks: 0 */ -import React from "react"; -import { Domain, VictoryPortal } from "victory-core"; - -/* - createDomainFunction, - formatDomain, - getDomain, - getDomainFromCategories, - getDomainFromData, - getDomainFromMinMax, - getDomainFromProps, - getDomainWithZero, - getMaxFromProps, - getMinFromProps, - getSymmetricDomain -*/ - -describe("victory-util/domain", () => { - describe("createDomainFunction", () => { - it("returns a function equivalent to getDomain when no props are given", () => { - const props = { - x: "x", - y: "y", - domain: { y: [1, 2] }, - data: [ - { x: 1, y: 3 }, - { x: 3, y: 5 } - ] - }; - const domainGetter = Domain.createDomainFunction(); - expect(domainGetter(props, "x")).to.eql(Domain.getDomain(props, "x")); - }); - - it("returns a function that uses a custom getDomainFromData function when given", () => { - const props = { - x: "x", - y: "y", - data: [ - { x: 1, y: 3 }, - { x: 3, y: 5 } - ] - }; - const getDomainFromData = () => [0, 10]; - const domainGetter = Domain.createDomainFunction(getDomainFromData); - expect(domainGetter(props, "x")).to.eql([0, 10]); - }); - - it("returns a function that uses a custom formatDomain function when given", () => { - const props = { domain: [0, 1] }; - const formatDomain = () => [0, 10]; - const domainGetter = Domain.createDomainFunction(null, formatDomain); - expect(domainGetter(props, "x")).to.eql([0, 10]); - }); - }); - - describe("formatDomain", () => { - const baseProps = { width: 100, height: 100, padding: 0 }; - it("returns the domain when no domain padding is specified", () => { - const domain = [0, 1]; - const paddedDomain = Domain.formatDomain(domain, baseProps, "x"); - expect(paddedDomain).to.eql(domain); - }); - - it("pads the domain a particular number of pixels", () => { - const domain = [0, 100]; - const padding = [5, 10, 20]; - padding.forEach((pad) => { - const domainPadding = { x: pad }; - const props = { ...baseProps, domainPadding }; - const paddedDomain = Domain.formatDomain(domain, props, "x"); - const adjustedDomain = domain[1] + pad; - const adjustedPercent = - adjustedDomain / (baseProps.width - baseProps.padding); - const totalPadding = adjustedPercent * pad; - expect(paddedDomain).to.eql([0, domain[1] + totalPadding]); - }); - }); - - it("filters zero from the domain for log scales", () => { - const verySmallNumber = 1 / Number.MAX_SAFE_INTEGER; - const props = { scale: { y: "log" } }; - const formattedDomain = Domain.formatDomain([0, 1], props, "y"); - expect(formattedDomain).to.eql([verySmallNumber, 1]); - }); - }); - - describe("getDomain", () => { - it("gets the domain from props if they exist", () => { - const props = { domain: [1, 2] }; - const resultDomain = Domain.getDomain(props, "x"); - expect(resultDomain).to.eql(props.domain); - }); - - it("gets the domain from data if props don't exist for a particular axis", () => { - const props = { - x: "x", - y: "y", - domain: { y: [1, 2] }, - data: [ - { x: 1, y: 3 }, - { x: 3, y: 5 } - ] - }; - const resultDomain = Domain.getDomain(props, "x"); - expect(resultDomain).to.eql([1, 3]); - }); - }); - - describe("getDomainFromCategories", () => { - it("calculates a domain from categories for the independent axis", () => { - const props = { categories: [1, 2, 3] }; - const domainResult = Domain.getDomainFromCategories(props, "x"); - expect(domainResult).to.eql([1, 3]); - }); - - it("calculates a domain from categories for the dependent axis", () => { - const props = { categories: { y: [1, 2, 3] } }; - const domainResult = Domain.getDomainFromCategories(props, "y"); - expect(domainResult).to.eql([1, 3]); - }); - - it("calculates a domain from string categories", () => { - const props = { categories: { x: ["cats", "kittens"] } }; - const domainResult = Domain.getDomainFromCategories(props, "x"); - expect(domainResult).to.eql([1, 2]); - }); - }); - - describe("getDomainFromData", () => { - it("returns a domain from a dataset", () => { - const dataset = [ - { _x: 1, _y: 3 }, - { _x: 3, _y: 5 } - ]; - const resultDomain = Domain.getDomainFromData({}, "x", dataset); - expect(resultDomain).to.eql([1, 3]); - }); - }); - - describe("getDomainFromProps", () => { - it("gets the domain from a domain array", () => { - const props = { domain: [1, 2] }; - const resultDomain = Domain.getDomainFromProps(props, "x"); - expect(resultDomain).to.eql(props.domain); - }); - - it("gets the domain from a domain object", () => { - const props = { domain: { x: [1, 2] } }; - const resultDomain = Domain.getDomainFromProps(props, "x"); - expect(resultDomain).to.eql(props.domain.x); - }); - - it("returns undefined if the domain props is not given", () => { - expect(Domain.getDomainFromProps({}, "x")).to.eql(undefined); - }); - - it("returns undefined if the domain for a given axis is not defined", () => { - const props = { domain: { y: [1, 2] } }; - const resultDomain = Domain.getDomainFromProps(props, "x"); - expect(resultDomain).to.eql(undefined); - }); - - it("returns a domain from minDomain and maxDomain if both are defined", () => { - const props = { minDomain: 1, maxDomain: 10 }; - const resultDomain = Domain.getDomainFromProps(props, "x"); - expect(resultDomain).to.eql([1, 10]); - }); - - it("returns an adjusted domain if minDomain equals maxDomain", () => { - const props = { minDomain: 1, maxDomain: 1 }; - const verySmallNumber = Math.pow(10, -10); - const resultDomain = Domain.getDomainFromProps(props, "x"); - expect(resultDomain).to.eql([1 - verySmallNumber, 1 + verySmallNumber]); - }); - - it("returns undefined if only minDomain is defined", () => { - const props = { minDomain: 1 }; - const resultDomain = Domain.getDomainFromProps(props, "x"); - expect(resultDomain).to.eql(undefined); - }); - }); - - describe("getDomainFromMinMax", () => { - it("returns a min max array when min and max are given", () => { - const min = 1; - const max = 2; - const resultDomain = Domain.getDomainFromMinMax(min, max); - expect(resultDomain).to.eql([min, max]); - }); - - it("returns an adjusted domain if min equals max", () => { - const min = 1; - const max = 1; - const verySmallNumber = Math.pow(10, -10); - const resultDomain = Domain.getDomainFromMinMax(min, max); - expect(resultDomain).to.eql([1 - verySmallNumber, 1 + verySmallNumber]); - }); - - it("returns a positive domain if min and max are both zero", () => { - const min = 0; - const max = 0; - const verySmallNumber = Math.pow(10, -10); - const resultDomain = Domain.getDomainFromMinMax(min, max); - expect(resultDomain).to.eql([0, 2 * verySmallNumber]); - }); - - it("returns an adjusted date domain if min equals max", () => { - const min = new Date(1980, 1, 1); - const max = new Date(1980, 1, 1); - const resultDomain = Domain.getDomainFromMinMax(min, max); - expect(resultDomain).to.eql([new Date(+min - 1), new Date(+max + 1)]); - }); - }); - - describe("getDomainWithZero", () => { - it("ensures that the domain includes zero for the dependent axis", () => { - const props = { - data: [ - { x: 1, y: 3 }, - { x: 3, y: 5 } - ] - }; - const resultDomain = Domain.getDomainWithZero(props, "y"); - expect(resultDomain).to.eql([0, 5]); - }); - - it("allows minimum domain values less than zero", () => { - const props = { - data: [ - { x: 1, y: -3 }, - { x: 3, y: 5 } - ] - }; - const resultDomain = Domain.getDomainWithZero(props, "y"); - expect(resultDomain).to.eql([-3, 5]); - }); - - it("allows explicit y0 values in props.data to set the minimum domain", () => { - const props = { - data: [ - { x: 1, y: 3, y0: 2 }, - { x: 3, y: 5, y0: 3 } - ] - }; - const resultDomain = Domain.getDomainWithZero(props, "y"); - expect(resultDomain).to.eql([2, 5]); - }); - - it("handles negative y0 values", () => { - const props = { - data: [ - { x: 1, y: -3, y0: -7 }, - { x: 3, y: -5, y0: -7 } - ] - }; - const resultDomain = Domain.getDomainWithZero(props, "y"); - expect(resultDomain).to.eql([-7, -3]); - }); - - it("respects props.minDomain when present", () => { - const props = { - data: [ - { x: 1, y: 3, y0: 2 }, - { x: 3, y: 5, y0: 2 } - ], - minDomain: { y: 4 } - }; - const resultDomain = Domain.getDomainWithZero(props, "y"); - expect(resultDomain).to.eql([4, 5]); - }); - - it("does not force the independent domain to include zero", () => { - const props = { - data: [ - { x: 1, y: 3 }, - { x: 3, y: 5 } - ] - }; - const resultDomain = Domain.getDomainWithZero(props, "x"); - expect(resultDomain).to.eql([1, 3]); - }); - }); - - describe("getMaxFromProps", () => { - it("returns maxDomain from props as an object", () => { - const props = { maxDomain: { x: 3 } }; - const maxDomain = Domain.getMaxFromProps(props, "x"); - expect(maxDomain).to.eql(props.maxDomain.x); - }); - - it("returns maxDomain from props as a number", () => { - const props = { maxDomain: 3 }; - const maxDomain = Domain.getMaxFromProps(props, "x"); - expect(maxDomain).to.eql(props.maxDomain); - }); - - it("returns undefined when maxDomain is not defined for a given axis", () => { - const props = { maxDomain: { y: 3 } }; - const maxDomain = Domain.getMaxFromProps(props, "x"); - expect(maxDomain).to.eql(undefined); - }); - }); - - describe("getMinFromProps", () => { - it("returns minDomain from props as an object", () => { - const props = { minDomain: { x: 3 } }; - const minDomain = Domain.getMinFromProps(props, "x"); - expect(minDomain).to.eql(props.minDomain.x); - }); - - it("returns minDomain from props as a number", () => { - const props = { minDomain: 3 }; - const minDomain = Domain.getMinFromProps(props, "x"); - expect(minDomain).to.eql(props.minDomain); - }); - - it("returns undefined when minDomain is not defined for a given axis", () => { - const props = { minDomain: { y: 3 } }; - const minDomain = Domain.getMinFromProps(props, "x"); - expect(minDomain).to.eql(undefined); - }); - }); - - describe("getSymmetricDomain", () => { - it("pads the domain by a value determined by data spacing", () => { - const domain = [0, 10]; - const data = [2, 4, 6, 8]; - const resultDomain = Domain.getSymmetricDomain(domain, data); - expect(resultDomain).to.eql([0, 12]); - }); - }); - - describe("isDomainComponent", () => { - class TestDomainComponent extends React.Component { - static role = "area"; - } - it("returns true when a component has a static role matching a whitelist", () => { - expect(Domain.isDomainComponent()).to.be.true; - }); - - it("returns false when a component has a role that does not match the whitelist", () => { - // eslint-disable-next-line react/no-multi-comp - class TestFooComponent extends React.Component { - static role = "foo"; - } - expect(Domain.isDomainComponent()).to.be.false; - }); - - it("returns true when a domain component is wrapped in VictoryPortal", () => { - expect( - Domain.isDomainComponent( - - - - ) - ).to.be.true; - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/events.spec.js b/test/client/spec/victory-core/victory-util/events.spec.js deleted file mode 100644 index cb16d29f3..000000000 --- a/test/client/spec/victory-core/victory-util/events.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* global sinon */ - -import { Events } from "victory-core"; - -describe("victory-util/events", () => { - describe("getPartialEvents", () => { - it("returns a set of new event functions with partially applied arguments", () => { - const events = { - onClick: (evt, childProps, index) => { - return { evt, childProps, index }; - } - }; - const index = 0; - const childProps = { style: { fill: "green" } }; - const result = Events.getPartialEvents(events, index, childProps); - expect(result).to.have.keys(["onClick"]); - expect(result.onClick()).to.have.keys(["evt", "childProps", "index"]); - expect(result.onClick().index).to.eql(index); - expect(result.onClick().childProps).to.eql(childProps); - }); - }); - - describe("getEvents", () => { - let sandbox; - let fake; - beforeEach(() => { - sandbox = sinon.createSandbox(); - fake = { - props: { - events: [ - { - target: "data", - eventHandlers: { - onClick: () => { - return { - mutation: () => { - return { foo: "foo" }; - } - }; - } - } - } - ] - }, - baseProps: { - 0: { - data: { foo: "bar" } - } - }, - setState: (x) => x, - state: {} - }; - sandbox.spy(fake, "setState"); - }); - - afterEach(() => { - sandbox.restore(); - }); - - it("returns new functions that call set state", () => { - const getScopedEvents = Events.getScopedEvents.bind(fake); - const getBoundEvents = Events.getEvents.bind(fake); - const index = 0; - const result = getBoundEvents(fake.props, "data", index, getScopedEvents); - expect(result).to.have.keys(["onClick"]); - const partialEvents = Events.getPartialEvents(result, index, {}); - expect(partialEvents).to.have.keys(["onClick"]); - partialEvents.onClick(); - expect(fake.setState).returned({ - [index]: { - data: { foo: "foo" } - } - }); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/helpers.spec.js b/test/client/spec/victory-core/victory-util/helpers.spec.js deleted file mode 100644 index 55f21299f..000000000 --- a/test/client/spec/victory-core/victory-util/helpers.spec.js +++ /dev/null @@ -1,189 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -import { Helpers } from "victory-core"; - -describe("victory-util/helpers", () => { - describe("omit", () => { - const data = { x: 3, y: 2, z: 1 }; - it("removes omitted keys and preserves all others", () => { - const newData = Helpers.omit(data, ["x"]); - expect(newData.x).to.be.undefined; - expect(newData.y).to.equal(2); - expect(newData.z).to.equal(1); - }); - it("creates a copy of the original object", () => { - const newData = Helpers.omit(data, []); - newData.x = 10; - expect(data.x).to.equal(3); - expect(newData.x).to.equal(10); - }); - it("defaults to an empty object", () => { - const newData = Helpers.omit(); - expect(newData).to.eql({}); - }); - it("defaults to simple shallow copy", () => { - const newData = Helpers.omit(data); - expect(newData).to.eql(data); - }); - }); - - describe("modifyProps", () => { - it("defaults to an empty object", () => { - expect(Helpers.modifyProps({})).to.eql({}); - }); - it("removes the theme role's style", () => { - const role = "legend"; - const props = { - theme: { - legend: { - style: { - color: "blue" - }, - data: 42 - } - } - }; - const fallbackProps = {}; - const modifiedProps = { - ...props, - data: 42 - }; - expect(Helpers.modifyProps(props, fallbackProps, role)).to.eql( - modifiedProps - ); - }); - it("uses fallbackProps", () => { - const props = { x: 2, y: 3 }; - const fallbackProps = { x: 12, y: 13, z: 14 }; - const modifiedProps = { x: 2, y: 3, z: 14 }; - expect(Helpers.modifyProps(props, fallbackProps)).to.eql(modifiedProps); - }); - }); - - describe("evaluateProp", () => { - const data = { x: 3, y: 2 }; - it("evaluates functional props", () => { - const testProp = (datum) => (datum.y > 0 ? "red" : "blue"); - expect(Helpers.evaluateProp(testProp, data)).to.equal("red"); - }); - it("doesn't alter non-functional props", () => { - const testProp = "blue"; - expect(Helpers.evaluateProp(testProp, data)).to.equal("blue"); - }); - }); - - describe("evaluateStyle", () => { - const data = { x: 3, y: 2 }; - it("evaluates functional styles, without altering others", () => { - const style = { - color: (datum) => (datum.y > 0 ? "red" : "blue"), - size: 5 - }; - expect(Helpers.evaluateStyle(style, data)).to.deep.equal({ - color: "red", - size: 5 - }); - }); - it("returns no styles if disableInlineStyles is true", () => { - const style = { - color: "blue" - }; - const props = { - disableInlineStyles: true - }; - expect(Helpers.evaluateStyle(style, props)).to.deep.equal({}); - }); - }); - - describe("getRange", () => { - const props = { - width: 100, - height: 200, - padding: 0 - }; - it("returns a range based on props and axis", () => { - expect(Helpers.getRange(props, "x")) - .to.be.an("array") - .and.to.have.length(2) - .and.to.include.members([0, 100]); - expect(Helpers.getRange(props, "y")) - .to.be.an("array") - .and.to.have.length(2) - .and.to.include.members([0, 200]); - }); - }); - - describe("getStyles", () => { - const defaultStyles = { - parent: { border: "black" }, - data: { fill: "blue", stroke: "black" }, - labels: { fontSize: 10, fontFamily: "Helvetica" } - }; - it("merges styles", () => { - const style = { data: { fill: "red" }, labels: { fontSize: 12 } }; - const styles = Helpers.getStyles(style, defaultStyles); - expect(styles.parent).to.deep.equal({ - border: "black", - width: "100%", - height: "100%" - }); - expect(styles.data).to.deep.equal({ fill: "red", stroke: "black" }); - expect(styles.labels).to.deep.equal({ - fontSize: 12, - fontFamily: "Helvetica" - }); - }); - }); - - describe("getPadding", () => { - it("sets padding from a single number", () => { - const props = { padding: 40 }; - expect(Helpers.getPadding(props)).to.deep.equal({ - top: 40, - bottom: 40, - left: 40, - right: 40 - }); - }); - it("sets padding from a complete object", () => { - const props = { - padding: { top: 20, bottom: 40, left: 60, right: 80 } - }; - expect(Helpers.getPadding(props)).to.deep.equal(props.padding); - }); - it("fills missing values with 0", () => { - const props = { - padding: { top: 40, bottom: 40 } - }; - expect(Helpers.getPadding(props)).to.deep.equal({ - top: 40, - bottom: 40, - left: 0, - right: 0 - }); - }); - }); - - describe("createAccessor", () => { - it("creates a valid object accessor from a property key", () => { - const accessor = Helpers.createAccessor("k"); - expect(accessor({ k: 42 })).to.eql(42); - }); - - it("creates a valid array accessor from an index", () => { - const accessor = Helpers.createAccessor(2); - expect(accessor([3, 4, 5])).to.eql(5); - }); - - it("creates a valid array accessor from a deeply nested path", () => { - const accessor = Helpers.createAccessor("x.y[0].0.z"); - expect(accessor({ x: { y: [[{ z: 1987 }]] } })).to.eql(1987); - }); - - it("creates a value (passthrough) accessor from null/undefined", () => { - const nullAccessor = Helpers.createAccessor(null); - const undefinedAccessor = Helpers.createAccessor(undefined); - expect(nullAccessor("ok")).to.eql("ok"); - expect(undefinedAccessor(14)).to.eql(14); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/label-helpers.spec.js b/test/client/spec/victory-core/victory-util/label-helpers.spec.js deleted file mode 100644 index fb6c7d8c7..000000000 --- a/test/client/spec/victory-core/victory-util/label-helpers.spec.js +++ /dev/null @@ -1,126 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* eslint max-nested-callbacks: 0 */ - -import { LabelHelpers, VictoryLabel } from "victory-core"; -import { assign } from "lodash"; -import React from "react"; -import * as d3Scale from "victory-vendor/d3-scale"; - -const scale = { x: d3Scale.scaleLinear(), y: d3Scale.scaleLinear() }; -const data = [ - { x: 0, y: 0 }, - { x: 0.5, y: 0.5 } -]; -const labelComponent = ; -const style = { labels: { fontSize: 8 } }; - -const basicProps = { scale, data, labelComponent, style }; - -describe("victory-util/label-helpers", () => { - describe("getProps", () => { - it("returns the correct positions given a set of props an and index", () => { - data.forEach((datum, index) => { - const labelProps = LabelHelpers.getProps(basicProps, index); - expect(labelProps.x).to.equal(datum.x); - expect(labelProps.y).to.equal(datum.y); - }); - }); - it("returns the correct label text from a labels array", () => { - const labels = ["one", "two"]; - const props = assign({ labels }, basicProps); - data.forEach((datum, index) => { - const labelProps = LabelHelpers.getProps(props, index); - expect(labelProps.text).to.equal(labels[index]); - }); - }); - it("returns the correct label text from datum", () => { - const dataWithLabels = [ - { x: 0, y: 0, label: "one" }, - { x: 0.5, y: 0.5, label: "two" } - ]; - const props = assign({}, basicProps, { data: dataWithLabels }); - data.forEach((datum, index) => { - const labelProps = LabelHelpers.getProps(props, index); - expect(labelProps.text).to.equal(dataWithLabels[index].label); - }); - }); - it("returns the correct positions for polar labels", () => { - const polarScale = { - x: d3Scale.scaleLinear().range([0, Math.PI * 2]), - y: d3Scale.scaleLinear() - }; - data.forEach((datum, index) => { - const props = assign({}, basicProps, { - scale: polarScale, - polar: true - }); - const labelProps = LabelHelpers.getProps(props, index); - expect(labelProps.x).to.equal( - datum.y * Math.cos(datum.x * Math.PI * 2) - ); - expect(labelProps.y).to.equal( - -datum.y * Math.sin(datum.x * Math.PI * 2) - ); - }); - }); - }); - - describe("getPolarAngle", () => { - it("returns zero when labelPlacement is vertical", () => { - const angle = LabelHelpers.getPolarAngle({ labelPlacement: "vertical" }); - expect(angle).to.equal(0); - }); - it("returns angles corresponding to perpendicular labelPlacement", () => { - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "perpendicular" }, 15) - ).to.equal(75); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "perpendicular" }, 45) - ).to.equal(45); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "perpendicular" }, 90) - ).to.equal(0); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "perpendicular" }, 135) - ).to.equal(-45); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "perpendicular" }, 180) - ).to.equal(90); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "perpendicular" }, 225) - ).to.equal(45); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "perpendicular" }, 270) - ).to.equal(0); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "perpendicular" }, 315) - ).to.equal(-45); - }); - it("returns angles corresponding to parallel labelPlacement", () => { - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "parallel" }, 15) - ).to.equal(-15); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "parallel" }, 45) - ).to.equal(-45); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "parallel" }, 90) - ).to.equal(-90); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "parallel" }, 135) - ).to.equal(45); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "parallel" }, 180) - ).to.equal(0); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "parallel" }, 225) - ).to.equal(-45); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "parallel" }, 270) - ).to.equal(-90); - expect( - LabelHelpers.getPolarAngle({ labelPlacement: "parallel" }, 315) - ).to.equal(45); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/point-path-helpers.js b/test/client/spec/victory-core/victory-util/point-path-helpers.js deleted file mode 100644 index 72b0c0714..000000000 --- a/test/client/spec/victory-core/victory-util/point-path-helpers.js +++ /dev/null @@ -1,75 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -import { PathHelpers } from "victory-core"; - -describe("point-path-helpers", () => { - const x = 0; - const y = 0; - const size = 1; - describe("circle", () => { - it("draws a path for a circle at the correct location", () => { - const pathResult = PathHelpers.circle(x, y, size); - expect(pathResult).to.contain(`M ${x}, ${y}`); - }); - }); - - describe("square", () => { - it("draws a path for a square at the correct location", () => { - const pathResult = PathHelpers.square(x, y, size); - const baseSize = 0.87 * size; - expect(pathResult).to.contain(`M ${x - baseSize}, ${y + baseSize}`); - }); - }); - - describe("diamond", () => { - it("draws a path for a diamond at the correct location", () => { - const pathResult = PathHelpers.diamond(0, 0, 1); - const baseSize = 0.87 * size; - const length = Math.sqrt(2 * (baseSize * baseSize)); - expect(pathResult).to.contain( - `M ${Math.round(x)}, ${Math.round(y + length)}` - ); - }); - }); - - describe("triangleUp", () => { - it("draws a path for a triangleUp at the correct location", () => { - const pathResult = PathHelpers.triangleUp(0, 0, 1); - expect(pathResult).to.contain(`M ${x - size}, ${y + size}`); - }); - }); - - describe("triangleDown", () => { - it("draws a path for a triangleDown at the correct location", () => { - const pathResult = PathHelpers.triangleDown(0, 0, 1); - expect(pathResult).to.contain(`M ${x - size}, ${y - size}`); - }); - }); - - describe("plus", () => { - it("draws a path for a plus at the correct location", () => { - const pathResult = PathHelpers.plus(0, 0, 1); - const baseSize = 1.1 * size; - const distance = baseSize / 1.5; - expect(pathResult).to.contain(`M ${x - distance / 2}, ${y + baseSize}`); - }); - }); - - describe("minus", () => { - it("draws a path for a minus at the correct location", () => { - const pathResult = PathHelpers.minus(0, 0, 1); - const baseSize = 1.1 * size; - const lineHeight = baseSize - baseSize * 0.3; - expect(pathResult).to.contain(`M ${x - baseSize}, ${y + lineHeight / 2}`); - }); - }); - - describe("star", () => { - it("draws a path for a star at the correct location", () => { - const pathResult = PathHelpers.star(0, 0, 1); - const angle = Math.PI / 5; - const baseSize = 1.35 * size; - expect(pathResult).to.contain(`M ${baseSize * Math.sin(angle) + x}, - ${baseSize * Math.cos(angle) + y}`); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/prop-types.spec.js b/test/client/spec/victory-core/victory-util/prop-types.spec.js deleted file mode 100644 index c42de80de..000000000 --- a/test/client/spec/victory-core/victory-util/prop-types.spec.js +++ /dev/null @@ -1,366 +0,0 @@ -/* global sinon:false, console */ -/* eslint no-unused-expressions: 0 */ -import PropTypes from "prop-types"; -import { PropTypes as CustomPropTypes } from "victory-core"; - -describe("victory-util/prop-types", () => { - /* eslint-disable no-console */ - describe("deprecated", () => { - let sandbox; - - const shouldWarn = (message) => { - expect(console.warn).calledOnce; - expect(console.warn).calledWith(message); - }; - - const shouldError = (message) => { - expect(console.error).calledOnce; - expect(console.error).calledWith(message); - }; - - const shouldNotError = () => { - expect(console.error).notCalled; - }; - - const validate = (prop) => { - return CustomPropTypes.deprecated(PropTypes.string, "Read more at link")( - { - pName: prop - }, - "pName", - "ComponentName" - ); - }; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - sandbox.stub(console, "warn"); - sandbox.stub(console, "error"); - }); - - afterEach(() => { - console.warn.restore(); - console.error.restore(); - sandbox.reset(); - }); - - it("Should warn about deprecation and validate OK", () => { - validate("value"); - shouldWarn( - '"pName" property of "ComponentName" has been deprecated Read more at link' - ); - shouldNotError(); - }); - - it(`Should warn about deprecation and throw validation error when property - value is not OK`, () => { - validate({}); - shouldWarn( - '"pName" property of "ComponentName" has been deprecated Read more at link' - ); - shouldError( - "Warning: Failed pName type: Invalid pName `pName` of type `object` supplied to " + - "`ComponentName`, expected `string`." - ); - }); - }); - /* eslint-enable no-console */ - - describe("allOfType", () => { - const validate = function (prop) { - return CustomPropTypes.allOfType([ - CustomPropTypes.nonNegative, - CustomPropTypes.integer - ])({ testProp: prop }, "testProp", "TestComponent"); - }; - - it("returns an error if the first validator is false", () => { - const result = validate(-1); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be a non-negative number." - ); - }); - - it("returns an error if the second validator is false", () => { - const result = validate(1.3); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be an integer." - ); - }); - - it("does not return an error if both validators are true", () => { - const result = validate(3); - expect(result).not.to.be.an.instanceOf(Error); - }); - }); - - describe("nonNegative", () => { - const validate = function (prop) { - return CustomPropTypes.nonNegative( - { testProp: prop }, - "testProp", - "TestComponent" - ); - }; - - it("returns an error for non numeric values", () => { - const result = validate("a"); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be a non-negative number." - ); - }); - - it("returns an error for negative numeric values", () => { - const result = validate(-1); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).to.contain( - "`testProp` in `TestComponent` must be a non-negative number." - ); - }); - - it("does not return an error for positive numeric values", () => { - const result = validate(1); - expect(result).not.to.be.an.instanceOf(Error); - }); - - it("does not return an error for zero", () => { - const result = validate(0); - expect(result).not.to.be.an.instanceOf(Error); - }); - }); - - describe("integer", () => { - const validate = function (prop) { - return CustomPropTypes.integer( - { testProp: prop }, - "testProp", - "TestComponent" - ); - }; - - it("returns an error for non numeric values", () => { - const result = validate("a"); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be an integer." - ); - }); - - it("returns an error for non-integer numeric values", () => { - const result = validate(2.4); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).to.contain( - "`testProp` in `TestComponent` must be an integer." - ); - }); - - it("does not return an error for integers", () => { - let result = validate(3); - expect(result).not.to.be.an.instanceOf(Error); - result = validate(-3); - expect(result).not.to.be.an.instanceOf(Error); - result = validate(0); - expect(result).not.to.be.an.instanceOf(Error); - }); - }); - - describe("greaterThanZero", () => { - const validate = function (prop) { - return CustomPropTypes.greaterThanZero( - { testProp: prop }, - "testProp", - "TestComponent" - ); - }; - - it("returns an error for non numeric values", () => { - const result = validate("a"); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be a number greater than zero." - ); - }); - - it("returns an error for zero", () => { - const result = validate(0); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).to.contain( - "`testProp` in `TestComponent` must be a number greater than zero." - ); - }); - - it("returns an error for negative numbers", () => { - const result = validate(-3); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).to.contain( - "`testProp` in `TestComponent` must be a number greater than zero." - ); - }); - - it("does not return an error for numbers greater than zero", () => { - let result = validate(0.1); - expect(result).not.to.be.an.instanceOf(Error); - result = validate(5); - expect(result).not.to.be.an.instanceOf(Error); - result = validate(1); - expect(result).not.to.be.an.instanceOf(Error); - }); - }); - - describe("domain", () => { - const validate = function (prop) { - return CustomPropTypes.domain( - { testProp: prop }, - "testProp", - "TestComponent" - ); - }; - - it("returns an error for non array values", () => { - const result = validate("a"); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be an array of two unique numeric values." - ); - }); - - it("returns an error when the length of the array is not two", () => { - const result = validate([1]); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be an array of two unique numeric values." - ); - }); - - it("returns an error when the values of the array are equal", () => { - const result = validate([1, 1]); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be an array of two unique numeric values." - ); - }); - - it("does not return an error for two element ascending arrays", () => { - const result = validate([0, 1]); - expect(result).not.to.be.an.instanceOf(Error); - }); - - it("does not return an error for two element descending arrays", () => { - const result = validate([1, 0]); - expect(result).not.to.be.an.instanceOf(Error); - }); - - it("does not return an error arrays of dates", () => { - const result = validate([new Date(1980, 1, 1), new Date(1990, 1, 1)]); - expect(result).not.to.be.an.instanceOf(Error); - }); - }); - - describe("scale", () => { - const validate = function (prop) { - return CustomPropTypes.scale( - { testProp: prop }, - "testProp", - "TestComponent" - ); - }; - - it("returns an error for non function values", () => { - const result = validate("a"); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be a d3 scale." - ); - }); - - it("returns an error when the function does not have a domain, range, and copy methods", () => { - const testFunc = () => { - "oops"; - }; - const result = validate(testFunc); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be a d3 scale." - ); - }); - - it.skip("does not return an error when the function is a d3 scale", () => { - // const testFunc = d3.scale.linear; TODO: Mock this rather than depending on d3 - // const result = validate(testFunc); - // expect(result).not.to.be.an.instanceOf(Error); - }); - }); - - describe("homogeneousArray", () => { - const validate = function (prop) { - return CustomPropTypes.homogeneousArray( - { testProp: prop }, - "testProp", - "TestComponent" - ); - }; - - it("returns an error for non array values", () => { - const result = validate("a"); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "`testProp` in `TestComponent` must be an array." - ); - }); - - it("returns an error when the array has elements of different types", () => { - const result = validate([1, "a"]); - expect(result).to.be.an.instanceOf(Error); - expect(result.message).contain( - "Expected `testProp` in `TestComponent` to be a homogeneous array, but found " + - "types `Number` and `String`." - ); - }); - - it("does not return an error for empty arrays", () => { - const result = validate([]); - expect(result).not.to.be.an.instanceOf(Error); - }); - - it("does not return an error for arrays with one item", () => { - const result = validate(["a"]); - expect(result).not.to.be.an.instanceOf(Error); - }); - - it("does not return an error for arrays where all elements are the same type", () => { - const result = validate([1, 0]); - expect(result).not.to.be.an.instanceOf(Error); - }); - }); - - describe("matchDataLength", () => { - const validate = function (prop, dataProp) { - const props = { testProp: prop, data: dataProp }; - return CustomPropTypes.matchDataLength( - props, - "testProp", - "TestComponent" - ); - }; - - it("does not return an error when prop is undefined", () => { - expect(validate()).to.not.be.an.instanceOf(Error); - }); - - it("does not return an error when prop has same length as data", () => { - expect(validate([{}, {}], [1, 2])).to.not.be.an.instanceOf(Error); - }); - - it("returns an error when prop doesn't have same length as data", () => { - expect(validate([{}], [1, 2])) - .to.be.an.instanceOf(Error) - .and.to.have.property( - "message", - "Length of data and testProp arrays must match." - ); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/scale.spec.js b/test/client/spec/victory-core/victory-util/scale.spec.js deleted file mode 100644 index 187c2b3f1..000000000 --- a/test/client/spec/victory-core/victory-util/scale.spec.js +++ /dev/null @@ -1,132 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* eslint-disable max-nested-callbacks */ - -import { Scale } from "victory-core"; -import * as d3Scale from "victory-vendor/d3-scale"; - -describe("victory-util/scale", () => { - describe("getBaseScale", () => { - it("returns a scale from `getScaleFromProps` when string props are provided", () => { - const props = { scale: "log" }; - const baseScale = Scale.getBaseScale(props, "x"); - expect(baseScale).to.be.a.function; - expect(baseScale.base).to.be.a.function; // This is a unique check for log scales - }); - - it("returns a scale from `getScaleFromProps` when a d3 scale is provided", () => { - const props = { scale: d3Scale.scaleLog() }; - const baseScale = Scale.getBaseScale(props, "x"); - expect(baseScale).to.be.a.function; - expect(baseScale.base).to.be.a.function; // This is a unique check for log scales - }); - - it("returns a default scale when data is provided", () => { - const props = { data: [{ x: 0, y: 1 }] }; - const baseScale = Scale.getBaseScale(props, "x"); - expect(baseScale).to.be.a.function; - expect(baseScale.domain).to.be.a.function; - }); - - it("returns a default scale when nothing is provided", () => { - const baseScale = Scale.getBaseScale({}, "x"); - expect(baseScale).to.be.a.function; - expect(baseScale.domain).to.be.a.function; - }); - }); - - describe("getScaleFromProps", () => { - it("returns a scale when a single scale is provided in props", () => { - const props = { scale: "log" }; - const propsScale = Scale.getScaleFromProps(props, "x"); - expect(propsScale).to.be.a.function; - expect(propsScale.base).to.be.a.function; // This is a unique check for log scales - }); - - it("returns a scale when a scale object contains a scale for an axis", () => { - const props = { scale: { x: "log" } }; - const propsScale = Scale.getScaleFromProps(props, "x"); - expect(propsScale).to.be.a.function; - expect(propsScale.base).to.be.a.function; // This is a unique check for log scales - }); - - it("returns undefined when a scale object does not contain a scale for an axis", () => { - const props = { scale: { y: "log" } }; - const propsScale = Scale.getScaleFromProps(props, "x"); - expect(propsScale).to.be.undefined; - }); - - it("returns undefined when an invalid scale is provided in props", () => { - const props = { scale: "foo" }; - const propsScale = Scale.getScaleFromProps(props, "x"); - expect(propsScale).to.be.undefined; - }); - - it("returns undefined when no scale prop is provided", () => { - const propsScale = Scale.getScaleFromProps({}, "x"); - expect(propsScale).to.be.undefined; - }); - }); - - describe("getScaleType", () => { - it("returns 'log' for log scales", () => { - const props = { scale: { x: d3Scale.scaleLog() } }; - const scaleType = Scale.getScaleType(props, "x"); - expect(scaleType).to.equal("log"); - }); - - it("returns a string value given a string prop", () => { - const props = { scale: { x: "linear" } }; - const scaleType = Scale.getScaleType(props, "x"); - expect(scaleType).to.equal("linear"); - }); - - it("uses data to distinguish between time and linear scales", () => { - const props = { scale: { x: d3Scale.scaleLinear() } }; - const scaleType = Scale.getScaleType(props, "x"); - expect(scaleType).to.equal("linear"); - }); - - it("returns 'linear' when no scale is set", () => { - const props = {}; - const scaleType = Scale.getScaleType(props, "x"); - expect(scaleType).to.equal("linear"); - }); - - it("returns 'time' when no scale is set, and data contains dates", () => { - const props = { - x: "x", - y: "y", - data: [{ x: new Date("2016-01-13"), y: 1 }] - }; - const scaleType = Scale.getScaleType(props, "x"); - expect(scaleType).to.equal("time"); - }); - }); - - describe("getType", () => { - it("returns undefined on unknown function type", () => { - const scaleType = Scale.getType(function () {}); - expect(scaleType).to.equal(undefined); - }); - - it("returns a string value given a string prop", () => { - const scaleType = Scale.getType("linear"); - expect(scaleType).to.equal("linear"); - }); - - it("returns 'log' for log scales", () => { - const scaleType = Scale.getType(d3Scale.scaleLog()); - expect(scaleType).to.equal("log"); - }); - - it("matches 'quantile'", () => { - const scaleType = Scale.getType(d3Scale.scaleQuantile()); - expect(scaleType).to.equal("quantile"); - }); - - it("returns undefined for scaleLinear", () => { - const scaleType = Scale.getType(d3Scale.scaleLinear()); - expect(scaleType).to.equal(undefined); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/selection.spec.js b/test/client/spec/victory-core/victory-util/selection.spec.js deleted file mode 100644 index 76cc35dac..000000000 --- a/test/client/spec/victory-core/victory-util/selection.spec.js +++ /dev/null @@ -1,52 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* eslint max-nested-callbacks: 0 */ - -import { Selection } from "victory-core"; -import * as d3Scale from "victory-vendor/d3-scale"; - -describe("helpers/selection", () => { - describe("getBounds", () => { - it("returns min / max bounds", () => { - const x1 = 10; - const x2 = 5; - const y1 = 0; - const y2 = 1; - const scale = { x: d3Scale.scaleLinear(), y: d3Scale.scaleLinear() }; - const props = { x1, x2, y1, y2, scale }; - const bounds = Selection.getBounds(props); - expect(bounds).to.eql({ x: [x2, x1], y: [y1, y2] }); - }); - }); - - describe("getDomainCoordinates", () => { - it("returns coordinates corresponding to domain min max", () => { - const scale = { - x: d3Scale.scaleLinear(), - y: d3Scale.scaleLinear() - }; - const coords = Selection.getDomainCoordinates({ scale }); - expect(coords).to.eql({ x: [0, 1], y: [0, 1] }); - }); - }); - - describe("getDataCoordinates", () => { - it("returns coordinates corresponding to point x, y", () => { - const scale = { - x: d3Scale.scaleLinear(), - y: d3Scale.scaleLinear() - }; - const coords = Selection.getDataCoordinates({}, scale, 1, 1); - expect(coords).to.eql({ x: 1, y: 1 }); - }); - it("returns polar coordinates corresponding to point x, y", () => { - const scale = { - x: d3Scale.scaleLinear().range([0, Math.PI * 2]), - y: d3Scale.scaleLinear() - }; - const x = Math.PI; - const y = 0; - const coords = Selection.getDataCoordinates({ polar: true }, scale, x, y); - expect(coords).to.eql({ x: 0, y: Math.PI }); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/style.spec.js b/test/client/spec/victory-core/victory-util/style.spec.js deleted file mode 100644 index f8c4e2b05..000000000 --- a/test/client/spec/victory-core/victory-util/style.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import { Style } from "victory-core"; - -describe("toTransformString", () => { - it("returns an empty string if no transform definitions are given", () => { - expect(Style.toTransformString({})).to.equal(""); - }); - - it("returns a string with two transform instructions when an object is given", () => { - expect( - Style.toTransformString({ - rotate: [45, 0, 1], - skewY: [65] - }) - ).to.equal("rotate(45,0,1) skewY(65)"); - }); - - it("returns a string with two transform instructions when two objects are given", () => { - expect( - Style.toTransformString({ rotate: [45, 0, 1] }, { skewY: [65] }) - ).to.equal("rotate(45,0,1) skewY(65)"); - }); - - it("returns at least the subsequent transforms if the first is undefined", () => { - expect(Style.toTransformString(undefined, { skewY: [65] })).to.equal( - "skewY(65)" - ); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/textsize.spec.js b/test/client/spec/victory-core/victory-util/textsize.spec.js deleted file mode 100644 index fb3841979..000000000 --- a/test/client/spec/victory-core/victory-util/textsize.spec.js +++ /dev/null @@ -1,176 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -import { TextSize } from "victory-core"; - -const testString = "ABC"; - -describe("victory-util/textsize", () => { - describe("convertLengthToPixels", () => { - it("translate pixels as number of pixels", () => { - expect(TextSize.convertLengthToPixels("20px")).to.eql(20); - }); - it("translate absolute measurement length units to particular number of pixels", () => { - expect(TextSize.convertLengthToPixels("10pt")).to.eql(13.3); - }); - it("translate relative measurement length units to particular number of pixels", () => { - expect(TextSize.convertLengthToPixels("1.5em", 16)).to.eql(24); - }); - }); - - describe("approximateWidth", () => { - it("return zero width when no style", () => { - expect(TextSize.approximateTextSize(testString).width).to.eql(0); - }); - it("return correct width with signed angle", () => { - expect( - TextSize.approximateTextSize(testString, { - angle: -45, - fontSize: 14 - }).width.toFixed(2) - ).to.be.eql("31.71"); - }); - it("return correct width with pixel fontsize", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: "14px" - }).width.toFixed(2) - ).to.be.eql("28.74"); - }); - it("return appropriate width with defined fontSize", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12 - }).width.toFixed(2) - ).to.be.eql("24.64"); - }); - it("consider font", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 16 - }).width.toFixed(2) - ).to.be.eql("32.85"); - }); - it("consider letterSpacing", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12, - letterSpacing: "1px" - }).width.toFixed(2) - ).to.be.eql("26.64"); - }); - it("consider angle", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12, - angle: 30 - }).width.toFixed(2) - ).to.be.eql("28.24"); - }); - it("not consider lineHeight without angle", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12, - lineHeight: 2 - }).width.toFixed(2) - ).to.eql("24.64"); - }); - it("consider lineHeight with angle", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12, - lineHeight: 2, - angle: 30 - }).width.toFixed(2) - ).to.eql("35.14"); - }); - it("return width of widest string in text", () => { - expect( - TextSize.approximateTextSize("ABC\nDEFGH\nIJK", { - fontSize: 12 - }).width.toFixed(2) - ).to.eql("41.94"); - }); - - it("returns width of widest string in array if array has an empty string", () => { - expect( - TextSize.approximateTextSize(["06-14-20", ""], { - fontSize: 12 - }).width.toFixed(2) - ).to.eql("47.93"); - }); - }); - - describe("approximateHeight", () => { - it("return zero width when no style", () => { - expect(TextSize.approximateTextSize(testString).height).to.eql(0); - }); - it("return correct height with signed angle", () => { - expect( - TextSize.approximateTextSize(testString, { - angle: -45, - fontSize: 14 - }).height.toFixed(2) - ).to.be.eql("33.29"); - }); - it("return correct height with pixel fontsize", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: "14px" - }).height.toFixed(2) - ).to.be.eql("16.90"); - }); - it("return appropriate height with expected precision", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12 - }).height.toFixed(2) - ).to.be.eql("14.49"); - }); - it("consider font", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 16 - }).height.toFixed(2) - ).to.be.eql("19.32"); - }); - it("consider angle", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12, - angle: 30 - }).height.toFixed(2) - ).to.be.eql("25.48"); - }); - it("not consider letterSpacing without angle", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12, - letterSpacing: "1px" - }).height.toFixed(2) - ).to.eql("14.49"); - }); - it("consider letterSpacing with angle", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12, - angle: 30, - letterSpacing: "1px" - }).height.toFixed(2) - ).to.be.eql("26.53"); - }); - it("consider lineHeight", () => { - expect( - TextSize.approximateTextSize(testString, { - fontSize: 12, - lineHeight: 2 - }).height.toFixed(2) - ).to.be.eql("28.98"); - }); - it("consider multiLines text", () => { - expect( - TextSize.approximateTextSize(`ABC\n${"DBCDEFG"}\n123`, { - fontSize: 12 - }).height.toFixed(2) - ).to.be.eql("43.47"); - }); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/transitions.spec.js b/test/client/spec/victory-core/victory-util/transitions.spec.js deleted file mode 100644 index 22673d70b..000000000 --- a/test/client/spec/victory-core/victory-util/transitions.spec.js +++ /dev/null @@ -1,142 +0,0 @@ -/* eslint no-unused-expressions: 0*/ -/* global sinon */ -import { Transitions } from "victory-core"; -import React from "react"; - -describe("getInitialTransitionState", () => { - const makeChild = (data) => { - return React.createElement("div", { data }); - }; - - it("returns a 'falsey' transition object if children are not given", () => { - const result = Transitions.getInitialTransitionState(null, null); - expect(result).to.eql({ - childrenTransitions: [], - nodesWillExit: false, - nodesWillEnter: false, - nodesShouldEnter: false - }); - }); - - it("it returns childTransitions entering and exiting false for identical data", () => { - const child = makeChild([ - { x: 1, y: 1 }, - { x: 2, y: 3 } - ]); - const result = Transitions.getInitialTransitionState(child, child); - expect(result).to.eql({ - childrenTransitions: [{ entering: false, exiting: false }], - nodesWillExit: false, - nodesWillEnter: false, - nodesShouldEnter: false - }); - }); - - it("it returns childTransitions with exiting data", () => { - const child1 = makeChild([ - { x: 1, y: 1 }, - { x: 2, y: 3 } - ]); - const child2 = makeChild([{ x: 1, y: 1 }]); - const result = Transitions.getInitialTransitionState(child1, child2); - expect(result).to.eql({ - childrenTransitions: [{ entering: false, exiting: { 1: true } }], - nodesWillExit: true, - nodesWillEnter: false, - nodesShouldEnter: false - }); - }); - - it("it returns childTransitions with entering data", () => { - const child1 = makeChild([{ x: 1, y: 1 }]); - const child2 = makeChild([ - { x: 1, y: 1 }, - { x: 2, y: 3 } - ]); - const result = Transitions.getInitialTransitionState(child1, child2); - expect(result).to.eql({ - childrenTransitions: [{ entering: { 1: true }, exiting: false }], - nodesWillExit: false, - nodesWillEnter: true, - nodesShouldEnter: false - }); - }); -}); - -describe("getTransitionPropsFactory", () => { - const toZero = sinon.spy(() => ({ y: 0 })); - const makeChild = (data) => { - return { - type: { - defaultTransitions: { - onExit: { duration: 1, before: toZero }, - onEnter: { duration: 2, before: toZero } - } - }, - props: { data, animate: { duration: 0 } } - }; - }; - - const callback = sinon.stub(); - - it("returns a function that describes data exiting", () => { - const exitingState = { - childrenTransitions: [{ entering: false, exiting: { 1: true } }], - nodesWillExit: true, - nodesWillEnter: false, - nodesShouldEnter: false, - nodesShouldLoad: true, - nodesDoneLoad: true - }; - const result = Transitions.getTransitionPropsFactory( - {}, - exitingState, - callback - ); - const child = makeChild([ - { x: 1, y: 1 }, - { x: 2, y: 3 } - ]); - const calledResult = result(child); - expect(result).to.be.a("function"); - expect(calledResult).to.have.keys(["animate", "data"]); - expect(toZero).calledWith({ x: 2, y: 3 }); - expect(calledResult.data).to.eql([ - { x: 1, y: 1 }, - { x: 2, y: 0 } - ]); - expect(calledResult.animate.duration).to.equal( - child.type.defaultTransitions.onExit.duration - ); - }); - - it("returns a function that describes data entering", () => { - const enteringState = { - childrenTransitions: [{ entering: { 1: true }, exiting: false }], - nodesWillExit: false, - nodesWillEnter: true, - nodesShouldEnter: false, - nodesShouldLoad: true, - nodesDoneLoad: true - }; - const result = Transitions.getTransitionPropsFactory( - {}, - enteringState, - callback - ); - const child = makeChild([ - { x: 1, y: 1 }, - { x: 2, y: 3 } - ]); - const calledResult = result(child); - expect(result).to.be.a("function"); - expect(calledResult).to.be.a("object"); - expect(calledResult).to.be.a("object"); - expect(calledResult).to.have.keys(["animate", "data"]); - expect(toZero).calledWith({ x: 2, y: 3 }); - expect(calledResult.data).to.eql([ - { x: 1, y: 1 }, - { x: 2, y: 0 } - ]); - }); -}); diff --git a/test/client/spec/victory-core/victory-util/wrapper.spec.js b/test/client/spec/victory-core/victory-util/wrapper.spec.js deleted file mode 100644 index 9f4571b2e..000000000 --- a/test/client/spec/victory-core/victory-util/wrapper.spec.js +++ /dev/null @@ -1,85 +0,0 @@ -/* eslint-disable no-unused-expressions,react/no-multi-comp */ -import { Wrapper } from "victory-core"; -import React from "react"; -import { VictoryAxis } from "victory-axis"; -import { VictoryLine } from "victory-line"; - -describe("helpers/wrapper", () => { - const getVictoryLine = (props) => React.createElement(VictoryLine, props); - const getVictoryAxis = (props) => React.createElement(VictoryAxis, props); - - describe("getDomain", () => { - const victoryLine = getVictoryLine({ domain: [0, 3] }); - const xAxis = getVictoryAxis({ dependentAxis: false }); - const yAxis = getVictoryAxis({ dependentAxis: true }); - const childComponents = [victoryLine, xAxis, yAxis]; - - it("calculates a domain from props", () => { - const props = { domain: { x: [1, 2], y: [2, 3] } }; - const domainResultX = Wrapper.getDomain(props, "x", childComponents); - expect(domainResultX).to.eql([1, 2]); - }); - - it("calculates a domain from child components", () => { - const props = { children: childComponents }; - const domainResultX = Wrapper.getDomain(props, "x", childComponents); - expect(domainResultX).to.eql(victoryLine.props.domain); - }); - }); - - describe("getStringsFromData", () => { - it("returns an array of strings from a data prop", () => { - const props = { - data: [ - { x: "one", y: 1 }, - { x: "red", y: 2 }, - { x: "cat", y: 3 } - ] - }; - const childComponents = [getVictoryLine(props)]; - const dataStrings = Wrapper.getStringsFromData(childComponents).x; - expect(dataStrings).to.eql(["one", "red", "cat"]); - }); - - it("returns an array of strings from array-type data", () => { - const props = { - data: [ - ["one", 1], - ["red", 2], - ["cat", 3] - ], - x: 0, - y: 1 - }; - const childComponents = [getVictoryLine(props)]; - const dataStrings = Wrapper.getStringsFromData(childComponents).x; - expect(dataStrings).to.eql(["one", "red", "cat"]); - }); - - it("only returns strings, if data is mixed", () => { - const props = { - data: [ - { x: 1, y: 1 }, - { x: "three", y: 3 } - ] - }; - const childComponents = [getVictoryLine(props)]; - expect(Wrapper.getStringsFromData(childComponents).x).to.eql(["three"]); - }); - - it("returns an empty array when no strings are present", () => { - const props = { - data: [ - { x: 1, y: 1 }, - { x: 3, y: 3 } - ] - }; - const childComponents = [getVictoryLine(props)]; - expect(Wrapper.getStringsFromData(childComponents).x).to.eql([]); - }); - - it("returns an empty array when no children are given", () => { - expect(Wrapper.getStringsFromData([])).to.eql({ x: [], y: [] }); - }); - }); -}); diff --git a/test/client/spec/victory-errorbars/error-bar.spec.js b/test/client/spec/victory-errorbars/error-bar.spec.js deleted file mode 100644 index ce254c821..000000000 --- a/test/client/spec/victory-errorbars/error-bar.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -import React from "react"; -import { shallow } from "enzyme"; -import { ErrorBar } from "victory-errorbar"; -import { Line } from "victory-core"; -import { forEach, omit } from "lodash"; - -describe("victory-primitives/error-bar", () => { - const baseProps = { - x: 4, - y: 5, - errorX: [1, 3], - errorY: [0.2, 2], - scale: { - x: { range: () => [-10, 10] }, - y: { range: () => [10, -10] } - }, - borderWidth: 20 - }; - - const compareLineCoordinates = (line, coordinates) => { - forEach(coordinates, (coordinateValue, coordinateName) => { - const props = line.props(); - expect(props[coordinateName]).to.eql(parseFloat(coordinateValue, 10)); - }); - }; - - it("should render eight lines", () => { - const wrapper = shallow(); - const lines = wrapper.find("g").find(Line); - - const expectedCoordinates = [ - // Right Border (positiveErrorX, positiveErrorX, y - borderWidth, y + borderWidth) - { x1: 1, x2: 1, y1: -15, y2: 25 }, - // Left Border(negativeErrorX, negativeErrorX, y - borderWidth, y + borderWidth) - { x1: 3, x2: 3, y1: -15, y2: 25 }, - // Bottom Border(x - borderWidth, x + borderWidth, negativeErrorY, negativeErrorY) - { x1: -16, x2: 24, y1: 0.2, y2: 0.2 }, - // Top Border(x - borderWidth, x + borderWidth, positiveErrorY, positiveErrorY) - { x1: -16, x2: 24, y1: 2, y2: 2 }, - // Right Cross(x, positiveErrorX, y, y) - { x1: 4, x2: 1, y1: 5, y2: 5 }, - // Left Cross(x, negativeErrorX, y, y) - { x1: 4, x2: 3, y1: 5, y2: 5 }, - // Bottom Cross(x, x, y, negativeErrorY) - { x1: 4, x2: 4, y1: 5, y2: 0.2 }, - // Bottom Cross(x, x, y, positiveErrorY) - { x1: 4, x2: 4, y1: 5, y2: 2 } - ]; - - expect(lines.length).to.eql(8); - lines.forEach((line, i) => { - compareLineCoordinates(line, expectedCoordinates[i]); - }); - }); - - it("should render four lines when only x error type is supplied", () => { - const xErrorProps = omit(baseProps, ["errorY"]); - - const wrapper = shallow(); - const lines = wrapper.find("g").find(Line); - - const expectedCoordinates = [ - // Right Border (positiveErrorX, positiveErrorX, y - borderWidth, y + borderWidth) - { x1: 1, x2: 1, y1: -15, y2: 25 }, - // Left Border(negativeErrorX, negativeErrorX, y - borderWidth, y + borderWidth) - { x1: 3, x2: 3, y1: -15, y2: 25 }, - // Right Cross(x, positiveErrorX, y, y) - { x1: 4, x2: 1, y1: 5, y2: 5 }, - // Left Cross(x, negativeErrorX, y, y) - { x1: 4, x2: 3, y1: 5, y2: 5 } - ]; - - expect(lines.length).to.eql(4); - lines.forEach((line, i) => { - compareLineCoordinates(line, expectedCoordinates[i]); - }); - }); - - it("should render four lines when only y error type is supplied", () => { - const yErrorProps = omit(baseProps, ["errorX"]); - - const wrapper = shallow(); - const lines = wrapper.find("g").find(Line); - - const expectedCoordinates = [ - // Bottom Border(x - borderWidth, x + borderWidth, negativeErrorY, negativeErrorY) - { x1: -16, x2: 24, y1: 0.2, y2: 0.2 }, - // Top Border(x - borderWidth, x + borderWidth, positiveErrorY, positiveErrorY) - { x1: -16, x2: 24, y1: 2, y2: 2 }, - // Bottom Cross(x, x, y, negativeErrorY) - { x1: 4, x2: 4, y1: 5, y2: 0.2 }, - // Bottom Cross(x, x, y, positiveErrorY) - { x1: 4, x2: 4, y1: 5, y2: 2 } - ]; - - expect(lines.length).to.eql(4); - lines.forEach((line, i) => { - compareLineCoordinates(line, expectedCoordinates[i]); - }); - }); -}); diff --git a/test/client/spec/victory-errorbars/victory-errorbars.spec.js b/test/client/spec/victory-errorbars/victory-errorbars.spec.js deleted file mode 100644 index 0f1d720b6..000000000 --- a/test/client/spec/victory-errorbars/victory-errorbars.spec.js +++ /dev/null @@ -1,1094 +0,0 @@ -/** - * Client tests - */ -/*eslint-disable max-nested-callbacks */ -/* global sinon */ -/* eslint no-unused-expressions: 0 */ -import React from "react"; -import { shallow, mount } from "enzyme"; -import { omit, range } from "lodash"; -import { fromJS } from "immutable"; -import * as d3Scale from "victory-vendor/d3-scale"; -import { VictoryErrorBar, ErrorBar } from "victory-errorbar"; -import { Line } from "victory-core"; - -class MyErrorBar extends React.Component { - render() {} -} - -describe("components/victory-errorbar", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-errorbar"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("renders 4 errors", () => { - const wrapper = shallow(); - const errorbars = wrapper.find(ErrorBar); - expect(errorbars.length).to.equal(4); - }); - }); - - it("does not render data with null x or y values", () => { - const data = [ - { x: 15, y: 35, errorX: 1, errorY: 3 }, - { x: null, y: 42, errorX: 3, errorY: 2 }, - { x: 25, y: null, errorX: 5, errorY: 5 } - ]; - const wrapper = mount(); - expect(wrapper.find(ErrorBar).length).to.equal(1); - }); - - const immutableRenderDataTest = { - createData: (x) => fromJS(x), - testLabel: "with immutable data" - }; - const renderDataTest = { - createData: (x) => x, - testLabel: "with js data" - }; - - [renderDataTest, immutableRenderDataTest].forEach( - ({ createData, testLabel }) => { - describe(`symmetric error, rendering data ${testLabel}`, () => { - it("renders injected errors for {x, y}", () => { - const data = createData( - range(10).map((i) => ({ x: i, y: i, errorX: 0.1, errorY: 0.2 })) - ); - const wrapper = shallow( - } /> - ); - - const errors = wrapper.find(MyErrorBar); - expect(errors.length).to.equal(10); - }); - - it("renders errors for {x, y}", () => { - const data = createData( - range(10).map((i) => ({ x: i, y: i, errorX: 0.1, errorY: 0.2 })) - ); - const wrapper = shallow(); - const errors = wrapper.find(ErrorBar); - expect(errors.length).to.equal(10); - }); - - it("sorts data by sortKey prop", () => { - const data = createData( - range(5) - .map((i) => ({ x: i, y: i, errorX: 0.1, errorY: 0.2 })) - .reverse() - ); - const wrapper = shallow(); - const xValues = wrapper - .find(ErrorBar) - .map((errorBar) => errorBar.prop("datum")._x); - expect(xValues).to.eql([0, 1, 2, 3, 4]); - }); - - it("reversed sorted data with the sortOrder prop", () => { - const data = createData( - range(5) - .map((i) => ({ x: i, y: i, errorX: 0.1, errorY: 0.2 })) - .reverse() - ); - const wrapper = shallow( - - ); - const xValues = wrapper - .find(ErrorBar) - .map((errorBar) => errorBar.prop("datum")._x); - expect(xValues).to.eql([4, 3, 2, 1, 0]); - }); - - it("renders errors with error bars, check total svg lines", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const wrapper = mount( - - ); - expect(wrapper.find(Line)).to.have.length(24); - }); - - it("should check right border of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const borderWidth = 10; - const data = [ - { x: 0, y: 0, errorX: 0.1, errorY: 0.2 }, - { x: 2, y: 3, errorX: 0.1, errorY: 0.2 }, - { x: 5, y: 5, errorX: 0.1, errorY: 0.2 } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.1, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.2, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorX = xScale(data[i].x + data[i].errorX); - const xScaleMax = xScale.range()[1]; - const positiveErrorX = errorX >= xScaleMax ? xScaleMax : errorX; - // right border - const rightBorder = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("border-right") !== -1 - ); - expect(rightBorder.props().x1).to.equal(positiveErrorX); - expect(rightBorder.props().x2).to.equal(positiveErrorX); - expect(rightBorder.props().y1).to.equal( - yScale(data[i].y) - borderWidth - ); - expect(rightBorder.props().y2).to.equal( - yScale(data[i].y) + borderWidth - ); - }); - }); - - it("should check left border of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const borderWidth = 10; - const data = [ - { x: 0, y: 0, errorX: 0.1, errorY: 0.2 }, - { x: 2, y: 3, errorX: 0.1, errorY: 0.2 }, - { x: 5, y: 5, errorX: 0.1, errorY: 0.2 } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.1, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.2, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorX = xScale(data[i].x - data[i].errorX); - const xScaleMin = xScale.range()[0]; - const negativeErrorX = errorX <= xScaleMin ? xScaleMin : errorX; - - // left border - const leftBorder = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("border-left") !== -1 - ); - expect(leftBorder.props().x1).to.equal(negativeErrorX); - expect(leftBorder.props().x2).to.equal(negativeErrorX); - expect(leftBorder.props().y1).to.equal( - yScale(data[i].y) - borderWidth - ); - expect(leftBorder.props().y2).to.equal( - yScale(data[i].y) + borderWidth - ); - }); - }); - - it("should check bottom border of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const borderWidth = 10; - const data = [ - { x: 0, y: 0, errorX: 0.1, errorY: 0.2 }, - { x: 2, y: 3, errorX: 0.1, errorY: 0.2 }, - { x: 5, y: 5, errorX: 0.1, errorY: 0.2 } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.1, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.2, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorY = yScale(data[i].y + data[i].errorY); - const yScaleMin = yScale.range()[1]; - const negativeErrorY = errorY <= yScaleMin ? yScaleMin : errorY; - - // bottom border - const bottomBorder = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("border-bottom") !== -1 - ); - expect(bottomBorder.props().x1).to.equal( - xScale(data[i].x) - borderWidth - ); - expect(bottomBorder.props().x2).to.equal( - xScale(data[i].x) + borderWidth - ); - expect(bottomBorder.props().y1).to.equal(negativeErrorY); - expect(bottomBorder.props().y2).to.equal(negativeErrorY); - }); - }); - - it("should check top border of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const borderWidth = 10; - const data = [ - { x: 0, y: 0, errorX: 0.1, errorY: 0.2 }, - { x: 2, y: 3, errorX: 0.1, errorY: 0.2 }, - { x: 5, y: 5, errorX: 0.1, errorY: 0.2 } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.1, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.2, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorY = yScale(data[i].y - data[i].errorY); - const yScaleMax = yScale.range()[0]; - const positiveErrorY = errorY >= yScaleMax ? yScaleMax : errorY; - - // top border - const topBorder = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("border-top") !== -1 - ); - expect(topBorder.props().x1).to.equal( - xScale(data[i].x) - borderWidth - ); - expect(topBorder.props().x2).to.equal( - xScale(data[i].x) + borderWidth - ); - expect(topBorder.props().y1).to.equal(positiveErrorY); - expect(topBorder.props().y2).to.equal(positiveErrorY); - }); - }); - - it("should check top cross line of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const data = [ - { x: 0, y: 0, errorX: 0.1, errorY: 0.2 }, - { x: 2, y: 3, errorX: 0.1, errorY: 0.2 }, - { x: 5, y: 5, errorX: 0.1, errorY: 0.2 } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.1, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.2, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorY = yScale(data[i].y - data[i].errorY); - const yScaleMax = yScale.range()[0]; - const positiveErrorY = errorY >= yScaleMax ? yScaleMax : errorY; - - const topCross = node - .find(Line) - .findWhere((n) => n.key() && n.key().indexOf("cross-top") !== -1); - expect(topCross.props().x1).to.equal(xScale(data[i].x)); - expect(topCross.props().x2).to.equal(xScale(data[i].x)); - expect(topCross.props().y1).to.equal(yScale(data[i].y)); - expect(topCross.props().y2).to.equal(positiveErrorY); - }); - }); - - it("should check bottom cross line of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const data = [ - { x: 0, y: 0, errorX: 0.1, errorY: 0.2 }, - { x: 2, y: 3, errorX: 0.1, errorY: 0.2 }, - { x: 5, y: 5, errorX: 0.1, errorY: 0.2 } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.1, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.2, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorY = yScale(data[i].y + data[i].errorY); - const yScaleMin = yScale.range()[1]; - const negativeErrorY = errorY <= yScaleMin ? yScaleMin : errorY; - - const bottomCross = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("cross-bottom") !== -1 - ); - expect(bottomCross.props().x1).to.equal(xScale(data[i].x)); - expect(bottomCross.props().x2).to.equal(xScale(data[i].x)); - expect(bottomCross.props().y1).to.equal(yScale(data[i].y)); - expect(bottomCross.props().y2).to.equal(negativeErrorY); - }); - }); - - it("should check left cross line of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const data = [ - { x: 0, y: 0, errorX: 0.1, errorY: 0.2 }, - { x: 2, y: 3, errorX: 0.1, errorY: 0.2 }, - { x: 5, y: 5, errorX: 0.1, errorY: 0.2 } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.1, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.2, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorX = xScale(data[i].x - data[i].errorX); - const xScaleMin = xScale.range()[0]; - const negativeErrorX = errorX <= xScaleMin ? xScaleMin : errorX; - - const leftCross = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("cross-left") !== -1 - ); - expect(leftCross.props().x1).to.equal(xScale(data[i].x)); - expect(leftCross.props().x2).to.equal(negativeErrorX); - expect(leftCross.props().y1).to.equal(yScale(data[i].y)); - expect(leftCross.props().y2).to.equal(yScale(data[i].y)); - }); - }); - - it("should check right cross line of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const data = [ - { x: 0, y: 0, errorX: 0.1, errorY: 0.2 }, - { x: 2, y: 3, errorX: 0.1, errorY: 0.2 }, - { x: 5, y: 5, errorX: 0.1, errorY: 0.2 } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.1, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.2, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorX = xScale(data[i].errorX + data[i].x); - const xScaleMax = xScale.range()[1]; - const positiveErrorX = errorX >= xScaleMax ? xScaleMax : errorX; - - const rightCross = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("cross-right") !== -1 - ); - expect(rightCross.props().x1).to.equal(xScale(data[i].x)); - expect(rightCross.props().x2).to.equal(positiveErrorX); - expect(rightCross.props().y1).to.equal(yScale(data[i].y)); - expect(rightCross.props().y2).to.equal(yScale(data[i].y)); - }); - }); - }); - - describe(`asymmetric error, rendering data ${testLabel}`, () => { - it("renders injected errors for {x, y}", () => { - const data = createData( - range(10).map((i) => ({ - x: i, - y: i, - errorX: [0.1, 0.2], - errorY: [0.2, 0.5] - })) - ); - const wrapper = shallow( - } /> - ); - - const errors = wrapper.find(MyErrorBar); - expect(errors.length).to.equal(10); - }); - - it("renders errors for {x, y}", () => { - const data = createData( - range(10).map((i) => ({ - x: i, - y: i, - errorX: [0.1, 0.2], - errorY: [0.2, 1] - })) - ); - const wrapper = shallow(); - const errors = wrapper.find(ErrorBar); - expect(errors.length).to.equal(10); - }); - - it("renders errors with error bars, check total svg lines", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const wrapper = mount( - - ); - expect(wrapper.find(Line)).to.have.length(24); - }); - - it("should check right border of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const borderWidth = 10; - const data = [ - { x: 0, y: 0, errorX: [0.1, 0.3], errorY: [0.2, 0.5] }, - { x: 2, y: 3, errorX: [0.1, 0.2], errorY: [0.2, 0.3] }, - { x: 5, y: 5, errorX: [0.1, 0.6], errorY: [0.2, 0.1] } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.3, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.5, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorX = xScale(data[i].x + data[i].errorX[0]); - const xScaleMax = xScale.range()[1]; - const positiveErrorX = errorX >= xScaleMax ? xScaleMax : errorX; - - // right border - const rightBorder = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("border-right") !== -1 - ); - expect(rightBorder.props().x1).to.equal(positiveErrorX); - expect(rightBorder.props().x2).to.equal(positiveErrorX); - expect(rightBorder.props().y1).to.equal( - yScale(data[i].y) - borderWidth - ); - expect(rightBorder.props().y2).to.equal( - yScale(data[i].y) + borderWidth - ); - }); - }); - - it("should check left border of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const borderWidth = 10; - const data = [ - { x: 0, y: 0, errorX: [0.1, 0.3], errorY: [0.2, 0.5] }, - { x: 2, y: 3, errorX: [0.1, 0.2], errorY: [0.2, 0.3] }, - { x: 5, y: 5, errorX: [0.1, 0.6], errorY: [0.2, 0.1] } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.3, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.5, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorX = xScale(data[i].x - data[i].errorX[1]); - const xScaleMin = xScale.range()[0]; - const negativeErrorX = errorX <= xScaleMin ? xScaleMin : errorX; - - // left border - const leftBorder = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("border-left") !== -1 - ); - expect(leftBorder.props().x1).to.equal(negativeErrorX); - expect(leftBorder.props().x2).to.equal(negativeErrorX); - expect(leftBorder.props().y1).to.equal( - yScale(data[i].y) - borderWidth - ); - expect(leftBorder.props().y2).to.equal( - yScale(data[i].y) + borderWidth - ); - }); - }); - - it("should check bottom border of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const borderWidth = 10; - const data = [ - { x: 0, y: 0, errorX: [0.1, 0.3], errorY: [0.2, 0.5] }, - { x: 2, y: 3, errorX: [0.1, 0.2], errorY: [0.2, 0.3] }, - { x: 5, y: 5, errorX: [0.1, 0.6], errorY: [0.2, 0.1] } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.3, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.5, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorY = yScale(data[i].y + data[i].errorY[0]); - const yScaleMin = yScale.range()[1]; - const negativeErrorY = errorY <= yScaleMin ? yScaleMin : errorY; - - // bottom border - const bottomBorder = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("border-bottom") !== -1 - ); - expect(bottomBorder.props().x1).to.equal( - xScale(data[i].x) - borderWidth - ); - expect(bottomBorder.props().x2).to.equal( - xScale(data[i].x) + borderWidth - ); - expect(bottomBorder.props().y1).to.equal(negativeErrorY); - expect(bottomBorder.props().y2).to.equal(negativeErrorY); - }); - }); - - it("should check top border of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const borderWidth = 10; - const data = [ - { x: 0, y: 0, errorX: [0.1, 0.3], errorY: [0.2, 0.5] }, - { x: 2, y: 3, errorX: [0.1, 0.2], errorY: [0.2, 0.3] }, - { x: 5, y: 5, errorX: [0.1, 0.6], errorY: [0.2, 0.1] } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.3, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.5, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorY = yScale(data[i].y - data[i].errorY[1]); - const yScaleMax = yScale.range()[0]; - const positiveErrorY = errorY >= yScaleMax ? yScaleMax : errorY; - - const topBorder = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("border-top") !== -1 - ); - expect(topBorder.props().x1).to.equal( - xScale(data[i].x) - borderWidth - ); - expect(topBorder.props().x2).to.equal( - xScale(data[i].x) + borderWidth - ); - expect(topBorder.props().y1).to.equal(positiveErrorY); - expect(topBorder.props().y2).to.equal(positiveErrorY); - }); - }); - - it("should check top cross line of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const data = [ - { x: 0, y: 0, errorX: [0.1, 0.3], errorY: [0.2, 0.5] }, - { x: 2, y: 3, errorX: [0.1, 0.2], errorY: [0.2, 0.3] }, - { x: 5, y: 5, errorX: [0.1, 0.6], errorY: [0.2, 0.1] } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.3, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.5, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorY = yScale(data[i].y - data[i].errorY[1]); - const yScaleMax = yScale.range()[0]; - const positiveErrorY = errorY >= yScaleMax ? yScaleMax : errorY; - - const topCross = node - .find(Line) - .findWhere((n) => n.key() && n.key().indexOf("cross-top") !== -1); - expect(topCross.props().x1).to.equal(xScale(data[i].x)); - expect(topCross.props().x2).to.equal(xScale(data[i].x)); - expect(topCross.props().y1).to.equal(yScale(data[i].y)); - expect(topCross.props().y2).to.equal(positiveErrorY); - }); - }); - - it("should check bottom cross line of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const data = [ - { x: 0, y: 0, errorX: [0.1, 0.3], errorY: [0.2, 0.5] }, - { x: 2, y: 3, errorX: [0.1, 0.2], errorY: [0.2, 0.3] }, - { x: 5, y: 5, errorX: [0.1, 0.6], errorY: [0.2, 0.1] } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.3, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.5, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorY = yScale(data[i].y + data[i].errorY[0]); - const yScaleMin = yScale.range()[1]; - const negativeErrorY = errorY <= yScaleMin ? yScaleMin : errorY; - - const bottomCross = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("cross-bottom") !== -1 - ); - expect(bottomCross.props().x1).to.equal(xScale(data[i].x)); - expect(bottomCross.props().x2).to.equal(xScale(data[i].x)); - expect(bottomCross.props().y1).to.equal(yScale(data[i].y)); - expect(bottomCross.props().y2).to.equal(negativeErrorY); - }); - }); - - it("should check left cross line of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const data = [ - { x: 0, y: 0, errorX: [0.1, 0.3], errorY: [0.2, 0.5] }, - { x: 2, y: 3, errorX: [0.1, 0.2], errorY: [0.2, 0.3] }, - { x: 5, y: 5, errorX: [0.1, 0.6], errorY: [0.2, 0.1] } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.3, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.5, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorX = xScale(data[i].x - data[i].errorX[1]); - const xScaleMin = xScale.range()[0]; - const negativeErrorX = errorX <= xScaleMin ? xScaleMin : errorX; - - const leftCross = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("cross-left") !== -1 - ); - expect(leftCross.props().x1).to.equal(xScale(data[i].x)); - expect(leftCross.props().x2).to.equal(negativeErrorX); - expect(leftCross.props().y1).to.equal(yScale(data[i].y)); - expect(leftCross.props().y2).to.equal(yScale(data[i].y)); - }); - }); - - it("should check right cross line of error bars positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const data = [ - { x: 0, y: 0, errorX: [0.1, 0.3], errorY: [0.2, 0.5] }, - { x: 2, y: 3, errorX: [0.1, 0.2], errorY: [0.2, 0.3] }, - { x: 5, y: 5, errorX: [0.1, 0.6], errorY: [0.2, 0.1] } - ]; - const wrapper = mount( - - ); - - const xScale = d3Scale - .scaleLinear() - .domain([-0.3, 5.1]) - .range([ - svgDimensions.padding, - svgDimensions.width - svgDimensions.padding - ]); - - const yScale = d3Scale - .scaleLinear() - .domain([-0.5, 5.2]) - .range([ - svgDimensions.height - svgDimensions.padding, - svgDimensions.padding - ]); - - const Data = wrapper.find(ErrorBar); - Data.forEach((node, i) => { - const errorX = xScale(data[i].x + data[i].errorX[0]); - const xScaleMax = xScale.range()[1]; - const positiveErrorX = errorX >= xScaleMax ? xScaleMax : errorX; - - const rightCross = node - .find(Line) - .findWhere( - (n) => n.key() && n.key().indexOf("cross-right") !== -1 - ); - expect(rightCross.props().x1).to.equal(xScale(data[i].x)); - expect(rightCross.props().x2).to.equal(positiveErrorX); - expect(rightCross.props().y1).to.equal(yScale(data[i].y)); - expect(rightCross.props().y2).to.equal(yScale(data[i].y)); - }); - }); - }); - } - ); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "data", - "scale", - "width", - "height", - "style" - ); - }); - - it("attaches an event to data, click border lines", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Data = wrapper.find(ErrorBar); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - // click the border line - node.find("line").at(3).simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - - it("attaches an event to data, click cross lines", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Data = wrapper.find(ErrorBar); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - // click the cross line - node.find("line").at(7).simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - describe("accessibility", () => { - it("adds an aria label-label and tabIndex to Error Bar primitive", () => { - const data = [ - { x: 35, y: 50, error: 0.2 }, - { x: 10, y: 43, error: 0.15 }, - { x: 45, y: 65, error: 0.5 } - ]; - const wrapper = mount( - `error bar chart, x ${datum.x}`} - tabIndex={({ index }) => index + 2} - /> - } - /> - ); - - expect(wrapper.find("g")).to.have.length(4); - // first "g" holds the datagroup, child "g"s represent each data point, so we remove the first "g" - wrapper - .find("g") - .slice(1) - .forEach((g, i) => { - expect(g.prop("aria-label")).to.equal( - `error bar chart, x ${data[i].x}` - ); - expect(g.prop("tabIndex")).to.equal(i + 2); - }); - }); - }); - }); -}); diff --git a/test/client/spec/victory-group/victory-group.spec.js b/test/client/spec/victory-group/victory-group.spec.js deleted file mode 100644 index f70bb1574..000000000 --- a/test/client/spec/victory-group/victory-group.spec.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Client tests - */ -/*eslint-disable max-nested-callbacks */ - -import React from "react"; -import { mount } from "enzyme"; -import { VictoryGroup } from "victory-group"; -import { VictoryBar } from "victory-bar"; - -describe("components/victory-group", () => { - it("has a static role", () => { - expect(VictoryGroup.role).to.equal("group"); - }); - - describe("default component rendering", () => { - it("renders an svg with the correct width and height", () => { - const wrapper = mount( - - - - - ); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount( - - - - - ); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("accepts user props", () => { - const wrapper = mount( - - - - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-group"); - expect(svgNode.getAttribute("aria-label")).to.equal("Group"); - }); - }); -}); diff --git a/test/client/spec/victory-histogram/victory-histogram.spec.js b/test/client/spec/victory-histogram/victory-histogram.spec.js deleted file mode 100644 index 23f45a304..000000000 --- a/test/client/spec/victory-histogram/victory-histogram.spec.js +++ /dev/null @@ -1,211 +0,0 @@ -/** - * Client tests - */ -/*eslint-disable max-nested-callbacks */ -/* global sinon */ -/* eslint no-unused-expressions: 0 */ - -import React from "react"; -import { shallow, mount } from "enzyme"; -import { omit, range } from "lodash"; -import SvgTestHelper from "../svg-test-helper"; -import { VictoryHistogram } from "victory-histogram"; - -describe("components/victory-histogram", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-histogram"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("renders 0 bars", () => { - const wrapper = shallow(); - const bars = wrapper.find("Bar"); - expect(bars.length).to.equal(0); - }); - - it("renders 4 bars", () => { - const wrapper = shallow(); - const bars = wrapper.find("Bar"); - expect(bars.length).to.equal(4); - }); - - it("renders each bar as a rectangle", () => { - const wrapper = mount(); - const bars = wrapper.find("Bar"); - bars.forEach(SvgTestHelper.expectIsRectangular); - }); - }); - - describe("rendering data", () => { - it("renders bars for {x} shaped data (default)", () => { - const data = range(10).map((i) => ({ x: i })); - const wrapper = shallow(); - const bars = wrapper.find("Bar"); - expect(bars.length).to.be.greaterThan(0); - }); - - it("renders bars for deeply-nested data", () => { - const data = range(10).map((i) => ({ a: { b: [{ x: i }] } })); - const wrapper = shallow(); - const bars = wrapper.find("Bar"); - expect(bars.length).to.be.greaterThan(0); - }); - - it("renders 2 bars of equal height", () => { - const data = [{ x: 2 }, { x: 3 }]; - const wrapper = mount( - - ); - const bars = wrapper.find("Bar"); - const heights = bars - .map(SvgTestHelper.getBarHeight) - .map((n) => parseInt(n)); - - expect(bars.length).to.equal(2); - expect(heights[0]).to.equal(heights[1]); - expect(heights[0]).to.be.greaterThan(0); - }); - - it("renders bars values with null accessor", () => { - const data = range(30); - const wrapper = shallow( - - ); - const bars = wrapper.find("Bar"); - expect(bars.length).to.be.greaterThan(0); - }); - - it("renders bars with appropriate relative heights", () => { - const wrapper = mount( - - ); - const bars = wrapper.find("Bar"); - const heights = bars.map(SvgTestHelper.getBarHeight); - - expect(heights[1] / 2).to.be.closeTo(heights[0], 0.5); - expect((heights[2] * 2) / 3).to.be.closeTo(heights[1], 0.5); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "data", - "scale", - "width", - "height", - "style" - ); - }); - - it("attaches an event to data", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - - const Data = wrapper.find("Bar"); - expect(Data).to.have.lengthOf(2); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - node.simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - - it("attaches an event to a label", () => { - const clickHandler = sinon.spy(); - const data = [{ x: 0 }, { x: 1 }, { x: 2 }]; - const wrapper = mount( - `${datum.index}`} - /> - ); - - const Labels = wrapper.find("VictoryLabel"); - expect(Labels).to.have.lengthOf(3); - Labels.forEach((node, index) => { - node.childAt(0).simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(typeof clickHandler.args[index][1].text === "function").to.eql( - true - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - }); - - describe("accessibility", () => { - it("adds an aria role to each bar in the series", () => { - const data = range(20).map((x) => ({ x })); - const wrapper = mount(); - - wrapper.find("path").forEach((p) => { - const roleValue = p.prop("role"); - expect(roleValue).to.be.a("string"); - expect(roleValue).to.equal("presentation"); - }); - }); - }); -}); diff --git a/test/client/spec/victory-legend/victory-legend.spec.js b/test/client/spec/victory-legend/victory-legend.spec.js deleted file mode 100644 index ae27a5beb..000000000 --- a/test/client/spec/victory-legend/victory-legend.spec.js +++ /dev/null @@ -1,235 +0,0 @@ -/** - * Client tests - */ -import React from "react"; -import { shallow, render } from "enzyme"; -import { VictoryLegend } from "victory-legend"; - -const initialData = [ - { - name: "Series 1", - symbol: { - type: "circle" - } - }, - { - name: "Series 2", - labels: { - fill: "red" - }, - symbol: { - type: "triangleUp", - fill: "blue" - } - } -]; - -describe("components/victory-legend", () => { - let wrapper = shallow(); - - it("has expected content with shallow render", () => { - const output = wrapper.find("VictoryLabel"); - expect(output.length).to.equal(2); - }); - - it("has expected horizontal symbol position", () => { - const wrappedLegend = shallow( - - ); - const output = wrappedLegend.find("Point"); - - expect(output.at(0).prop("x")).to.equal(14); - expect(output.at(1).prop("x")).to.equal(88.39999999999999); - expect(output.at(0).prop("y")).to.equal(14); - expect(output.at(1).prop("y")).to.equal(14); - }); - - it("has expected vertical symbol position", () => { - const wrappedLegend = shallow( - - ); - const output = wrappedLegend.find("Point"); - - expect(output.at(0).prop("x")).to.equal(14); - expect(output.at(1).prop("x")).to.equal(14); - expect(output.at(0).prop("y")).to.equal(14); - expect(output.at(1).prop("y")).to.equal(44.905); - }); - - it("has expected horizontal legend labels position", () => { - const wrappedLegend = render( - - ); - const output = wrappedLegend.find("text"); - - expect(output.eq(0).prop("x")).to.equal("30.8"); - expect(output.eq(1).prop("x")).to.equal("105.19999999999999"); - expect(output.eq(0).prop("y")).to.equal("18.97"); - expect(output.eq(1).prop("y")).to.equal("18.97"); - }); - - it("has expected vertical legend labels position", () => { - const wrappedLegend = render( - - ); - const output = wrappedLegend.find("text"); - - expect(output.eq(0).prop("x")).to.equal("30.8"); - expect(output.eq(1).prop("x")).to.equal("30.8"); - expect(output.eq(0).prop("y")).to.equal("18.97"); - expect(output.eq(1).prop("y")).to.equal("49.875"); - }); - - describe("symbols", () => { - const legendData = [ - { - name: "Series 1", - labels: { - fontSize: 10 - }, - symbol: { - type: "circle", - fill: "red" - } - }, - { - name: "Long Series Name", - labels: { - fontSize: 12 - }, - symbol: { - type: "triangleUp", - fill: "blue" - } - } - ]; - - wrapper = shallow(); - const output = wrapper.find("Point"); - - it("has expected symbols length", () => { - expect(output.length).to.equal(2); - }); - - it("has expected symbol colors", () => { - expect(output.get(0).props.style.fill).to.equal("red"); - expect(output.get(1).props.style.fill).to.equal("blue"); - }); - - it("has expected symbol type", () => { - expect(output.get(0).props.symbol).to.equal("circle"); - expect(output.get(1).props.symbol).to.equal("triangleUp"); - }); - }); - - describe("legend style prop", () => { - const legendData = [ - { - name: "Thing 1" - }, - { - name: "Thing 2" - } - ]; - - const styleObject = { - data: { - type: "triangleUp", - fill: "green" - }, - labels: { - fontSize: 16 - } - }; - - wrapper = shallow(); - const outputPoints = wrapper.find("Point"); - const outputLabels = wrapper.find("VictoryLabel"); - - it("has expected symbol type", () => { - expect(outputPoints.at(0).prop("symbol")).to.equal("triangleUp"); - expect(outputPoints.at(1).prop("symbol")).to.equal("triangleUp"); - }); - - it("has expected symbol colors", () => { - expect(outputPoints.get(0).props.style.fill).to.equal("green"); - expect(outputPoints.get(1).props.style.fill).to.equal("green"); - }); - - it("has expected label colors", () => { - expect(outputLabels.get(0).props.style.fill).to.equal("#252525"); - expect(outputLabels.get(1).props.style.fill).to.equal("#252525"); - }); - }); - - describe("itemsPerRow", () => { - const legendData = [ - { - name: "Thing 1" - }, - { - name: "Thing 2" - }, - { - name: "Thing 3" - }, - { - name: "Thing 4" - }, - { - name: "Thing 5" - }, - { - name: "Thing 6" - } - ]; - - it("displays items in columns", () => { - wrapper = shallow(); - const outputLabels = wrapper.find("VictoryLabel"); - const outputPoints = wrapper.find("Point"); - - // items line up between columns - expect(outputPoints.get(0).props.y).to.equal(outputPoints.get(3).props.y); - expect(outputLabels.get(0).props.y).to.equal(outputLabels.get(3).props.y); - expect(outputPoints.get(1).props.y).to.equal(outputPoints.get(4).props.y); - expect(outputLabels.get(1).props.y).to.equal(outputLabels.get(4).props.y); - expect(outputPoints.get(2).props.y).to.equal(outputPoints.get(5).props.y); - expect(outputLabels.get(2).props.y).to.equal(outputLabels.get(2).props.y); - - // columns are the same distance apart - expect(outputPoints.get(0).props.x - outputPoints.get(3).props.x) - .to.equal(outputPoints.get(1).props.x - outputPoints.get(4).props.x) - .and.to.equal( - outputPoints.get(2).props.x - outputPoints.get(5).props.x - ); - }); - - it("displays items in rows", () => { - wrapper = shallow( - - ); - const outputLabels = wrapper.find("VictoryLabel"); - const outputPoints = wrapper.find("Point"); - - // items line up between rows - expect(outputPoints.get(0).props.x).to.equal(outputPoints.get(3).props.x); - expect(outputLabels.get(0).props.x).to.equal(outputLabels.get(3).props.x); - expect(outputPoints.get(1).props.x).to.equal(outputPoints.get(4).props.x); - expect(outputLabels.get(1).props.x).to.equal(outputLabels.get(4).props.x); - expect(outputPoints.get(2).props.x).to.equal(outputPoints.get(5).props.x); - expect(outputLabels.get(2).props.x).to.equal(outputLabels.get(2).props.x); - - // rows are the same distance apart - expect(outputPoints.get(0).props.y - outputPoints.get(3).props.y) - .to.equal(outputPoints.get(1).props.y - outputPoints.get(4).props.y) - .and.to.equal( - outputPoints.get(2).props.y - outputPoints.get(5).props.y - ); - }); - }); -}); diff --git a/test/client/spec/victory-line/victory-line.spec.js b/test/client/spec/victory-line/victory-line.spec.js deleted file mode 100644 index e9732df05..000000000 --- a/test/client/spec/victory-line/victory-line.spec.js +++ /dev/null @@ -1,339 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -/*eslint-disable max-nested-callbacks */ -/* eslint no-unused-expressions: 0 */ - -import React from "react"; -import { omit, random, range } from "lodash"; -import { shallow, mount } from "enzyme"; -import { curveCatmullRom } from "victory-vendor/d3-shape"; -import SvgTestHelper from "../svg-test-helper"; -import { VictoryLine, Curve } from "victory-line"; -import { VictoryLabel } from "victory-core"; - -class MyLineSegment extends React.Component { - render() {} -} - -describe("components/victory-line", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-line"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - }); - - describe("rendering with data", () => { - it("renders one dataComponent for the line", () => { - const data = [ - { x: 1, y: 1 }, - { x: 2, y: 4 }, - { x: 3, y: 5 }, - { x: 4, y: 2 }, - { x: 5, y: 3 }, - { x: 6, y: 4 }, - { x: 7, y: 6 } - ]; - const wrapper = shallow( - } /> - ); - - const lines = wrapper.find(MyLineSegment); - expect(lines.length).to.equal(1); - }); - - it("renders one line segment for the line", () => { - const data = [ - { x: 1, y: 1 }, - { x: 2, y: 4 }, - { x: 3, y: 5 }, - { x: 4, y: 2 }, - { x: 5, y: 3 }, - { x: 6, y: 4 }, - { x: 7, y: 6 } - ]; - const wrapper = shallow(); - const lines = wrapper.find(Curve); - expect(lines.length).to.equal(1); - }); - - it("renders the correct d3Shape path", () => { - const props = { - interpolation: "linear", - scale: "linear", - padding: 50, - width: 400, - height: 300, - data: [ - { x: 0, y: 0 }, - { x: 1, y: 1 }, - { x: 2, y: 2 } - ] - }; - const wrapper = mount(); - const line = wrapper.find(Curve); - SvgTestHelper.expectCorrectD3Path(line, props, "line"); - }); - - it("renders the correct d3Shape path with custom interpolation", () => { - const props = { - scale: "linear", - padding: 50, - width: 400, - height: 300, - data: [ - { x: 0, y: 0 }, - { x: 1, y: 1 }, - { x: 2, y: 2 } - ] - }; - const stringWrapper = mount( - - ); - const stringLine = stringWrapper.find(Curve); - const stringPath = stringLine.find("path").prop("d"); - SvgTestHelper.expectCorrectD3Path( - stringLine, - { ...props, interpolation: "catmullRom" }, - "line" - ); - - const functionWrapper = mount( - - ); - const functionLine = functionWrapper.find(Curve); - const functionPath = functionLine.find("path").prop("d"); - SvgTestHelper.expectCorrectD3Path( - functionLine, - { ...props, interpolation: curveCatmullRom }, - "line" - ); - - expect(functionPath).to.equal(stringPath); - }); - }); - - describe("rendering with accessors", () => { - it("renders array-type data", () => { - const data = [ - [1, 2], - [3, 4] - ]; - const wrapper = mount(); - const lines = wrapper.find("path"); - expect(lines.length).to.equal(1); - }); - - it("renders data values with null accessor", () => { - const data = [1, 2, 3, 4]; - const wrapper = shallow(); - const lines = wrapper.find(Curve); - expect(lines.length).to.equal(1); - }); - - it("renders deeply nested data", () => { - const data = [ - { a: { b: [{ x: 1, y: 2 }] } }, - { a: { b: [{ x: 3, y: 4 }] } } - ]; - const wrapper = shallow( - - ); - const lines = wrapper.find(Curve); - expect(lines.length).to.equal(1); - }); - - it("renders data ordered by x-value, by default", () => { - const data = [{ t: 0 /*x: 10, y: 1*/ }, { t: 1 /*x: 9, y: 1*/ }]; - const wrapper = shallow( - 10 - t} y={() => 1} /> - ); - const lines = wrapper.find(Curve); - - expect(lines.props().data[0].t).to.equal(1); - expect(lines.props().data[1].t).to.equal(0); - }); - - it("renders data ordered by value of sortKey, if given", () => { - const data = [{ t: 0 /*x: 10, y: 1*/ }, { t: 1 /*x: 9, y: 1*/ }]; - const wrapper = shallow( - 10 - t} - y={() => 1} - /> - ); - const lines = wrapper.find(Curve); - - expect(lines.props().data[0].t).to.equal(0); - expect(lines.props().data[1].t).to.equal(1); - }); - - it("reverses data with the sortOrder prop", () => { - const data = [ - { t: 0, x: 10, y: 1 }, - { t: 1, x: 9, y: 1 } - ]; - const wrapper = shallow( - 10 - t} - y={() => 1} - sortOrder="descending" - /> - ); - const lines = wrapper.find(Curve); - - expect(lines.props().data[0].t).to.equal(1); - expect(lines.props().data[1].t).to.equal(0); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "data", - "scale", - "width", - "height", - "style" - ); - }); - - it("attaches an event to data", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Data = wrapper.find(Curve); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - node.simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - }); - }); - - it("attaches an event to a label", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Labels = wrapper.find(VictoryLabel); - Labels.forEach((node, index) => { - node.childAt(0).simulate("click"); - expect(clickHandler).called; - expect(clickHandler.args[index][1]).to.contain({ text: "okay" }); - }); - }); - }); - - describe("accessibility", () => { - it("adds an aria role to a line segment", () => { - const wrapper = mount(); - const roleValue = wrapper.find("path").prop("role"); - expect(roleValue).to.be.a("string"); - expect(roleValue).to.equal("presentation"); - }); - - it("adds an aria role to each line segment", () => { - const data = [ - { x: 1, y: 1 }, - { x: 2, y: 3 }, - { x: 3, y: 5 }, - { x: 4, y: 2 }, - { x: 5, y: null }, - { x: 6, y: null }, - { x: 7, y: 6 }, - { x: 8, y: 7 }, - { x: 9, y: 8 }, - { x: 10, y: 12 } - ]; - const wrapper = mount(); - - wrapper.find("path").forEach((p) => { - const roleValue = p.prop("role"); - expect(roleValue).to.be.a("string"); - expect(roleValue).to.equal("presentation"); - }); - }); - - it("adds aria-label and tabIndex to Area primitive", () => { - const ariaTestData = range(4).map((x) => ({ x, y: random(1, 7) })); - const wrapper = mount( - - `data point ${data[2].x + 1}'s x value is ${data[2].x}` - } - tabIndex={3} - /> - } - /> - ); - expect(wrapper.find("path")).to.have.length(1); - wrapper.find("path").forEach((p) => { - expect(p.prop("aria-label")).to.equal(`data point 3's x value is 2`); - expect(p.prop("tabIndex")).to.equal(3); - }); - }); - }); -}); diff --git a/test/client/spec/victory-pie/victory-pie.spec.js b/test/client/spec/victory-pie/victory-pie.spec.js deleted file mode 100644 index bc70f6aab..000000000 --- a/test/client/spec/victory-pie/victory-pie.spec.js +++ /dev/null @@ -1,407 +0,0 @@ -/** - * Client tests - */ -/*eslint-disable max-nested-callbacks,no-unused-expressions,max-len */ -/* global sinon */ -import { range, omit } from "lodash"; -import React from "react"; -import { shallow, mount } from "enzyme"; -import { Style, VictoryLabel } from "victory-core"; -import SvgTestHelper from "../svg-test-helper-pie"; -import { VictoryPie, Slice } from "victory-pie"; - -class PizzaSlice extends React.Component { - render() {} -} - -describe("components/victory-pie", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-pie"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("viewBox")).to.equal("0 0 400 400"); - }); - - it("renders 5 slices", () => { - const wrapper = shallow(); - - const slices = wrapper.find(Slice); - expect(slices).to.have.lengthOf(5); - }); - - it("renders each slice as a circular sector", () => { - const wrapper = shallow(); - const slices = wrapper.find(Slice); - slices.forEach(SvgTestHelper.expectIsCircularSection); - }); - - it("renders 5 slice labels", () => { - const wrapper = shallow(); - - const labels = wrapper.find(VictoryLabel); - expect(labels).to.have.lengthOf(5); - }); - - it("renders 0 slice labels for empty label array", () => { - const wrapper = shallow(); - - const labels = wrapper.find(VictoryLabel); - expect(labels).to.have.lengthOf(0); - }); - - it("renders 0 slice labels for label function returning undefined", () => { - const wrapper = shallow( {}} />); - - const labels = wrapper.find(VictoryLabel); - expect(labels).to.have.lengthOf(0); - }); - }); - - describe("rendering data", () => { - it("renders dataComponents for {x, y} shaped data (default)", () => { - const data = range(5).map((i) => ({ x: i, y: i })); - const wrapper = shallow( - } /> - ); - const slices = wrapper.find(PizzaSlice); - expect(slices.length).to.equal(5); - }); - - it("renders points for {x, y} shaped data (default)", () => { - const data = range(5).map((i) => ({ x: i, y: i })); - const wrapper = shallow(); - const slices = wrapper.find(Slice); - expect(slices.length).to.equal(5); - }); - - it("renders points for array-shaped data", () => { - const data = range(6).map((i) => [i, i]); - const wrapper = shallow(); - const slices = wrapper.find(Slice); - expect(slices.length).to.equal(6); - }); - - it("renders points for deeply-nested data", () => { - const data = range(7).map((i) => ({ a: { b: [{ x: i, y: i }] } })); - const wrapper = shallow( - - ); - const slices = wrapper.find(Slice); - expect(slices.length).to.equal(7); - }); - - it("renders data values with null accessor", () => { - const data = range(8); - const wrapper = shallow(); - const slices = wrapper.find(Slice); - expect(slices.length).to.equal(8); - }); - - it("renders data values in their given order", () => { - const data = range(9).map((i) => ({ x: i, y: i })); - - const wrapper = shallow(); - const xValues = wrapper.find(Slice).map((slice) => { - return slice.prop("datum")._x; - }); - - expect(xValues).to.eql([0, 1, 2, 3, 4, 5, 6, 7, 8]); - }); - - it("renders data values sorted by sortKey prop", () => { - const data = range(9) - .map((i) => ({ x: i, y: i })) - .reverse(); - - const wrapper = shallow(); - const xValues = wrapper.find(Slice).map((slice) => { - return slice.prop("datum")._x; - }); - - expect(xValues).to.eql([0, 1, 2, 3, 4, 5, 6, 7, 8]); - }); - - it("renders data values sorted by sortKey prop and sortOrder", () => { - const data = range(9).map((i) => ({ x: i, y: i })); - - const wrapper = shallow( - - ); - const xValues = wrapper.find(Slice).map((slice) => { - return slice.prop("datum")._x; - }); - - expect(xValues).to.eql([8, 7, 6, 5, 4, 3, 2, 1, 0]); - }); - - it("does not render data with null x or y values", () => { - const data = [ - { x: 1, y: 2 }, - { x: null, y: 4 }, - { x: 5, y: null } - ]; - const wrapper = mount(); - expect(wrapper.find(Slice).length).to.equal(1); - }); - }); - - describe("the `startAngle` prop", () => { - it("determines the counter clockwise angle relative to a cartesian Y axis of a vector extending from the origin to the _first drawn coordinate_ of the first slice ", () => { - [0, 90, 180, 270].map((angle) => { - const wrapper = mount(); - - const firstSlice = wrapper.find(Slice).first(); - const coordinates = SvgTestHelper.getSliceArcStart(firstSlice); - const renderedAngle = - SvgTestHelper.getSvgCoordinatesAngleFromCartesianYAxis(coordinates); - - // There is a small degree of inprecision due to how D3 renders the paths - expect(renderedAngle).to.be.closeTo(angle, 0.0001); - }); - }); - }); - - describe("the `innerRadius` prop", () => { - it("renders the slices as annular sections", () => { - const wrapper = shallow(); - - const slices = wrapper.find(Slice); - slices.forEach(SvgTestHelper.expectIsAnnularSection); - }); - - it("determines the distance in pixels between the origin & the inner edge of the sections", () => { - const wrapper = shallow(); - - const slices = wrapper.find(Slice); - slices.forEach((slice) => { - expect( - SvgTestHelper.getInnerRadiusOfCircularOrAnnularSlice(slice) - ).to.eql(70); - }); - }); - }); - - describe("`startAngle` in conjunction with `endAngle`", () => { - it("renders a portion of a chart from `startAngle` to `endAngle`", () => { - const wrapper = mount(); - - const slices = wrapper.find(Slice); - const firstSlice = slices.first(); - const lastSlice = slices.last(); - const arcStart = SvgTestHelper.getSliceArcStart(firstSlice); - const arcEnd = SvgTestHelper.getSliceArcEnd(lastSlice); - - expect( - SvgTestHelper.getSvgCoordinatesAngleFromCartesianYAxis(arcStart) - ).to.eql(270); - expect( - SvgTestHelper.getSvgCoordinatesAngleFromCartesianYAxis(arcEnd) - ).to.eql(90); - }); - }); - - describe("the `width` prop", () => { - it("determines the width of the containing viewBox", () => { - const width = 200; - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("viewBox")).to.eql(`0 0 ${width} 400`); - }); - }); - - describe("the `height` prop", () => { - it("determines the height of the containing viewBox", () => { - const height = 200; - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("viewBox")).to.eql(`0 0 400 ${height}`); - }); - }); - - describe("the `colorScale` prop", () => { - describe("if provided an array of CSS colors", () => { - it("renders each slice with the next color in the array, reiterating through colors as necessary", () => { - const data = range(5); - const colorScale = ["#fffff", "#eeeee", "#ddddd"]; - const wrapper = shallow( - - ); - - const slices = wrapper.find(Slice); - expect(slices.length).to.equal(5); - slices.forEach((slice, i) => { - const style = slice.prop("style"); - expect(style.fill).to.equal(colorScale[i % colorScale.length]); - }); - }); - }); - - describe("if provided a string", () => { - describe("and the string is a valid victory color scale", () => { - it("renders the chart using the given color scale", () => { - const VALID_VICTORY_COLOR_SCALE_NAMES = [ - "grayscale", - "qualitative", - "heatmap", - "warm", - "cool", - "red", - "green", - "blue" - ]; - - VALID_VICTORY_COLOR_SCALE_NAMES.map((colorScaleName) => { - const colorScale = Style.getColorScale(colorScaleName); - const data = range(colorScale.length + 1); - const wrapper = shallow( - - ); - - wrapper.find(Slice).map((slice, i) => { - const expectedColor = colorScale[i % colorScale.length]; - const style = slice.prop("style"); - expect(style.fill).to.equal(expectedColor); - }); - }); - }); - }); - - describe("and the string isn't a valid victory color scale", () => { - it("renders the chart using the victory grayscale", () => { - it("renders slices using the victory grayscale", () => { - const invalidColorScale = "foobar"; - const grayscale = Style.getColorScale("grayscale"); - const data = range(grayscale.length); - - const wrapper = shallow( - - ); - - const slices = wrapper.find(Slice); - slices.map((slice, i) => { - const style = slice.prop("style"); - expect(style.fill).to.equal(grayscale[i]); - }); - }); - }); - }); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "slices", - "width", - "height", - "style" - ); - }); - - it("attaches an event to data", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Slices = wrapper.find(Slice); - Slices.forEach((node, index) => { - const initialProps = Slices.at(index).props(); - node.simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - - it("attaches an event to label", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const SliceLabels = wrapper.find(VictoryLabel); - SliceLabels.forEach((node, index) => { - const initialProps = SliceLabels.at(index).props(); - node.simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(clickHandler.args[index][1].datum).to.eql(initialProps.datum); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - }); - - describe("accessbility", () => { - it("adds aria-label and tabIndex to Slice primitive", () => { - const data = [ - { x: "bird", y: 3 }, - { x: "lizard", y: 5 }, - { x: "insect", y: 3 } - ]; - const wrapper = mount( - `${datum.x}`} - tabIndex={({ index }) => index + 5} - /> - } - /> - ); - expect(wrapper.find("path")).to.have.length(3); - wrapper.find("path").forEach((p, i) => { - expect(p.prop("aria-label")).to.equal(data[i].x); - expect(p.prop("tabIndex")).to.equal(i + 5); - }); - }); - }); -}); diff --git a/test/client/spec/victory-scatter/helper-methods.spec.js b/test/client/spec/victory-scatter/helper-methods.spec.js deleted file mode 100644 index 7c839fac6..000000000 --- a/test/client/spec/victory-scatter/helper-methods.spec.js +++ /dev/null @@ -1,82 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* global sinon */ -import { - getSize, - getBubbleSize, - getSymbol -} from "victory-scatter/es/helper-methods"; - -describe("victory-scatter/helper-methods", () => { - describe("getSize", () => { - let sandbox; - beforeEach(() => { - sandbox = sinon.createSandbox(); - sandbox.spy(getBubbleSize); - }); - - afterEach(() => { - sandbox.restore(); - }); - - const data = [ - { x: 1, y: 2, z: 1, t: 4 }, - { x: 2, y: 3, z: 1, t: 2 } - ]; - const datum = data[0]; - it("returns a size attribute from data", () => { - const point = { size: 3, ...datum }; - const sizeResult = getSize(point, {}); - expect(getBubbleSize).notCalled; - expect(sizeResult).to.equal(3); - }); - - it("returns 1 if the size attribute is less than one", () => { - const point = { size: -2, ...datum }; - const sizeResult = getSize(point, {}); - expect(getBubbleSize).notCalled; - expect(sizeResult).to.equal(1); - }); - - it("returns size from props, if no size is set on data", () => { - const sizeResult = getSize(datum, { data, size: 2 }); - expect(getBubbleSize).notCalled; - expect(sizeResult).to.equal(2); - }); - - it("calculates a bubbleSize if a bubbleProperty is specified, and size is not set", () => { - const sizeResult = getSize(datum, { data, z: "t" }); - expect(sizeResult).to.equal(5); - }); - }); - - describe("getBubbleSize", () => { - it("determines the size of a point", () => { - const data = [ - { x: 1, y: 2, z: 5 }, - { x: 2, y: 3, z: 1 } - ]; - const props = { data, z: "z" }; - const sizeResult = getBubbleSize(data[0], props); - expect(sizeResult).to.equal(5); - }); - }); - - describe("getSymbol", () => { - const data = { symbol: "star" }; - const props = { symbol: "plus" }; - it("returns 'circle' for bubble plots", () => { - const symbolResult = getSymbol({}, { ...props, bubbleProperty: "z" }); - expect(symbolResult).to.equal("circle"); - }); - - it("returns a symbol from data if one is given", () => { - const symbolResult = getSymbol(data, props); - expect(symbolResult).to.equal("star"); - }); - - it("returns a symbol from props if no symbol is found on data", () => { - const symbolResult = getSymbol({}, props); - expect(symbolResult).to.equal("plus"); - }); - }); -}); diff --git a/test/client/spec/victory-scatter/victory-scatter.spec.js b/test/client/spec/victory-scatter/victory-scatter.spec.js deleted file mode 100644 index 8df65e89e..000000000 --- a/test/client/spec/victory-scatter/victory-scatter.spec.js +++ /dev/null @@ -1,280 +0,0 @@ -/** - * Client tests - */ -/*eslint-disable max-nested-callbacks */ -/* global sinon */ -/* eslint no-unused-expressions: 0 */ -import React from "react"; -import { shallow, mount } from "enzyme"; -import { omit, range } from "lodash"; -import SvgTestHelper from "../svg-test-helper"; -import { VictoryScatter } from "victory-scatter"; -import { VictoryLabel, Point } from "victory-core"; - -class MyPoint extends React.Component { - render() {} -} - -describe("components/victory-scatter", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-scatter"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("renders 51 points", () => { - const wrapper = shallow(); - const points = wrapper.find(Point); - expect(points.length).to.equal(51); - }); - - it("renders each point as a circle", () => { - const wrapper = mount(); - const points = wrapper.find(Point); - points.forEach(SvgTestHelper.expectIsCircular); - }); - }); - - describe("rendering data", () => { - it("renders injected points for {x, y} shaped data (default)", () => { - const data = range(10).map((i) => ({ x: i, y: i })); - const wrapper = shallow( - } /> - ); - - const points = wrapper.find(MyPoint); - expect(points.length).to.equal(10); - }); - - it("renders points for {x, y} shaped data (default)", () => { - const data = range(10).map((i) => ({ x: i, y: i })); - const wrapper = shallow(); - const points = wrapper.find(Point); - expect(points.length).to.equal(10); - }); - - it("sorts data by sortKey prop", () => { - const data = range(5) - .map((i) => ({ x: i, y: i })) - .reverse(); - const wrapper = shallow(); - const xValues = wrapper - .find(Point) - .map((point) => point.prop("datum")._x); - expect(xValues).to.eql([0, 1, 2, 3, 4]); - }); - - it("reverses sorted data with the sortOrder prop", () => { - const data = range(5) - .map((i) => ({ x: i, y: i })) - .reverse(); - const wrapper = shallow( - - ); - const xValues = wrapper - .find(Point) - .map((point) => point.prop("datum")._x); - expect(xValues).to.eql([4, 3, 2, 1, 0]); - }); - - it("renders points for array-shaped data", () => { - const data = range(20).map((i) => [i, i]); - const wrapper = shallow(); - const points = wrapper.find(Point); - expect(points.length).to.equal(20); - }); - - it("renders points for deeply-nested data", () => { - const data = range(40).map((i) => ({ a: { b: [{ x: i, y: i }] } })); - const wrapper = shallow( - - ); - const points = wrapper.find(Point); - expect(points.length).to.equal(40); - }); - - it("renders data values with null accessor", () => { - const data = range(30); - const wrapper = shallow(); - const points = wrapper.find(Point); - expect(points.length).to.equal(30); - }); - - it("renders points in the correct positions", () => { - const svgDimensions = { width: 350, height: 200, padding: 75 }; - const wrapper = mount( - - ); - const domain = { x: [0, 5], y: [0, 5] }; - - const points = wrapper.find(Point); - const svgCoordinates = points.map(SvgTestHelper.getSvgPointCoordinates); - const coordinates = svgCoordinates.map((coord) => { - return SvgTestHelper.convertSvgCoordinatesToCartesian( - coord, - svgDimensions, - domain - ); - }); - - expect(coordinates).to.eql([ - [0, 0], - [2, 3], - [5, 5] - ]); - }); - - it("does not render data with null x or y values", () => { - const data = [ - { x: 1, y: 2 }, - { x: null, y: 4 }, - { x: 5, y: null } - ]; - const wrapper = mount(); - expect(wrapper.find(Point).length).to.equal(1); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "data", - "scale", - "width", - "height", - "style" - ); - }); - - it("attaches an event to data", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Data = wrapper.find(Point); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - node.simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - - it("attaches an event to a label", () => { - const clickHandler = sinon.spy(); - const data = [ - { eventKey: 0, _x: 0, _y: 0, x: 0, y: 0, label: "0" }, - { eventKey: 1, _x: 1, _y: 1, x: 1, y: 1, label: "1" }, - { eventKey: 2, _x: 2, _y: 2, x: 2, y: 2, label: "2" } - ]; - const wrapper = mount( - - ); - const Labels = wrapper.find(VictoryLabel); - Labels.forEach((node, index) => { - node.childAt(0).simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[index][1].datum).to.eql(data[index]); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - }); - - describe("accessibility", () => { - it("adds an aria role to each point in the series", () => { - const data = range(20).map((y, x) => ({ x, y })); - const wrapper = mount(); - - wrapper.find("path").forEach((p) => { - const roleValue = p.prop("role"); - expect(roleValue).to.be.a("string"); - expect(roleValue).to.equal("presentation"); - }); - }); - - it("adds an aria-label and tabIndex to Point primitive", () => { - const data = range(2, 7).map((x) => ({ x, y: x + 2 })); - const wrapper = mount( - - `scatter point x: ${datum.x}, y:${datum.y}` - } - tabIndex={({ index }) => index + 10} - /> - } - /> - ); - expect(wrapper.find("path")).to.have.length(5); - wrapper.find("path").forEach((p, i) => { - expect(p.prop("aria-label")).to.equal( - `scatter point x: ${data[i].x}, y:${data[i].y}` - ); - expect(p.prop("tabIndex")).to.equal(i + 10); - }); - }); - }); -}); diff --git a/test/client/spec/victory-selection-container/selection-helpers.spec.js b/test/client/spec/victory-selection-container/selection-helpers.spec.js deleted file mode 100644 index 838566f8e..000000000 --- a/test/client/spec/victory-selection-container/selection-helpers.spec.js +++ /dev/null @@ -1,80 +0,0 @@ -/* eslint no-unused-expressions: 0 */ -/* eslint max-nested-callbacks: 0 */ - -import { SelectionHelpers } from "victory-selection-container"; -import { VictoryBar } from "victory-bar"; -import React from "react"; -import * as d3Scale from "victory-vendor/d3-scale"; -import { assign } from "lodash"; - -const scale = { x: d3Scale.scaleLinear(), y: d3Scale.scaleLinear() }; - -describe("helpers/selection", () => { - describe("getDatasets", () => { - it("returns data from props", () => { - const data = [ - { x: 1, y: 3 }, - { x: 2, y: 5 } - ]; - const props = { data }; - const dataset = SelectionHelpers.getDatasets(props); - expect(dataset).to.eql([{ data }]); - }); - - it("returns data from children", () => { - const data = [ - { eventKey: 0, x: 1, y: 3 }, - { eventKey: 1, x: 2, y: 5 } - ]; - const expectedReturn = [ - { eventKey: 0, x: 1, _x: 1, y: 3, _y: 3 }, - { eventKey: 1, x: 2, _x: 2, y: 5, _y: 5 } - ]; - const name = "points"; - const children = [React.createElement(VictoryBar, { name, data })]; - const props = { children }; - const dataset = SelectionHelpers.getDatasets(props); - expect(dataset).to.eql([{ childName: name, data: expectedReturn }]); - }); - }); - - describe("filterDatasets", () => { - it("returns null when no datasets are within bounds", () => { - const datasets = [ - { - childName: "a", - data: [ - { eventKey: 0, _x: 1, _y: 3 }, - { eventKey: 1, _x: 2, _y: 5 } - ] - } - ]; - const props = { scale, x1: 0, y1: 0, x2: 0.5, y2: 0.5 }; - const bounds = { x: [0, 1], y: [10, 15] }; - const filteredData = SelectionHelpers.filterDatasets( - props, - datasets, - bounds - ); - expect(filteredData).to.equal(null); - }); - - it("returns data points within bounds", () => { - const data = [ - { eventKey: 0, _x: 0, _y: 0 }, - { eventKey: 1, _x: 2, _y: 5 } - ]; - const childName = "a"; - const datasets = [{ childName, data }]; - const bounds = { x: [0, 1], y: [0, 10] }; - const props = { scale, x1: 0, y1: 0, x2: 0.5, y2: 0.5 }; - const filteredData = SelectionHelpers.filterDatasets( - props, - datasets, - bounds - ); - const expected = { eventKey: [0], data: [data[0]] }; - expect(filteredData).to.eql([assign({ childName }, expected)]); - }); - }); -}); diff --git a/test/client/spec/victory-shared-events/victory-shared-events.spec.js b/test/client/spec/victory-shared-events/victory-shared-events.spec.js deleted file mode 100644 index eebf3025d..000000000 --- a/test/client/spec/victory-shared-events/victory-shared-events.spec.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Client tests - */ -import { assign, forEach } from "lodash"; -import { mount } from "enzyme"; -import React from "react"; -import { addEvents } from "victory-core"; -import { VictorySharedEvents } from "victory-shared-events"; -import { MockVictoryComponent, MockDataComponent } from "../mock-components"; - -describe("components/victory-shared-events", () => { - const EventedMockVictoryComponent = addEvents(MockVictoryComponent); - - const findComponentByName = (name, component) => { - // workaround for nonfunctional prop selector on mounted components - // https://github.com/airbnb/enzyme/issues/534 - return component.findWhere((node) => { - return node.prop("name") === name; - }); - }; - - const expectOnDataComponents = (expectationMatrix, testFn, component) => { - forEach( - expectationMatrix, - (dataComponentExpectations, parentComponentName) => { - const dataComponentTests = findComponentByName( - parentComponentName, - component - ) - .find(MockDataComponent) - .map(testFn); - - expect(dataComponentTests).to.eql(dataComponentExpectations); - } - ); - }; - - const findDataComponent = (parentName, index, component) => { - return findComponentByName(parentName, component) - .find(MockDataComponent) - .at(index); - }; - - it("should trigger shared events exclusively on selected children", () => { - const data = [ - { x: "a", y: 2 }, - { x: "b", y: 3 }, - { x: "c", y: 5 }, - { x: "d", y: 4 } - ]; - const wrapper = mount( - - { - return [ - { - childName: ["one", "three"], - mutation: (props) => { - return { - style: assign({}, props.style, { fill: "tomato" }) - }; - } - } - ]; - } - } - } - ]} - > - - - - - - ); - - const componentReceivedChange = (component) => { - return component.prop("style").fill === "tomato"; - }; - - // Expect no events triggered at beginning. - expectOnDataComponents( - { - one: [false, false, false, false], - two: [false, false, false, false], - three: [false, false, false, false] - }, - componentReceivedChange, - wrapper - ); - - findDataComponent("one", 0, wrapper).simulate("click"); - - // First child data components trigger effects on first and third - expectOnDataComponents( - { - one: [true, false, false, false], - two: [false, false, false, false], - three: [true, false, false, false] - }, - componentReceivedChange, - wrapper - ); - - findDataComponent("two", 1, wrapper).simulate("click"); - - // Second child data components trigger effects on first and third - expectOnDataComponents( - { - one: [true, true, false, false], - two: [false, false, false, false], - three: [true, true, false, false] - }, - componentReceivedChange, - wrapper - ); - - findDataComponent("three", 2, wrapper).simulate("click"); - - // Third child data components do not trigger effects - expectOnDataComponents( - { - one: [true, true, false, false], - two: [false, false, false, false], - three: [true, true, false, false] - }, - componentReceivedChange, - wrapper - ); - }); -}); diff --git a/test/client/spec/victory-stack/victory-stack.spec.js b/test/client/spec/victory-stack/victory-stack.spec.js deleted file mode 100644 index a305795d5..000000000 --- a/test/client/spec/victory-stack/victory-stack.spec.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Client tests - */ -/* global sinon:false, console */ -/* eslint-disable max-nested-callbacks */ -/* eslint-disable no-console */ - -import React from "react"; -import { mount } from "enzyme"; -import { VictoryStack } from "victory-stack"; -import { VictoryBar } from "victory-bar"; -import { VictoryHistogram } from "victory-histogram"; - -describe("components/victory-stack", () => { - describe("default component rendering", () => { - it("renders an svg with the correct width and height", () => { - const wrapper = mount( - - - - - ); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewBox", () => { - const wrapper = mount( - - - - - ); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - - it("accepts user props", () => { - const wrapper = mount( - - - - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-stack"); - expect(svgNode.getAttribute("aria-label")).to.equal("Stack"); - }); - }); - - describe("warnings", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - sandbox.stub(console, "warn"); - }); - - afterEach(() => { - console.warn.restore(); - sandbox.reset(); - }); - - it("should warn when histogram children are mixed with non-histogram children", () => { - mount( - - - - - ); - - expect(console.warn.callCount).to.equal(1); - }); - - it("should not warn when only histogram children are passed", () => { - mount( - - - - - ); - - expect(console.warn.callCount).to.equal(0); - }); - }); -}); diff --git a/test/client/spec/victory-tooltip/flyout.spec.js b/test/client/spec/victory-tooltip/flyout.spec.js deleted file mode 100644 index 3e59fdba5..000000000 --- a/test/client/spec/victory-tooltip/flyout.spec.js +++ /dev/null @@ -1,25 +0,0 @@ -/*eslint-disable max-nested-callbacks,no-unused-expressions,max-len */ -import React from "react"; -import { mount } from "enzyme"; -import { Flyout } from "victory-tooltip"; -import SvgTestHelper from "../svg-test-helper"; - -describe("victory-primitives/flyout", () => { - const baseProps = { - x: 100, - y: 100, - dx: 0, - dy: 0, - width: 50, - height: 50, - cornerRadius: 5, - pointerLength: 10, - pointerWidth: 10 - }; - describe("rendering", () => { - it("renders a flyout path", () => { - const wrapper = mount(); - SvgTestHelper.expectIsFlyout(wrapper); - }); - }); -}); diff --git a/test/client/spec/victory-tooltip/victory-tooltip.spec.js b/test/client/spec/victory-tooltip/victory-tooltip.spec.js deleted file mode 100644 index ccb2ca643..000000000 --- a/test/client/spec/victory-tooltip/victory-tooltip.spec.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -import React from "react"; -import { mount } from "enzyme"; -import { VictoryTooltip, Flyout } from "victory-tooltip"; -import { VictoryLabel } from "victory-core"; - -describe("components/victory-tooltip", () => { - const baseProps = { - x: 0, - y: 0, - datum: { some: "object" }, - index: 3, - active: true, - text: "such text, wow" - }; - - it("renders nothing when not active", () => { - const wrapper = mount(); - const output = wrapper.find("text"); - expect(output.length).to.equal(0); - }); - - it("has expected text", () => { - const wrapper = mount(); - const output = wrapper.find("text"); - expect(output.html()).to.contain(baseProps.text); - }); - - it("renders a flyout and a label", () => { - const wrapper = mount(); - const label = wrapper.find(VictoryLabel); - const flyout = wrapper.find(Flyout); - expect(label.length).to.equal(1); - expect(flyout.length).to.equal(1); - }); - - it("passes datum and index to flyout component", () => { - const wrapper = mount(); - const flyout = wrapper.find(Flyout); - expect(flyout.prop("datum")).to.eql({ some: "object" }); - expect(flyout.prop("index")).to.eql(3); - }); - - describe("event handling", () => { - it("attaches an to the flyout object", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - wrapper.find("path").simulate("click"); - expect(clickHandler.called).to.equal(true); - }); - }); -}); diff --git a/test/client/spec/victory-voronoi/victory-voronoi.spec.js b/test/client/spec/victory-voronoi/victory-voronoi.spec.js deleted file mode 100644 index 486e1ef6b..000000000 --- a/test/client/spec/victory-voronoi/victory-voronoi.spec.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Client tests - */ -/* global sinon */ -/*eslint-disable max-nested-callbacks */ -/* eslint no-unused-expressions: 0 */ -import React from "react"; -import { range, omit, random } from "lodash"; -import { shallow, mount } from "enzyme"; -import SvgTestHelper from "../svg-test-helper"; -import { VictoryVoronoi, Voronoi } from "victory-voronoi"; -import { VictoryLabel } from "victory-core"; - -describe("components/victory-voronoi", () => { - describe("default component rendering", () => { - it("accepts user props", () => { - const wrapper = mount( - - ); - - const svgNode = wrapper.find("svg").at(0).getDOMNode(); - expect(svgNode.getAttribute("data-testid")).to.equal("victory-voronoi"); - expect(svgNode.getAttribute("aria-label")).to.equal("Chart"); - }); - - it("renders an svg with the correct width and height", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - expect(svg.prop("style").width).to.equal("100%"); - expect(svg.prop("style").height).to.equal("100%"); - }); - - it("renders an svg with the correct viewbox", () => { - const wrapper = mount(); - const svg = wrapper.find("svg").at(0); - const viewBoxValue = `0 0 ${450} ${300}`; - expect(svg.prop("viewBox")).to.equal(viewBoxValue); - }); - }); - - describe("component rendering with data", () => { - it("renders the correct d3 path", () => { - const props = { - width: 400, - height: 300, - padding: 50, - domain: { x: [0, 5], y: [0, 5] }, - data: [ - { x: 0, y: 0 }, - { x: 2, y: 3 }, - { x: 4, y: 1 } - ] - }; - const wrapper = mount(); - - const voronoi = wrapper.find(Voronoi); - voronoi.forEach((node, index) => { - SvgTestHelper.expectCorrectD3Path(node, props, "voronoi", index); - }); - }); - - it("sorts data by sortKey prop", () => { - const data = range(5) - .map((i) => ({ x: i, y: i })) - .reverse(); - const wrapper = shallow(); - - const xValues = wrapper - .find(Voronoi) - .map((voronoi) => voronoi.prop("datum")._x); - expect(xValues).to.eql([0, 1, 2, 3, 4]); - }); - - it("reverses sorted data with the sortOrder prop", () => { - const data = range(5) - .map((i) => ({ x: i, y: i })) - .reverse(); - const wrapper = shallow( - - ); - - const xValues = wrapper - .find(Voronoi) - .map((voronoi) => voronoi.prop("datum")._x); - expect(xValues).to.eql([4, 3, 2, 1, 0]); - }); - - it("does not render data with null x or y values", () => { - const data = [ - { x: 1, y: 2 }, - { x: null, y: 4 }, - { x: 5, y: null } - ]; - const wrapper = mount(); - expect(wrapper.find(Voronoi).length).to.equal(1); - }); - }); - - describe("event handling", () => { - it("attaches an event to the parent svg", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const svg = wrapper.find("svg").at(0); - svg.simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[0][1]).to.include.keys( - "data", - "scale", - "width", - "height", - "style" - ); - }); - - it("attaches an event to data", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Data = wrapper.find(Voronoi); - Data.forEach((node, index) => { - const initialProps = Data.at(index).props(); - node.simulate("click"); - expect(clickHandler.called).to.equal(true); - // the first argument is the standard evt object - expect(omit(clickHandler.args[index][1], ["events", "key"])).to.eql( - omit(initialProps, ["events", "key"]) - ); - expect(`${clickHandler.args[index][2]}`).to.eql(`${index}`); - }); - }); - - it("attaches an event to a label", () => { - const clickHandler = sinon.spy(); - const wrapper = mount( - - ); - const Labels = wrapper.find(VictoryLabel); - Labels.forEach((node, index) => { - node.childAt(0).simulate("click"); - expect(clickHandler).called; - // the first argument is the standard evt object - expect(clickHandler.args[index][1]).to.contain({ text: "okay" }); - }); - }); - }); - - describe("accessibility", () => { - it("adds an aria role to the path area", () => { - const wrapper = mount(); - wrapper.find("path").forEach((p) => { - const roleValue = p.prop("role"); - if (roleValue) { - expect(roleValue).to.be.a("string"); - expect(roleValue).to.equal("presentation"); - } - }); - }); - - it("adds an aria-label and tabIndex to Voronoi primitive", () => { - const data = range(3, 6).map((x) => ({ x, y: random(5) })); - const wrapper = mount( - `${datum.x}`} - tabIndex={({ index }) => index + 6} - /> - } - /> - ); - expect(wrapper.find("path")).to.have.length(3); - wrapper.find("path").forEach((p, i) => { - expect(p.prop("aria-label")).to.equal(`${data[i].x}`); - expect(p.prop("tabIndex")).to.equal(i + 6); - }); - }); - }); -}); diff --git a/test/client/spec/victory/victory.spec.js b/test/client/spec/victory/victory.spec.js deleted file mode 100644 index 8e0b11fa5..000000000 --- a/test/client/spec/victory/victory.spec.js +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Client tests - */ -import * as Victory from "victory"; - -describe("victory", () => { - // eslint-disable-line max-statements - describe("exports victory components", () => { - // eslint-disable-line max-statements - it("exports VictoryAnimation", () => { - expect(Victory.VictoryAnimation).not.to.equal(undefined); - }); - it("exports VictoryArea", () => { - expect(Victory.VictoryArea).not.to.equal(undefined); - }); - it("exports VictoryAxis", () => { - expect(Victory.VictoryAxis).not.to.equal(undefined); - }); - it("exports VictoryBar", () => { - expect(Victory.VictoryBar).not.to.equal(undefined); - }); - it("exports VictoryBoxPlot", () => { - expect(Victory.VictoryBoxPlot).not.to.equal(undefined); - }); - it("exports VictoryBrushContainer", () => { - expect(Victory.VictoryBrushContainer).not.to.equal(undefined); - }); - it("exports VictoryBrushLine", () => { - expect(Victory.VictoryBrushLine).not.to.equal(undefined); - }); - it("exports VictoryCandlestick", () => { - expect(Victory.VictoryCandlestick).not.to.equal(undefined); - }); - it("exports VictoryChart", () => { - expect(Victory.VictoryChart).not.to.equal(undefined); - }); - it("exports VictoryClipContainer", () => { - expect(Victory.VictoryClipContainer).not.to.equal(undefined); - }); - it("exports VictoryContainer", () => { - expect(Victory.VictoryContainer).not.to.equal(undefined); - }); - it("exports VictoryCursorContainer", () => { - expect(Victory.VictoryCursorContainer).not.to.equal(undefined); - }); - it("exports VictoryErrorBar", () => { - expect(Victory.VictoryErrorBar).not.to.equal(undefined); - }); - it("exports VictoryGroup", () => { - expect(Victory.VictoryGroup).not.to.equal(undefined); - }); - it("exports VictoryLabel", () => { - expect(Victory.VictoryLabel).not.to.equal(undefined); - }); - it("exports VictoryLegend", () => { - expect(Victory.VictoryLegend).not.to.equal(undefined); - }); - it("exports VictoryLine", () => { - expect(Victory.VictoryLine).not.to.equal(undefined); - }); - it("exports VictoryPie", () => { - expect(Victory.VictoryPie).not.to.equal(undefined); - }); - it("exports VictoryPolarAxis", () => { - expect(Victory.VictoryPolarAxis).not.to.equal(undefined); - }); - it("exports VictoryPortal", () => { - expect(Victory.VictoryPortal).not.to.equal(undefined); - }); - it("exports VictoryScatter", () => { - expect(Victory.VictoryScatter).not.to.equal(undefined); - }); - it("exports VictorySelectionContainer", () => { - expect(Victory.VictorySelectionContainer).not.to.equal(undefined); - }); - it("exports VictorySharedEvents", () => { - expect(Victory.VictorySharedEvents).not.to.equal(undefined); - }); - it("exports VictoryStack", () => { - expect(Victory.VictoryStack).not.to.equal(undefined); - }); - it("exports VictoryTheme", () => { - expect(Victory.VictoryTheme).not.to.equal(undefined); - }); - it("exports VictoryTransition", () => { - expect(Victory.VictoryTransition).not.to.equal(undefined); - }); - it("exports VictoryTooltip", () => { - expect(Victory.VictoryTooltip).not.to.equal(undefined); - }); - it("exports VictoryVoronoi", () => { - expect(Victory.VictoryVoronoi).not.to.equal(undefined); - }); - it("exports VictoryVoronoiContainer", () => { - expect(Victory.VictoryVoronoiContainer).not.to.equal(undefined); - }); - it("exports VictoryZoomContainer", () => { - expect(Victory.VictoryZoomContainer).not.to.equal(undefined); - }); - }); - describe("exports primitive components", () => { - // eslint-disable-line max-statements - it("exports Area", () => { - expect(Victory.Area).not.to.equal(undefined); - }); - it("exports Bar", () => { - expect(Victory.Bar).not.to.equal(undefined); - }); - it("exports Border", () => { - expect(Victory.Border).not.to.equal(undefined); - }); - it("exports Candle", () => { - expect(Victory.Candle).not.to.equal(undefined); - }); - it("exports Circle", () => { - expect(Victory.Circle).not.to.equal(undefined); - }); - it("exports ClipPath", () => { - expect(Victory.ClipPath).not.to.equal(undefined); - }); - it("exports Curve", () => { - expect(Victory.Curve).not.to.equal(undefined); - }); - it("exports ErrorBar", () => { - expect(Victory.ErrorBar).not.to.equal(undefined); - }); - it("exports Flyout", () => { - expect(Victory.Flyout).not.to.equal(undefined); - }); - it("exports LineSegment", () => { - expect(Victory.LineSegment).not.to.equal(undefined); - }); - it("exports Line", () => { - expect(Victory.Line).not.to.equal(undefined); - }); - it("exports Path", () => { - expect(Victory.Path).not.to.equal(undefined); - }); - it("exports Point", () => { - expect(Victory.Point).not.to.equal(undefined); - }); - it("exports Rect", () => { - expect(Victory.Rect).not.to.equal(undefined); - }); - it("exports Slice", () => { - expect(Victory.Slice).not.to.equal(undefined); - }); - it("exports Text", () => { - expect(Victory.Text).not.to.equal(undefined); - }); - it("exports TSpan", () => { - expect(Victory.TSpan).not.to.equal(undefined); - }); - it("exports Voronoi", () => { - expect(Victory.Voronoi).not.to.equal(undefined); - }); - it("exports Whisker", () => { - expect(Victory.Whisker).not.to.equal(undefined); - }); - }); - describe("exports helper components", () => { - // eslint-disable-line max-statements - it("exports addEvents", () => { - expect(Victory.addEvents).not.to.equal(undefined); - }); - it("exports Axis", () => { - expect(Victory.Axis).not.to.equal(undefined); - }); - it("exports brushContainerMixin", () => { - expect(Victory.brushContainerMixin).not.to.equal(undefined); - }); - it("exports BrushHelpers", () => { - expect(Victory.BrushHelpers).not.to.equal(undefined); - }); - it("exports Collection", () => { - expect(Victory.Collection).not.to.equal(undefined); - }); - it("exports combineContainerMixins", () => { - expect(Victory.combineContainerMixins).not.to.equal(undefined); - }); - it("exports createContainer", () => { - expect(Victory.createContainer).not.to.equal(undefined); - }); - it("exports cursorContainerMixin", () => { - expect(Victory.cursorContainerMixin).not.to.equal(undefined); - }); - it("exports CursorHelpers", () => { - expect(Victory.CursorHelpers).not.to.equal(undefined); - }); - it("exports Data", () => { - expect(Victory.Data).not.to.equal(undefined); - }); - it("exports DefaultTransitions", () => { - expect(Victory.DefaultTransitions).not.to.equal(undefined); - }); - it("exports Domain", () => { - expect(Victory.Domain).not.to.equal(undefined); - }); - it("exports Events", () => { - expect(Victory.Events).not.to.equal(undefined); - }); - it("exports Helpers", () => { - expect(Victory.Helpers).not.to.equal(undefined); - }); - it("exports LabelHelpers", () => { - expect(Victory.LabelHelpers).not.to.equal(undefined); - }); - it("exports Log", () => { - expect(Victory.Log).not.to.equal(undefined); - }); - it("exports makeCreateContainerFunction", () => { - expect(Victory.makeCreateContainerFunction).not.to.equal(undefined); - }); - it("exports Portal", () => { - expect(Victory.Portal).not.to.equal(undefined); - }); - it("exports PropTypes", () => { - expect(Victory.PropTypes).not.to.equal(undefined); - }); - it("exports RawZoomHelpers", () => { - expect(Victory.RawZoomHelpers).not.to.equal(undefined); - }); - it("exports Scale", () => { - expect(Victory.Scale).not.to.equal(undefined); - }); - it("exports Selection", () => { - expect(Victory.Selection).not.to.equal(undefined); - }); - it("exports selectionContainerMixin", () => { - expect(Victory.selectionContainerMixin).not.to.equal(undefined); - }); - it("exports SelectionHelpers", () => { - expect(Victory.SelectionHelpers).not.to.equal(undefined); - }); - it("exports Style", () => { - expect(Victory.Style).not.to.equal(undefined); - }); - it("exports TextSize", () => { - expect(Victory.TextSize).not.to.equal(undefined); - }); - it("exports Transitions", () => { - expect(Victory.Transitions).not.to.equal(undefined); - }); - it("exports voronoiContainerMixin", () => { - expect(Victory.voronoiContainerMixin).not.to.equal(undefined); - }); - it("exports VoronoiHelpers", () => { - expect(Victory.VoronoiHelpers).not.to.equal(undefined); - }); - it("exports Wrapper", () => { - expect(Victory.Wrapper).not.to.equal(undefined); - }); - it("exports zoomContainerMixin", () => { - expect(Victory.zoomContainerMixin).not.to.equal(undefined); - }); - it("exports ZoomHelpers", () => { - expect(Victory.ZoomHelpers).not.to.equal(undefined); - }); - }); -}); diff --git a/test/client/test.html b/test/client/test.html deleted file mode 100644 index b85a246a7..000000000 --- a/test/client/test.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Frontend Tests - - - -
- - - - - - - - - From cc7f48eed34acee7e595d5fcac7c3aadf2097bdb Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 12:57:16 -0700 Subject: [PATCH 03/13] Remove karma --- config/karma/karma.conf.coverage.js | 28 - config/karma/karma.conf.dev.js | 46 - config/karma/karma.conf.js | 56 - package-scripts.js | 6 - package.json | 12 - yarn.lock | 1729 +-------------------------- 6 files changed, 64 insertions(+), 1813 deletions(-) delete mode 100644 config/karma/karma.conf.coverage.js delete mode 100644 config/karma/karma.conf.dev.js delete mode 100644 config/karma/karma.conf.js diff --git a/config/karma/karma.conf.coverage.js b/config/karma/karma.conf.coverage.js deleted file mode 100644 index 26402fca1..000000000 --- a/config/karma/karma.conf.coverage.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -/* - * Karma Configuration: "coverage" version. - * - * This configuration is the same as basic one-shot version, just with coverage. - */ -const path = require("path"); -const webpackCovCfg = require("../webpack/webpack.config.coverage"); - -// Replace with `__dirname` if using in project root. -const ROOT = process.cwd(); - -module.exports = function (config) { - /* eslint-disable global-require */ - require("./karma.conf")(config); - config.set({ - reporters: ["spec", "coverage-istanbul"], - webpack: webpackCovCfg, - coverageIstanbulReporter: { - reports: ["json", "lcov", "text-summary"], - "report-config": { - json: { file: "coverage.json" } - }, - dir: path.join(ROOT, "coverage/client") - } - }); -}; diff --git a/config/karma/karma.conf.dev.js b/config/karma/karma.conf.dev.js deleted file mode 100644 index 539fb8e15..000000000 --- a/config/karma/karma.conf.dev.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -const path = require("path"); - -const MAIN_PATH = path.resolve("test/client/main.js"); -const PREPROCESSORS = {}; -PREPROCESSORS[MAIN_PATH] = ["webpack"]; - -/* - * Karma Configuration: "dev" version. - * - * This configuration relies on a `webpack-dev-server` already running and - * bundling `webpack.config.test.js` on port 3001. If this is not running, - * then the alternate `karma.conf.js` file will _also_ run the webpack dev - * server during the test run. - */ -module.exports = function (config) { - config.set({ - frameworks: ["mocha"], - reporters: ["spec"], - browsers: ["ChromeHeadlessCustom"], - customLaunchers: { - ChromeHeadlessCustom: { - base: "ChromeHeadless", - // --no-sandbox for https://github.com/travis-ci/docs-travis-ci-com/pull/1671/files - flags: ["--no-sandbox"] - } - }, - basePath: ".", // repository root. - preprocessors: PREPROCESSORS, - files: [ - // Sinon has issues with webpack. Do global include. - require.resolve("sinon/pkg/sinon"), - - // Test bundle (must be created via `npm run dev|hot|server-test`) - "http://127.0.0.1:3001/assets/main.js" - ], - port: 9999, - singleRun: true, - client: { - mocha: { - ui: "bdd" - }, - captureConsole: process.env.KARMA_CAPTURE_CONSOLE === "true" - } - }); -}; diff --git a/config/karma/karma.conf.js b/config/karma/karma.conf.js deleted file mode 100644 index 6236846cd..000000000 --- a/config/karma/karma.conf.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -/* - * Karma Configuration: "full" version. - * - * This configuration runs a temporary `webpack-dev-server` and builds - * the test files one-off for just a single run. This is appropriate for a - * CI environment or if you're not otherwise running `npm run dev|hot`. - */ -const path = require("path"); -const webpack = require("webpack"); -const webpackCfg = require("../webpack/webpack.config.test"); - -const MAIN_PATH = path.resolve("test/client/main.js"); -const PREPROCESSORS = {}; -PREPROCESSORS[MAIN_PATH] = ["webpack"]; - -module.exports = function (config) { - /* eslint-disable global-require */ - - // Start with the "dev" (webpack-dev-server is already running) config - // and add in the webpack stuff. - require("./karma.conf.dev")(config); - - // Overrides. - config.set({ - preprocessors: PREPROCESSORS, - files: [ - // Sinon has issues with webpack. Do global include. - require.resolve("sinon/pkg/sinon"), - - // Test bundle (created via local webpack-dev-server in this config). - MAIN_PATH - ], - webpack: Object.assign(webpackCfg, { - plugins: [].concat(webpackCfg.plugins || [], [ - new webpack.DefinePlugin({ - "process.env.TEST_MODULE": JSON.stringify(process.env.TEST_MODULE) - }) - ]) - }), - webpackServer: { - port: 3002, // Choose a non-conflicting port (3000 app, 3001 test dev) - quiet: false, - noInfo: true, - stats: { - assets: false, - colors: true, - version: false, - hash: false, - timings: false, - chunks: false, - chunkModules: false - } - } - }); -}; diff --git a/package-scripts.js b/package-scripts.js index 3986ca3e7..3a923d42a 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -14,12 +14,6 @@ module.exports = { hot: "webpack serve --config ./config/webpack/demo/webpack.config.hot.js --inline --hot --content-base demo/js", test: "webpack serve --config ./config/webpack/webpack.config.test.js" }, - karma: { - ci: "karma start --browsers ChromeHeadlessCustom,Firefox ./config/karma/karma.conf.coverage.js", - cov: "karma start ./config/karma/karma.conf.coverage.js", - watch: "karma start --auto-watch ./config/karma/karma.conf.js", - default: "karma start ./config/karma/karma.conf.js" - }, jest: { native: "jest --config=jest-native-config.js", default: "cross-env BABEL_ENV=commonjs jest --config=jest-config.js", diff --git a/package.json b/package.json index d25f35005..ddbfe91dd 100644 --- a/package.json +++ b/package.json @@ -102,18 +102,6 @@ "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "json-loader": "^0.5.4", - "karma": "^6.3.19", - "karma-benchmark": "^1.0.4", - "karma-benchmarkjs-reporter": "^1.0.0", - "karma-chrome-launcher": "^3.1.1", - "karma-coverage-istanbul-reporter": "^3.0.3", - "karma-firefox-launcher": "^2.1.2", - "karma-ie-launcher": "^1.0.0", - "karma-mocha": "^2.0.1", - "karma-safari-launcher": "^1.0.0", - "karma-sauce-launcher": "^4.1.5", - "karma-spec-reporter": "0.0.34", - "karma-webpack": "^5.0.0", "lerna": "^3.22.0", "link-parent-bin": "^2.0.0", "lodash": "^4.17.19", diff --git a/yarn.lock b/yarn.lock index bc5fca91f..910aa809e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3021,16 +3021,6 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.23.5.tgz#93f7b9f4e3285a7a9ade7557d9a8d36809cbc47d" integrity sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg== -"@sindresorhus/is@^0.7.0": - version "0.7.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" - integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== - -"@sindresorhus/is@^4.0.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" - integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== - "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.3": version "1.8.3" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" @@ -3946,13 +3936,6 @@ regenerator-runtime "^0.13.7" resolve-from "^5.0.0" -"@szmarczak/http-timer@^4.0.5": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" - integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== - dependencies: - defer-to-connect "^2.0.0" - "@testing-library/dom@^7.2.1": version "7.31.2" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.31.2.tgz#df361db38f5212b88555068ab8119f5d841a8c4a" @@ -4063,21 +4046,6 @@ dependencies: "@types/node" "*" -"@types/cacheable-request@^6.0.1": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.2.tgz#c324da0197de0a98a2312156536ae262429ff6b9" - integrity sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA== - dependencies: - "@types/http-cache-semantics" "*" - "@types/keyv" "*" - "@types/node" "*" - "@types/responselike" "*" - -"@types/component-emitter@^1.2.10": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@types/component-emitter/-/component-emitter-1.2.11.tgz#50d47d42b347253817a39709fef03ce66a108506" - integrity sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ== - "@types/connect-history-api-fallback@^1.3.5": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz#d1f7a8a09d0ed5a57aee5ae9c18ab9b803205dae" @@ -4093,16 +4061,6 @@ dependencies: "@types/node" "*" -"@types/cookie@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" - integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== - -"@types/cors@^2.8.12": - version "2.8.12" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" - integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw== - "@types/eslint-scope@^3.7.3": version "3.7.3" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.3.tgz#125b88504b61e3c8bc6f870882003253005c3224" @@ -4175,11 +4133,6 @@ resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz#693b316ad323ea97eed6b38ed1a3cc02b1672b57" integrity sha512-h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w== -"@types/http-cache-semantics@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" - integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== - "@types/http-proxy@^1.17.8": version "1.17.9" resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.9.tgz#7f0e7931343761efde1e2bf48c40f02f3f75705a" @@ -4228,11 +4181,6 @@ "@types/parse5" "*" "@types/tough-cookie" "*" -"@types/json-buffer@~3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/json-buffer/-/json-buffer-3.0.0.tgz#85c1ff0f0948fc159810d4b5be35bf8c20875f64" - integrity sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ== - "@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" @@ -4243,13 +4191,6 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/keyv@*": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" - integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== - dependencies: - "@types/node" "*" - "@types/lodash@^4.14.149", "@types/lodash@^4.14.167": version "4.14.182" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" @@ -4285,7 +4226,7 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>= 8", "@types/node@>=10.0.0": +"@types/node@*", "@types/node@>= 8": version "17.0.35" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.35.tgz#635b7586086d51fb40de0a2ec9d1014a5283ba4a" integrity sha512-vu1SrqBjbbZ3J6vwY17jBs8Sr/BKA+/a/WtjRG+whKg1iuLFOosq872EXS0eXWILdO36DHQQeku/ZcL6hz2fpg== @@ -4335,20 +4276,6 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/puppeteer-core@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@types/puppeteer-core/-/puppeteer-core-5.4.0.tgz#880a7917b4ede95cbfe2d5e81a558cfcb072c0fb" - integrity sha512-yqRPuv4EFcSkTyin6Yy17pN6Qz2vwVwTCJIDYMXbE3j8vTPhv0nCQlZOl5xfi0WHUkqvQsjAR8hAfjeMCoetwg== - dependencies: - "@types/puppeteer" "*" - -"@types/puppeteer@*": - version "5.4.6" - resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-5.4.6.tgz#afc438e41dcbc27ca1ba0235ea464a372db2b21c" - integrity sha512-98Kghehs7+/GD9b56qryhqdqVCXUTbetTv3PlvDnmFRTHQH0j9DIp1f7rkAW3BAj4U3yoeSEQnKgdW8bDq0Y0Q== - dependencies: - "@types/node" "*" - "@types/qs@*", "@types/qs@^6.9.5": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" @@ -4428,13 +4355,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/responselike@*", "@types/responselike@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" - integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== - dependencies: - "@types/node" "*" - "@types/retry@0.12.0": version "0.12.0" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" @@ -4532,11 +4452,6 @@ anymatch "^3.0.0" source-map "^0.6.0" -"@types/which@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.2.tgz#9c246fc0c93ded311c8512df2891fb41f6227fdf" - integrity sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA== - "@types/ws@^8.5.1": version "8.5.3" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" @@ -4570,13 +4485,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yauzl@^2.9.1": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599" - integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw== - dependencies: - "@types/node" "*" - "@typescript-eslint/eslint-plugin@^5.26.0": version "5.26.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz#c1f98ccba9d345e38992975d3ca56ed6260643c2" @@ -4664,44 +4572,6 @@ "@typescript-eslint/types" "5.26.0" eslint-visitor-keys "^3.3.0" -"@wdio/config@6.12.1": - version "6.12.1" - resolved "https://registry.yarnpkg.com/@wdio/config/-/config-6.12.1.tgz#86d987b505d8ca85ec11471830d2ba296dab3bcf" - integrity sha512-V5hTIW5FNlZ1W33smHF4Rd5BKjGW2KeYhyXDQfXHjqLCeRiirZ9fABCo9plaVQDnwWSUMWYaAaIAifV82/oJCQ== - dependencies: - "@wdio/logger" "6.10.10" - deepmerge "^4.0.0" - glob "^7.1.2" - -"@wdio/logger@6.10.10": - version "6.10.10" - resolved "https://registry.yarnpkg.com/@wdio/logger/-/logger-6.10.10.tgz#1e07cf32a69606ddb94fa9fd4b0171cb839a5980" - integrity sha512-2nh0hJz9HeZE0VIEMI+oPgjr/Q37ohrR9iqsl7f7GW5ik+PnKYCT9Eab5mR1GNMG60askwbskgGC1S9ygtvrSw== - dependencies: - chalk "^4.0.0" - loglevel "^1.6.0" - loglevel-plugin-prefix "^0.8.4" - strip-ansi "^6.0.0" - -"@wdio/protocols@6.12.0": - version "6.12.0" - resolved "https://registry.yarnpkg.com/@wdio/protocols/-/protocols-6.12.0.tgz#e40850be62c42c82dd2c486655d6419cd9ec1e3e" - integrity sha512-UhTBZxClCsM3VjaiDp4DoSCnsa7D1QNmI2kqEBfIpyNkT3GcZhJb7L+nL0fTkzCwi7+/uLastb3/aOwH99gt0A== - -"@wdio/repl@6.11.0": - version "6.11.0" - resolved "https://registry.yarnpkg.com/@wdio/repl/-/repl-6.11.0.tgz#5b1eab574b6b89f7f7c383e7295c06af23c3818e" - integrity sha512-FxrFKiTkFyELNGGVEH1uijyvNY7lUpmff6x+FGskFGZB4uSRs0rxkOMaEjxnxw7QP1zgQKr2xC7GyO03gIGRGg== - dependencies: - "@wdio/utils" "6.11.0" - -"@wdio/utils@6.11.0": - version "6.11.0" - resolved "https://registry.yarnpkg.com/@wdio/utils/-/utils-6.11.0.tgz#878c2500efb1a325bf5a66d2ff3d08162f976e8c" - integrity sha512-vf0sOQzd28WbI26d6/ORrQ4XKWTzSlWLm9W/K/eJO0NASKPEzR+E+Q2kaa+MJ4FKXUpjbt+Lxfo+C26TzBk7tg== - dependencies: - "@wdio/logger" "6.10.10" - "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" @@ -5104,11 +4974,6 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" -agent-base@5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" - integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== - agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -5385,47 +5250,6 @@ aproba@^1.0.3, aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== -arch@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" - integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== - -archive-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-4.0.0.tgz#f92e72233056dfc6969472749c267bdb046b1d70" - integrity sha512-zV4Ky0v1F8dBrdYElwTvQhweQ0P7Kwc1aluqJsYtOBP01jXcWCyW2IEfI1YiqsG+Iy7ZR+o5LF1N+PGECBxHWA== - dependencies: - file-type "^4.2.0" - -archiver-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" - integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== - dependencies: - glob "^7.1.4" - graceful-fs "^4.2.0" - lazystream "^1.0.0" - lodash.defaults "^4.2.0" - lodash.difference "^4.5.0" - lodash.flatten "^4.4.0" - lodash.isplainobject "^4.0.6" - lodash.union "^4.6.0" - normalize-path "^3.0.0" - readable-stream "^2.0.0" - -archiver@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.3.1.tgz#21e92811d6f09ecfce649fbefefe8c79e57cbbb6" - integrity sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w== - dependencies: - archiver-utils "^2.1.0" - async "^3.2.3" - buffer-crc32 "^0.2.1" - readable-stream "^3.6.0" - readdir-glob "^1.0.0" - tar-stream "^2.2.0" - zip-stream "^4.1.0" - are-we-there-yet@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" @@ -5724,11 +5548,6 @@ async@^2.4.0: dependencies: lodash "^4.17.14" -async@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" - integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -6515,11 +6334,6 @@ base64-js@^1.0.2, base64-js@^1.1.2, base64-js@^1.3.1, base64-js@^1.5.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -base64id@2.0.0, base64id@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" - integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== - base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -6567,43 +6381,6 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -bin-check@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-4.1.0.tgz#fc495970bdc88bb1d5a35fc17e65c4a149fc4a49" - integrity sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA== - dependencies: - execa "^0.7.0" - executable "^4.1.0" - -bin-version-check@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-4.0.0.tgz#7d819c62496991f80d893e6e02a3032361608f71" - integrity sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ== - dependencies: - bin-version "^3.0.0" - semver "^5.6.0" - semver-truncate "^1.1.2" - -bin-version@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-3.1.0.tgz#5b09eb280752b1bd28f0c9db3f96f2f43b6c0839" - integrity sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ== - dependencies: - execa "^1.0.0" - find-versions "^3.0.0" - -bin-wrapper@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-4.1.0.tgz#99348f2cf85031e3ef7efce7e5300aeaae960605" - integrity sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q== - dependencies: - bin-check "^4.1.0" - bin-version-check "^4.0.0" - download "^7.1.0" - import-lazy "^3.1.0" - os-filter-obj "^2.0.0" - pify "^4.0.1" - binary-extensions@^1.0.0: version "1.13.1" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" @@ -6621,23 +6398,6 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" -bl@^1.0.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" - integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -6653,7 +6413,7 @@ bn.js@^5.0.0, bn.js@^5.1.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -body-parser@1.20.0, body-parser@^1.19.0: +body-parser@1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5" integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== @@ -6686,11 +6446,6 @@ boolbase@^1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== -boolean@^3.0.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.2.0.tgz#9e5294af4e98314494cbb17979fa54ca159f116b" - integrity sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw== - boxen@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" @@ -6863,29 +6618,6 @@ btoa-lite@^1.0.0: resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" integrity sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA== -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@^0.2.1, buffer-crc32@^0.2.13, buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -6905,14 +6637,6 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^5.2.1, buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -7029,37 +6753,6 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== - -cacheable-request@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" - integrity sha512-vag0O2LKZ/najSoUwDbVlnlCFvhBE/7mGTY2B5FgCBDcRD+oVV1HYTOwM6JZfMg/hIcM6IwnTZ1uQQL5/X3xIQ== - dependencies: - clone-response "1.0.2" - get-stream "3.0.0" - http-cache-semantics "3.8.1" - keyv "3.0.0" - lowercase-keys "1.0.0" - normalize-url "2.0.1" - responselike "1.0.2" - -cacheable-request@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" - integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^4.0.0" - lowercase-keys "^2.0.0" - normalize-url "^6.0.1" - responselike "^2.0.0" - call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -7097,7 +6790,7 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^4.1.1, camel-case@^4.1.2: +camel-case@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== @@ -7171,15 +6864,6 @@ caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001332: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001343.tgz#8e1107e30d9a4d2f63782b48ae0a3ce34e2f9c2a" integrity sha512-8KeCrAtPMabo/XW14B+R9sZYoClx1n0b+WYgwDKZPtWR3TcdvWzdSy7mPyFEmR5WU1St9v1PW6sdO5dkFOEzfA== -capital-case@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" - integrity sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - upper-case-first "^2.0.2" - capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -7197,16 +6881,6 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -caw@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/caw/-/caw-2.0.1.tgz#6c3ca071fc194720883c2dc5da9b074bfc7e9e95" - integrity sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA== - dependencies: - get-proxy "^2.0.0" - isurl "^1.0.0-alpha5" - tunnel-agent "^0.6.0" - url-to-options "^1.0.1" - ccount@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" @@ -7257,24 +6931,6 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -change-case@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/change-case/-/change-case-4.1.2.tgz#fedfc5f136045e2398c0410ee441f95704641e12" - integrity sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A== - dependencies: - camel-case "^4.1.2" - capital-case "^1.0.4" - constant-case "^3.0.4" - dot-case "^3.0.4" - header-case "^2.0.4" - no-case "^3.0.4" - param-case "^3.0.4" - pascal-case "^3.1.2" - path-case "^3.0.4" - sentence-case "^3.0.4" - snake-case "^3.0.4" - tslib "^2.0.3" - char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -7348,7 +7004,7 @@ chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1, chokidar@^3.5.3: +chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -7418,18 +7074,6 @@ chromatic@^5.0.0: uuid "^8.3.2" yarn-or-npm "^3.0.1" -chrome-launcher@^0.13.1: - version "0.13.4" - resolved "https://registry.yarnpkg.com/chrome-launcher/-/chrome-launcher-0.13.4.tgz#4c7d81333c98282899c4e38256da23e00ed32f73" - integrity sha512-nnzXiDbGKjDSK6t2I+35OAPBy5Pw/39bgkb/ZAFwMhwJbdYBp6aH+vW28ZgtjdU890Q7D+3wN/tB8N66q5Gi2A== - dependencies: - "@types/node" "*" - escape-string-regexp "^1.0.5" - is-wsl "^2.2.0" - lighthouse-logger "^1.0.0" - mkdirp "^0.5.3" - rimraf "^3.0.2" - chrome-trace-event@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" @@ -7564,13 +7208,6 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -clone-response@1.0.2, clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q== - dependencies: - mimic-response "^1.0.0" - clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -7650,11 +7287,6 @@ colorette@^2.0.10, colorette@^2.0.14: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== -colors@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - columnify@^1.5.4: version "1.6.0" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.6.0.tgz#6989531713c9008bb29735e61e37acf5bd553cf3" @@ -7690,7 +7322,7 @@ commander@2.6.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d" integrity sha512-PhbTMT+ilDXZKqH8xbvuUY2ZEQNef0Q7DKxgoEKb4ccytsdvVVJmYqR0sGbi96nxU6oGrwEIQnclpK2NBZuQlg== -commander@^2.19.0, commander@^2.20.0, commander@^2.8.1: +commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -7738,29 +7370,11 @@ compare-func@^2.0.0: array-ify "^1.0.0" dot-prop "^5.1.0" -component-emitter@^1.2.1, component-emitter@~1.3.0: +component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== -compress-brotli@^1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/compress-brotli/-/compress-brotli-1.3.8.tgz#0c0a60c97a989145314ec381e84e26682e7b38db" - integrity sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ== - dependencies: - "@types/json-buffer" "~3.0.0" - json-buffer "~3.0.1" - -compress-commons@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d" - integrity sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ== - dependencies: - buffer-crc32 "^0.2.13" - crc32-stream "^4.0.2" - normalize-path "^3.0.0" - readable-stream "^3.6.0" - compressible@~2.0.16: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" @@ -7834,7 +7448,7 @@ connect-history-api-fallback@^1.6.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== -connect@^3.6.5, connect@^3.7.0: +connect@^3.6.5: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== @@ -7854,21 +7468,12 @@ console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control- resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= -constant-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-3.0.4.tgz#3b84a9aeaf4cf31ec45e6bf5de91bdfb0589faf1" - integrity sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - upper-case "^2.0.2" - constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -content-disposition@0.5.4, content-disposition@^0.5.2: +content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== @@ -7979,11 +7584,6 @@ cookie@0.5.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== -cookie@~0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" @@ -8034,14 +7634,6 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cors@~2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" @@ -8132,19 +7724,6 @@ cpy@^8.1.2: p-filter "^2.1.0" p-map "^3.0.0" -crc-32@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -crc32-stream@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007" - integrity sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w== - dependencies: - crc-32 "^1.2.0" - readable-stream "^3.4.0" - "crc32@>= 0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/crc32/-/crc32-0.2.2.tgz#7ad220d6ffdcd119f9fc127a7772cacea390a4ba" @@ -8211,7 +7790,7 @@ cross-fetch@^3.1.5: dependencies: node-fetch "2.6.7" -cross-spawn@^5.0.1, cross-spawn@^5.1.0: +cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= @@ -8292,11 +7871,6 @@ css-select@^4.1.3, css-select@^4.2.1, css-select@^4.3.0: domutils "^2.8.0" nth-check "^2.0.1" -css-shorthand-properties@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/css-shorthand-properties/-/css-shorthand-properties-1.1.1.tgz#1c808e63553c283f289f2dd56fcee8f3337bd935" - integrity sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A== - css-to-react-native@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" @@ -8314,11 +7888,6 @@ css-tree@^1.0.0-alpha.39: mdn-data "2.0.14" source-map "^0.6.1" -css-value@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/css-value/-/css-value-0.0.1.tgz#5efd6c2eea5ea1fd6b6ac57ec0427b18452424ea" - integrity sha1-Xv1sLupeof1rasV+wEJ7GEUkJOo= - css-what@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" @@ -8377,11 +7946,6 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -custom-event@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" - integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= - cyclist@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" @@ -8525,7 +8089,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -8574,73 +8138,6 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - -decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" - integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== - dependencies: - file-type "^5.2.0" - is-stream "^1.1.0" - tar-stream "^1.5.2" - -decompress-tarbz2@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" - integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== - dependencies: - decompress-tar "^4.1.0" - file-type "^6.1.0" - is-stream "^1.1.0" - seek-bzip "^1.0.5" - unbzip2-stream "^1.0.9" - -decompress-targz@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" - integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== - dependencies: - decompress-tar "^4.1.1" - file-type "^5.2.0" - is-stream "^1.1.0" - -decompress-unzip@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" - integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= - dependencies: - file-type "^3.8.0" - get-stream "^2.2.0" - pify "^2.3.0" - yauzl "^2.4.2" - -decompress@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" - integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== - dependencies: - decompress-tar "^4.0.0" - decompress-tarbz2 "^4.0.0" - decompress-targz "^4.0.0" - decompress-unzip "^4.0.1" - graceful-fs "^4.1.10" - make-dir "^1.0.0" - pify "^2.3.0" - strip-dirs "^2.0.0" - dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -8680,7 +8177,7 @@ deepmerge@^3.2.0: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.3.0.tgz#d3c47fd6f3a93d517b14426b0628a17b0125f5f7" integrity sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA== -deepmerge@^4.0.0, deepmerge@^4.2.2: +deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== @@ -8708,11 +8205,6 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -defer-to-connect@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" - integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== - define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" @@ -8862,26 +8354,6 @@ detect-port@^1.3.0: address "^1.0.1" debug "^2.6.0" -devtools-protocol@0.0.818844: - version "0.0.818844" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.818844.tgz#d1947278ec85b53e4c8ca598f607a28fa785ba9e" - integrity sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg== - -devtools@6.12.1: - version "6.12.1" - resolved "https://registry.yarnpkg.com/devtools/-/devtools-6.12.1.tgz#f0298c6d6f46d8d3b751dd8fa4a0c7bc76e1268f" - integrity sha512-JyG46suEiZmld7/UVeogkCWM0zYGt+2ML/TI+SkEp+bTv9cs46cDb0pKF3glYZJA7wVVL2gC07Ic0iCxyJEnCQ== - dependencies: - "@wdio/config" "6.12.1" - "@wdio/logger" "6.10.10" - "@wdio/protocols" "6.12.0" - "@wdio/utils" "6.11.0" - chrome-launcher "^0.13.1" - edge-paths "^2.1.0" - puppeteer-core "^5.1.0" - ua-parser-js "^0.7.21" - uuid "^8.0.0" - dezalgo@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.4.tgz#751235260469084c132157dfa857f386d4c33d81" @@ -8890,11 +8362,6 @@ dezalgo@^1.0.0: asap "^2.0.0" wrappy "1" -di@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" - integrity sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= - diff-sequences@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" @@ -8981,16 +8448,6 @@ dom-converter@^0.2.0: dependencies: utila "~0.4" -dom-serialize@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" - integrity sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs= - dependencies: - custom-event "~1.0.0" - ent "~2.2.0" - extend "^3.0.0" - void-elements "^2.0.0" - dom-serializer@^1.0.1, dom-serializer@^1.3.2: version "1.4.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" @@ -9075,29 +8532,6 @@ dotenv@^8.0.0, dotenv@^8.2.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== -download@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/download/-/download-7.1.0.tgz#9059aa9d70b503ee76a132897be6dec8e5587233" - integrity sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ== - dependencies: - archive-type "^4.0.0" - caw "^2.0.1" - content-disposition "^0.5.2" - decompress "^4.2.0" - ext-name "^5.0.0" - file-type "^8.1.0" - filenamify "^2.0.0" - get-stream "^3.0.0" - got "^8.3.1" - make-dir "^1.2.0" - p-event "^2.1.0" - pify "^3.0.0" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - duplexer@^0.1.1, duplexer@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" @@ -9121,14 +8555,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -edge-paths@^2.1.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/edge-paths/-/edge-paths-2.2.1.tgz#d2d91513225c06514aeac9843bfce546abbf4391" - integrity sha512-AI5fC7dfDmCdKo3m5y7PkYE8m6bMqR6pvVpgtrZkkhcJXFLelUgkjrhk3kXXx8Kbw2cRaTT4LkOR7hqf39KJdw== - dependencies: - "@types/which" "^1.3.2" - which "^2.0.2" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -9198,7 +8624,7 @@ encoding@^0.1.11: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -9214,27 +8640,6 @@ endent@^2.0.1: fast-json-parse "^1.0.3" objectorarray "^1.0.5" -engine.io-parser@~5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" - integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== - -engine.io@~6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.2.0.tgz#003bec48f6815926f2b1b17873e576acd54f41d0" - integrity sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg== - dependencies: - "@types/cookie" "^0.4.1" - "@types/cors" "^2.8.12" - "@types/node" ">=10.0.0" - accepts "~1.3.4" - base64id "2.0.0" - cookie "~0.4.1" - cors "~2.8.5" - debug "~4.3.1" - engine.io-parser "~5.0.3" - ws "~8.2.3" - enhanced-resolve@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" @@ -9259,11 +8664,6 @@ enquirer@^2.3.5: dependencies: ansi-colors "^4.1.1" -ent@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= - entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -9460,11 +8860,6 @@ es5-shim@^4.5.13: resolved "https://registry.yarnpkg.com/es5-shim/-/es5-shim-4.6.7.tgz#bc67ae0fc3dd520636e0a1601cc73b450ad3e955" integrity sha512-jg21/dmlrNQI7JyyA2w7n+yifSxBng0ZralnSfVZjoCawgNTCnS+yBCyVM9DL5itm7SUnDGgv7hcq2XCZX4iRQ== -es6-error@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" - integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== - es6-object-assign@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" @@ -9849,19 +9244,6 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" integrity sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w== -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -9905,13 +9287,6 @@ execa@^6.1.0: signal-exit "^3.0.7" strip-final-newline "^3.0.0" -executable@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" - integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== - dependencies: - pify "^2.2.0" - exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -9978,21 +9353,6 @@ express@^4.17.1, express@^4.17.3: utils-merge "1.0.1" vary "~1.1.2" -ext-list@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/ext-list/-/ext-list-2.2.2.tgz#0b98e64ed82f5acf0f2931babf69212ef52ddd37" - integrity sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA== - dependencies: - mime-db "^1.28.0" - -ext-name@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ext-name/-/ext-name-5.0.0.tgz#70781981d183ee15d13993c8822045c506c8f0a6" - integrity sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ== - dependencies: - ext-list "^2.0.0" - sort-keys-length "^1.0.0" - extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -10036,17 +9396,6 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" - integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== - dependencies: - debug "^4.1.1" - get-stream "^5.1.0" - yauzl "^2.10.0" - optionalDependencies: - "@types/yauzl" "^2.9.1" - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -10166,13 +9515,6 @@ fbjs@^3.0.0: setimmediate "^1.0.5" ua-parser-js "^0.7.30" -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - fetch-retry@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/fetch-retry/-/fetch-retry-5.0.2.tgz#4c55663a7c056cb45f182394e479464f0ff8f3e3" @@ -10221,50 +9563,16 @@ file-system-cache@^1.0.5: fs-extra "^10.1.0" ramda "^0.28.0" -file-type@^3.6.0, file-type@^3.8.0: +file-type@^3.6.0: version "3.9.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= -file-type@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5" - integrity sha1-G2AOX8ofvcboDApwxxyNul95BsU= - -file-type@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" - integrity sha1-LdvqfHP/42No365J3DOMBYwritY= - -file-type@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" - integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== - -file-type@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-8.1.0.tgz#244f3b7ef641bbe0cca196c7276e4b332399f68c" - integrity sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ== - file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -filename-reserved-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" - integrity sha1-q/c9+rc10EVECr/qLZHzieu/oik= - -filenamify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-2.1.0.tgz#88faf495fb1b47abfd612300002a16228c677ee9" - integrity sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA== - dependencies: - filename-reserved-regex "^2.0.0" - strip-outer "^1.0.0" - trim-repeated "^1.0.0" - fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -10387,13 +9695,6 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-versions@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" - integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== - dependencies: - semver-regex "^2.0.0" - flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -10533,7 +9834,7 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -from2@^2.1.0, from2@^2.1.1: +from2@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= @@ -10551,11 +9852,6 @@ fromentries@^1.3.2: resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - fs-extra@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" @@ -10744,18 +10040,6 @@ get-port@^4.2.0: resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119" integrity sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw== -get-port@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" - integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== - -get-proxy@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" - integrity sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw== - dependencies: - npm-conf "^1.1.0" - get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" @@ -10771,19 +10055,6 @@ get-stdin@^6.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stream@3.0.0, get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" - integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= - dependencies: - object-assign "^4.0.1" - pinkie-promise "^2.0.0" - get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -10791,13 +10062,6 @@ get-stream@^4.0.0, get-stream@^4.1.0: dependencies: pump "^3.0.0" -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -10938,7 +10202,7 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -10950,19 +10214,6 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, gl once "^1.3.0" path-is-absolute "^1.0.0" -global-agent@^2.1.12: - version "2.2.0" - resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.2.0.tgz#566331b0646e6bf79429a16877685c4a1fbf76dc" - integrity sha512-+20KpaW6DDLqhG7JDiJpD1JvNvb8ts+TNl7BPOYcURqCrXqnN1Vf+XVOrkKJAFPqfX+oEhsdzOj1hLWkBTdNJg== - dependencies: - boolean "^3.0.1" - core-js "^3.6.5" - es6-error "^4.1.1" - matcher "^3.0.0" - roarr "^2.15.3" - semver "^7.3.2" - serialize-error "^7.0.1" - global@^4.3.0, global@^4.3.2, global@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" @@ -10988,7 +10239,7 @@ globals@^9.18.0: resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== -globalthis@^1.0.0, globalthis@^1.0.1: +globalthis@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== @@ -11040,56 +10291,11 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" -got@^11.0.2, got@^11.7.0: - version "11.8.5" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.5.tgz#ce77d045136de56e8f024bebb82ea349bc730046" - integrity sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ== - dependencies: - "@sindresorhus/is" "^4.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.2" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - -got@^8.3.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" - integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== - dependencies: - "@sindresorhus/is" "^0.7.0" - cacheable-request "^2.1.1" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - into-stream "^3.1.0" - is-retry-allowed "^1.1.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - mimic-response "^1.0.0" - p-cancelable "^0.4.0" - p-timeout "^2.0.1" - pify "^3.0.0" - safe-buffer "^5.1.1" - timed-out "^4.0.1" - url-parse-lax "^3.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -grapheme-splitter@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - growl@1.10.5: version "1.10.5" resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" @@ -11184,23 +10390,11 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" @@ -11260,7 +10454,7 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: +hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== @@ -11356,14 +10550,6 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -header-case@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/header-case/-/header-case-2.0.4.tgz#5a42e63b55177349cf405beb8d775acabb92c063" - integrity sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q== - dependencies: - capital-case "^1.0.4" - tslib "^2.0.3" - hermes-engine@~0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.8.1.tgz#b6d0d70508ac5add2d198304502fb968cdecb8b2" @@ -11507,16 +10693,11 @@ htmlparser2@^6.1.0: domutils "^2.5.2" entities "^2.0.0" -http-cache-semantics@3.8.1, http-cache-semantics@^3.8.1: +http-cache-semantics@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" @@ -11594,14 +10775,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -http2-wrapper@^1.0.0-beta.5.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" - integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.0.0" - https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" @@ -11615,14 +10788,6 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" -https-proxy-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" - integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== - dependencies: - agent-base "5" - debug "4" - https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -11669,7 +10834,7 @@ icss-utils@^4.0.0, icss-utils@^4.1.1: dependencies: postcss "^7.0.14" -ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: +ieee754@^1.1.4, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -11722,11 +10887,6 @@ import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: parent-module "^1.0.0" resolve-from "^4.0.0" -import-lazy@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-3.1.0.tgz#891279202c8a2280fdbd6674dbd8da1a1dfc67cc" - integrity sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ== - import-local@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" @@ -11855,14 +11015,6 @@ interpret@^2.2.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" - integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= - dependencies: - from2 "^2.1.1" - p-is-promise "^1.1.0" - invariant@^2.2.2, invariant@^2.2.3, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -12138,11 +11290,6 @@ is-nan@^1.2.1: call-bind "^1.0.0" define-properties "^1.1.3" -is-natural-number@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" - integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -12234,11 +11381,6 @@ is-regex@^1.0.4, is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.2, is-regex@^1. call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-retry-allowed@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - is-set@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" @@ -12374,11 +11516,6 @@ isarray@^2.0.5: resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== -isbinaryfile@^4.0.8: - version "4.0.10" - resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" - integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -12429,11 +11566,6 @@ istanbul-lib-coverage@^1.2.1: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== -istanbul-lib-coverage@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" - integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== - istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" @@ -12472,17 +11604,6 @@ istanbul-lib-report@^3.0.0: make-dir "^3.0.0" supports-color "^7.1.0" -istanbul-lib-source-maps@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" - integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^2.0.5" - make-dir "^2.1.0" - rimraf "^2.6.3" - source-map "^0.6.1" - istanbul-lib-source-maps@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" @@ -12492,7 +11613,7 @@ istanbul-lib-source-maps@^4.0.0: istanbul-lib-coverage "^3.0.0" source-map "^0.6.1" -istanbul-reports@^3.0.2, istanbul-reports@^3.1.3, istanbul-reports@^3.1.4: +istanbul-reports@^3.1.3, istanbul-reports@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.4.tgz#1b6f068ecbc6c331040aab5741991273e609e40c" integrity sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw== @@ -12520,14 +11641,6 @@ istanbul@^0.4.5: which "^1.1.1" wordwrap "^1.0.0" -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - iterate-iterator@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.2.tgz#551b804c9eaa15b847ea6a7cdc2f5bf1ec150f91" @@ -13120,16 +12233,6 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-buffer@3.0.1, json-buffer@~3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - json-loader@^0.5.4: version "0.5.7" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" @@ -13240,160 +12343,28 @@ jsprim@^1.2.2: resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.0.tgz#e624f259143b9062c92b6413ff92a164c80d3ccb" integrity sha512-XzO9luP6L0xkxwhIJMTJQpZo/eeN60K08jHdexfD569AGxeNug6UketeHXEhROoM8aR7EcUoOQmIhcJQjcuq8Q== dependencies: - array-includes "^3.1.4" - object.assign "^4.1.2" - -junit-report-builder@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/junit-report-builder/-/junit-report-builder-2.1.0.tgz#7089dd8ae547657509b9a5eb7b5082bde22bcc7e" - integrity sha512-Ioj5I4w18ZcHFaaisqCKdh1z+ipzN7sA2JB+h+WOlGcOMWm0FFN1dfxkgc2I4EXfhSP/mOfM3W43uFzEdz4sTw== - dependencies: - date-format "0.0.2" - lodash "^4.17.15" - make-dir "^1.3.0" - xmlbuilder "^10.0.0" - -junk@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/junk/-/junk-3.1.0.tgz#31499098d902b7e98c5d9b9c80f43457a88abfa1" - integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ== - -just-extend@^4.0.2: - version "4.2.1" - resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744" - integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg== - -karma-benchmark@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/karma-benchmark/-/karma-benchmark-1.0.4.tgz#42fb9ea8a8fa42f3b6f49f72d9025bff026aba1a" - integrity sha512-e9YmWrX3xk7BSosBaL/7lg0ZKSOpwQySKlLb1xa2m5VbwMVFffS29QB9f2UCT7+aMCnJlNRWjcKym4Ch/60OsA== - dependencies: - lodash "4.17.15" - platform "1.3.5" - -karma-benchmarkjs-reporter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/karma-benchmarkjs-reporter/-/karma-benchmarkjs-reporter-1.0.0.tgz#d98d0032942c6e29746d9afefc2dab1629edb64e" - integrity sha1-2Y0AMpQsbil0bZr+/C2rFinttk4= - dependencies: - chalk "^1.1.3" - lodash "^4.15.0" - strip-ansi "^3.0.1" - -karma-chrome-launcher@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz#baca9cc071b1562a1db241827257bfe5cab597ea" - integrity sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ== - dependencies: - which "^1.2.1" - -karma-coverage-istanbul-reporter@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-3.0.3.tgz#f3b5303553aadc8e681d40d360dfdc19bc7e9fe9" - integrity sha512-wE4VFhG/QZv2Y4CdAYWDbMmcAHeS926ZIji4z+FkB2aF/EposRb6DP6G5ncT/wXhqUfAb/d7kZrNKPonbvsATw== - dependencies: - istanbul-lib-coverage "^3.0.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^3.0.6" - istanbul-reports "^3.0.2" - minimatch "^3.0.4" - -karma-firefox-launcher@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-2.1.2.tgz#9a38cc783c579a50f3ed2a82b7386186385cfc2d" - integrity sha512-VV9xDQU1QIboTrjtGVD4NCfzIH7n01ZXqy/qpBhnOeGVOkG5JYPEm8kuSd7psHE6WouZaQ9Ool92g8LFweSNMA== - dependencies: - is-wsl "^2.2.0" - which "^2.0.1" - -karma-ie-launcher@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/karma-ie-launcher/-/karma-ie-launcher-1.0.0.tgz#497986842c490190346cd89f5494ca9830c6d59c" - integrity sha1-SXmGhCxJAZA0bNifVJTKmDDG1Zw= - dependencies: - lodash "^4.6.1" - -karma-mocha@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-2.0.1.tgz#4b0254a18dfee71bdbe6188d9a6861bf86b0cd7d" - integrity sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ== - dependencies: - minimist "^1.2.3" - -karma-safari-launcher@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/karma-safari-launcher/-/karma-safari-launcher-1.0.0.tgz#96982a2cc47d066aae71c553babb28319115a2ce" - integrity sha1-lpgqLMR9BmquccVTursoMZEVos4= - -karma-sauce-launcher@^4.1.5: - version "4.3.6" - resolved "https://registry.yarnpkg.com/karma-sauce-launcher/-/karma-sauce-launcher-4.3.6.tgz#274f999ce5a3bc76577a438839cb0dbbf2746a48" - integrity sha512-Ej62q4mUPFktyAm8g0g8J5qhwEkXwdHrwtiV4pZjKNHNnSs+4qgDyzs3VkpOy3AmNTsTqQXUN/lpiy0tZpDJZQ== - dependencies: - global-agent "^2.1.12" - saucelabs "^4.6.3" - webdriverio "^6.7.0" - -karma-spec-reporter@0.0.34: - version "0.0.34" - resolved "https://registry.yarnpkg.com/karma-spec-reporter/-/karma-spec-reporter-0.0.34.tgz#7dc79cdc76b0e37f17006921439600ae3c648669" - integrity sha512-l5H/Nh9q4g2Ysx2CDU2m+NIPyLQpCVbk9c4V02BTZHw3NM6RO1dq3eRpKXCSSdPt4RGfhHk8jDt3XYkGp+5PWg== - dependencies: - colors "1.4.0" - -karma-webpack@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-5.0.0.tgz#2a2c7b80163fe7ffd1010f83f5507f95ef39f840" - integrity sha512-+54i/cd3/piZuP3dr54+NcFeKOPnys5QeM1IY+0SPASwrtHsliXUiCL50iW+K9WWA7RvamC4macvvQ86l3KtaA== - dependencies: - glob "^7.1.3" - minimatch "^3.0.4" - webpack-merge "^4.1.5" - -karma@^6.3.19: - version "6.3.20" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.3.20.tgz#12f5c3b0e68f204607cb0a3a78d4751b42ef61a8" - integrity sha512-HRNQhMuKOwKpjYlWiJP0DUrJOh+QjaI/DTaD8b9rEm4Il3tJ8MijutVZH4ts10LuUFst/CedwTS6vieCN8yTSw== - dependencies: - "@colors/colors" "1.5.0" - body-parser "^1.19.0" - braces "^3.0.2" - chokidar "^3.5.1" - connect "^3.7.0" - di "^0.0.1" - dom-serialize "^2.2.1" - glob "^7.1.7" - graceful-fs "^4.2.6" - http-proxy "^1.18.1" - isbinaryfile "^4.0.8" - lodash "^4.17.21" - log4js "^6.4.1" - mime "^2.5.2" - minimatch "^3.0.4" - mkdirp "^0.5.5" - qjobs "^1.2.0" - range-parser "^1.2.1" - rimraf "^3.0.2" - socket.io "^4.4.1" - source-map "^0.6.1" - tmp "^0.2.1" - ua-parser-js "^0.7.30" - yargs "^16.1.1" - -keyv@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" - integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== - dependencies: - json-buffer "3.0.0" + array-includes "^3.1.4" + object.assign "^4.1.2" -keyv@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.3.0.tgz#b4352e0e4fe7c94111947d6738a6d3fe7903027c" - integrity sha512-C30Un9+63J0CsR7Wka5quXKqYZsT6dcRQ2aOwGcSc3RiQ4HGWpTAHlCA+puNfw2jA/s11EsxA1nCXgZRuRKMQQ== +junit-report-builder@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/junit-report-builder/-/junit-report-builder-2.1.0.tgz#7089dd8ae547657509b9a5eb7b5082bde22bcc7e" + integrity sha512-Ioj5I4w18ZcHFaaisqCKdh1z+ipzN7sA2JB+h+WOlGcOMWm0FFN1dfxkgc2I4EXfhSP/mOfM3W43uFzEdz4sTw== dependencies: - compress-brotli "^1.3.8" - json-buffer "3.0.1" + date-format "0.0.2" + lodash "^4.17.15" + make-dir "^1.3.0" + xmlbuilder "^10.0.0" + +junk@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/junk/-/junk-3.1.0.tgz#31499098d902b7e98c5d9b9c80f43457a88abfa1" + integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ== + +just-extend@^4.0.2: + version "4.2.1" + resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744" + integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg== kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" @@ -13447,13 +12418,6 @@ lazy-universal-dotenv@^3.0.1: dotenv "^8.0.0" dotenv-expand "^5.1.0" -lazystream@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" - integrity sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw== - dependencies: - readable-stream "^2.0.5" - lerna@^3.22.0: version "3.22.1" resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.22.1.tgz#82027ac3da9c627fd8bf02ccfeff806a98e65b62" @@ -13499,14 +12463,6 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lighthouse-logger@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.3.0.tgz#ba6303e739307c4eee18f08249524e7dafd510db" - integrity sha512-BbqAKApLb9ywUli+0a+PcV04SyJ/N1q/8qgCNe6U97KbPCS1BTksEuHFLYdvc8DltuhfxIUBqDZsC0bBGtl3lA== - dependencies: - debug "^2.6.9" - marky "^1.2.2" - lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -13685,26 +12641,11 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash.defaults@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= - -lodash.difference@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" - integrity sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw= - lodash.escape@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" integrity sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg= -lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= - lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" @@ -13725,16 +12666,6 @@ lodash.ismatch@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= -lodash.isobject@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" - integrity sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= - lodash.kebabcase@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" @@ -13745,7 +12676,7 @@ lodash.memoize@4.x, lodash.memoize@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= -lodash.merge@^4.6.1, lodash.merge@^4.6.2: +lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== @@ -13790,11 +12721,6 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= -lodash.union@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg= - lodash.uniq@4.5.0, lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -13805,17 +12731,7 @@ lodash.upperfirst@4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984= -lodash.zip@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" - integrity sha1-7GZi5IlkCO1KtsVCo5kLcswIACA= - -lodash@4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== - -lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.5.1, lodash@^4.6.1: +lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.5.1, lodash@^4.6.1: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -13843,7 +12759,7 @@ log-update@^2.3.0: cli-cursor "^2.0.0" wrap-ansi "^3.0.1" -log4js@^6.3.0, log4js@^6.4.1: +log4js@^6.3.0: version "6.5.1" resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.5.1.tgz#06f771ae231c8e930ac2c7381242c8cdeff0dca1" integrity sha512-z1hRRe5DDPzsP73PgN/GYmeSbIAl/g9kX3GLjABCpcU1ojns8S4cyjpJ21jU1P7z1wWkm69PjyMcEGqYYdDqaA== @@ -13863,16 +12779,6 @@ logkitty@^0.7.1: dayjs "^1.8.15" yargs "^15.1.0" -loglevel-plugin-prefix@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.8.4.tgz#2fe0e05f1a820317d98d8c123e634c1bd84ff644" - integrity sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g== - -loglevel@^1.6.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.0.tgz#e7ec73a57e1e7b419cb6c6ac06bf050b67356114" - integrity sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA== - loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -13895,21 +12801,6 @@ lower-case@^2.0.2: dependencies: tslib "^2.0.3" -lowercase-keys@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" - integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= - -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - lowlight@^1.17.0: version "1.20.0" resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.20.0.tgz#ddb197d33462ad0d93bf19d17b6c301aa3941888" @@ -13958,7 +12849,7 @@ macos-release@^2.2.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.5.0.tgz#067c2c88b5f3fb3c56a375b2ec93826220fa1ff2" integrity sha512-EIgv+QZ9r+814gjJj0Bt5vSLJLzswGmSUbUpbi9AIr/fsN2IWFBl2NucV9PAiek+U1STK468tEkxmVYUtuAN3g== -make-dir@^1.0.0, make-dir@^1.2.0, make-dir@^1.3.0: +make-dir@^1.0.0, make-dir@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== @@ -14064,18 +12955,6 @@ markdown-to-jsx@^6.11.4: prop-types "^15.6.2" unquote "^1.1.0" -marky@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.4.tgz#d02bb4c08be2366687c778ecd2a328971ce23d7f" - integrity sha512-zd2/GiSn6U3/jeFVZ0J9CA1LzQ8RfIVvXkb/U0swFHF/zT+dVohTAWjmo2DcIuofmIIIROlwTbd+shSeXmxr0w== - -matcher@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" - integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng== - dependencies: - escape-string-regexp "^4.0.0" - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -14532,7 +13411,7 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.52.0, "mime-db@>= 1.43.0 < 2", mime-db@^1.28.0: +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -14549,7 +13428,7 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.4.1, mime@^2.4.4, mime@^2.5.2: +mime@^2.4.1, mime@^2.4.4: version "2.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== @@ -14569,16 +13448,6 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -14637,7 +13506,7 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -14717,11 +13586,6 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp-classic@^0.5.2: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - mkdirp-infer-owner@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz#55d3b368e7d89065c38f32fd38e638f0ab61d316" @@ -15155,16 +14019,7 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= -normalize-url@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" - integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== - dependencies: - prepend-http "^2.0.0" - query-string "^5.0.1" - sort-keys "^2.0.0" - -normalize-url@^6.0.1, normalize-url@^6.1.0: +normalize-url@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== @@ -15176,14 +14031,6 @@ npm-bundled@^1.0.1: dependencies: npm-normalize-package-bin "^1.0.1" -npm-conf@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" - integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== - dependencies: - config-chain "^1.1.11" - pify "^3.0.0" - npm-lifecycle@^3.1.2: version "3.1.5" resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz#9882d3642b8c82c815782a12e6a1bfeed0026309" @@ -15343,7 +14190,7 @@ ob1@0.66.2: resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.66.2.tgz#8caf548202cf2688944bae47db405a08bca17a61" integrity sha512-RFewnL/RjE0qQBOuM+2bbY96zmJPIge/aDtsiDbLSb+MOiK8CReAhBHDgL+zrA3F1hQk00lMWpUwYcep750plA== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -15600,13 +14447,6 @@ os-browserify@^0.3.0: resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= -os-filter-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-2.0.0.tgz#1c0b62d5f3a2442749a2d139e6dddee6e81d8d16" - integrity sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg== - dependencies: - arch "^2.1.0" - os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -15640,23 +14480,6 @@ p-all@^2.1.0: dependencies: p-map "^2.0.0" -p-cancelable@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" - integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== - -p-cancelable@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" - integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== - -p-event@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/p-event/-/p-event-2.3.1.tgz#596279ef169ab2c3e0cae88c1cfbb08079993ef6" - integrity sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA== - dependencies: - p-timeout "^2.0.1" - p-event@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/p-event/-/p-event-4.2.0.tgz#af4b049c8acd91ae81083ebd1e6f5cae2044c1b5" @@ -15676,11 +14499,6 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-is-promise@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" - integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= - p-limit@3.1.0, p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" @@ -15781,13 +14599,6 @@ p-retry@^4.5.0: "@types/retry" "0.12.0" retry "^0.13.1" -p-timeout@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" - integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== - dependencies: - p-finally "^1.0.0" - p-timeout@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" @@ -15826,7 +14637,7 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" -param-case@^3.0.3, param-case@^3.0.4: +param-case@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== @@ -15966,14 +14777,6 @@ path-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== -path-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/path-case/-/path-case-3.0.4.tgz#9168645334eb942658375c56f80b4c0cb5f82c6f" - integrity sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -16072,11 +14875,6 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -16162,11 +14960,6 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -platform@1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.5.tgz#fb6958c696e07e2918d2eeda0f0bc9448d733444" - integrity sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q== - plist@^3.0.2, plist@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.5.tgz#2cbeb52d10e3cdccccf0c11a63a85d830970a987" @@ -16301,11 +15094,6 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - "prettier@>=2.2.1 <=2.3.0": version "2.3.0" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" @@ -16398,7 +15186,7 @@ progress-stream@^2.0.0: speedometer "~1.0.0" through2 "~2.0.3" -progress@^2.0.0, progress@^2.0.1: +progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -16516,11 +15304,6 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-from-env@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -16595,34 +15378,11 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer-core@^5.1.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-5.5.0.tgz#dfb6266efe5a933cbf1a368d27025a6fd4f5a884" - integrity sha512-tlA+1n+ziW/Db03hVV+bAecDKse8ihFRXYiEypBe9IlLRvOCzYFG6qrCMBYK34HO/Q/Ecjc+tvkHRAfLVH+NgQ== - dependencies: - debug "^4.1.0" - devtools-protocol "0.0.818844" - extract-zip "^2.0.0" - https-proxy-agent "^4.0.0" - node-fetch "^2.6.1" - pkg-dir "^4.2.0" - progress "^2.0.1" - proxy-from-env "^1.0.0" - rimraf "^3.0.2" - tar-fs "^2.0.0" - unbzip2-stream "^1.3.3" - ws "^7.2.3" - q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qjobs@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" - integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== - qs@6.10.3, qs@^6.10.0, qs@^6.6.0, qs@^6.9.4: version "6.10.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" @@ -16635,15 +15395,6 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - query-string@^6.13.8: version "6.14.1" resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" @@ -16689,11 +15440,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - raf@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" @@ -17131,7 +15877,7 @@ read@1, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -17144,7 +15890,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -17153,13 +15899,6 @@ read@1, read@~1.0.1: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdir-glob@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.1.tgz#f0e10bb7bf7bfa7e0add8baffdc54c3f7dbee6c4" - integrity sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA== - dependencies: - minimatch "^3.0.4" - readdir-scoped-modules@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" @@ -17481,11 +16220,6 @@ resize-observer-polyfill@^1.5.1: resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== -resolve-alpn@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" - integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== - resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -17547,27 +16281,6 @@ resolve@^2.0.0-next.3: is-core-module "^2.2.0" path-parse "^1.0.6" -responselike@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -responselike@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" - integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== - dependencies: - lowercase-keys "^2.0.0" - -resq@^1.9.1: - version "1.10.2" - resolved "https://registry.yarnpkg.com/resq/-/resq-1.10.2.tgz#cedf4f20d53f6e574b1e12afbda446ad9576c193" - integrity sha512-HmgVS3j+FLrEDBTDYysPdPVF9/hioDMJ/otOiQDKqk77YfZeeLOj0qi34yObumcud1gBpk+wpBTEg4kMicD++A== - dependencies: - fast-deep-equal "^2.0.1" - restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -17601,11 +16314,6 @@ rfdc@^1.3.0: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== -rgb2hex@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/rgb2hex/-/rgb2hex-0.2.3.tgz#8aa464c517b8a26c7a79d767dabaec2b49ee78ec" - integrity sha512-clEe0m1xv+Tva1B/TOepuIcvLAxP0U+sCDfgt1SX1HmI2Ahr5/Cd/nzJM1e78NKVtWdoo0s33YehpFA8UfIShQ== - rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -17633,18 +16341,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -roarr@^2.15.3: - version "2.15.4" - resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz#f5fe795b7b838ccfe35dc608e0282b9eba2e7afd" - integrity sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A== - dependencies: - boolean "^3.0.1" - detect-node "^2.0.4" - globalthis "^1.0.1" - json-stringify-safe "^5.0.1" - semver-compare "^1.0.0" - sprintf-js "^1.1.2" - rst-selector-parser@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" @@ -17731,19 +16427,6 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -saucelabs@^4.6.3: - version "4.7.8" - resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-4.7.8.tgz#099a7ddacee297b34420acd5ddc155eb1ad0efde" - integrity sha512-K2qaRUixc7+8JiAwpTvEsIQVzzUkYwa0mAfs0akGagRlWXUR1JrsmgJRyz28qkwpERW1KDuByn3Ju96BuW1V7Q== - dependencies: - bin-wrapper "^4.1.0" - change-case "^4.1.1" - form-data "^3.0.0" - got "^11.7.0" - hash.js "^1.1.7" - tunnel "0.0.6" - yargs "^16.0.3" - sax@^1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -17830,13 +16513,6 @@ seedrandom@^2.4.3: resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-2.4.4.tgz#b25ea98632c73e45f58b77cfaa931678df01f9ba" integrity sha512-9A+PDmgm+2du77B5i0Ip2cxOqqHjgNxnBgglxLcX78A2D6c2rTo61z4jnVABpF4cKeDMDG+cmXXvdnqse2VqMA== -seek-bzip@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" - integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== - dependencies: - commander "^2.8.1" - select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -17854,23 +16530,6 @@ selfsigned@^2.0.1: dependencies: node-forge "^1" -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - -semver-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" - integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== - -semver-truncate@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" - integrity sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g= - dependencies: - semver "^5.3.0" - "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -17912,34 +16571,11 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" -sentence-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-3.0.4.tgz#3645a7b8c117c787fde8702056225bb62a45131f" - integrity sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - upper-case-first "^2.0.2" - serialize-error@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a" integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go= -serialize-error@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18" - integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw== - dependencies: - type-fest "^0.13.1" - -serialize-error@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-8.1.0.tgz#3a069970c712f78634942ddd50fbbc0eaebe2f67" - integrity sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ== - dependencies: - type-fest "^0.20.2" - serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -18197,14 +16833,6 @@ smart-buffer@^4.1.0: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== -snake-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" - integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -18235,32 +16863,6 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socket.io-adapter@~2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz#b50a4a9ecdd00c34d4c8c808224daa1a786152a6" - integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== - -socket.io-parser@~4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.0.4.tgz#9ea21b0d61508d18196ef04a2c6b9ab630f4c2b0" - integrity sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g== - dependencies: - "@types/component-emitter" "^1.2.10" - component-emitter "~1.3.0" - debug "~4.3.1" - -socket.io@^4.4.1: - version "4.5.1" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.5.1.tgz#aa7e73f8a6ce20ee3c54b2446d321bbb6b1a9029" - integrity sha512-0y9pnIso5a9i+lJmsCdtmTTgJFFSvNQKDnPQRz28mGNnxbmqYg2QPtJTLFxhymFZhAIn50eHAKzJeiNaKr+yUQ== - dependencies: - accepts "~1.3.4" - base64id "~2.0.0" - debug "~4.3.2" - engine.io "~6.2.0" - socket.io-adapter "~2.4.0" - socket.io-parser "~4.0.4" - sockjs@^0.3.21: version "0.3.24" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" @@ -18286,20 +16888,6 @@ socks@~2.3.2: ip "1.1.5" smart-buffer "^4.1.0" -sort-keys-length@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" - integrity sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg= - dependencies: - sort-keys "^1.0.0" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0= - dependencies: - is-plain-obj "^1.0.0" - sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -18500,11 +17088,6 @@ split@^1.0.0: dependencies: through "2" -sprintf-js@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" - integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -18686,11 +17269,6 @@ streamroller@^3.1.1: debug "^4.3.4" fs-extra "^10.1.0" -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= - strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" @@ -18869,13 +17447,6 @@ strip-bom@^4.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== -strip-dirs@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" - integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== - dependencies: - is-natural-number "^4.0.1" - strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" @@ -18915,13 +17486,6 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-outer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" - integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== - dependencies: - escape-string-regexp "^1.0.2" - strong-log-transformer@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" @@ -19066,40 +17630,6 @@ tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -tar-fs@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.1.4" - -tar-stream@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" - integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== - dependencies: - bl "^1.0.0" - buffer-alloc "^1.2.0" - end-of-stream "^1.0.0" - fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.1" - xtend "^4.0.0" - -tar-stream@^2.1.4, tar-stream@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.19" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" @@ -19324,7 +17854,7 @@ through2@^4.0.0: dependencies: readable-stream "3" -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -19334,11 +17864,6 @@ thunky@^1.0.2: resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== -timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - timers-browserify@^2.0.12, timers-browserify@^2.0.4: version "2.0.12" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" @@ -19370,7 +17895,7 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@^0.2.0, tmp@^0.2.1: +tmp@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== @@ -19387,11 +17912,6 @@ to-arraybuffer@^1.0.0: resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= -to-buffer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" @@ -19495,13 +18015,6 @@ trim-newlines@^3.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -trim-repeated@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" - integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE= - dependencies: - escape-string-regexp "^1.0.2" - trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" @@ -19605,7 +18118,7 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -tunnel@0.0.6, tunnel@^0.0.6: +tunnel@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== @@ -19644,11 +18157,6 @@ type-detect@^1.0.0: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" integrity sha1-diIXzAbbJY7EiQihKY6LlRIejqI= -type-fest@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" - integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== - type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" @@ -19707,7 +18215,7 @@ typescript@^4.7.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.2.tgz#1f9aa2ceb9af87cca227813b4310fff0b51593c4" integrity sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A== -ua-parser-js@^0.7.21, ua-parser-js@^0.7.30: +ua-parser-js@^0.7.30: version "0.7.31" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.31.tgz#649a656b191dffab4f21d5e053e27ca17cbff5c6" integrity sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ== @@ -19750,14 +18258,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -unbzip2-stream@^1.0.9, unbzip2-stream@^1.3.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - unfetch@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" @@ -19940,20 +18440,6 @@ upath@^1.1.1, upath@^1.2.0: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== -upper-case-first@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-2.0.2.tgz#992c3273f882abd19d1e02894cc147117f844324" - integrity sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg== - dependencies: - tslib "^2.0.3" - -upper-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-2.0.2.tgz#d89810823faab1df1549b7d97a76f8662bae6f7a" - integrity sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg== - dependencies: - tslib "^2.0.3" - uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -19975,13 +18461,6 @@ url-loader@^4.1.1: mime-types "^2.1.27" schema-utils "^3.0.0" -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - url-parse@^1.2.0: version "1.5.10" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" @@ -19990,11 +18469,6 @@ url-parse@^1.2.0: querystringify "^2.1.1" requires-port "^1.0.0" -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -20106,7 +18580,7 @@ uuid@^3.0.1, uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.0.0, uuid@^8.3.2: +uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -20140,7 +18614,7 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vary@^1, vary@~1.1.2: +vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= @@ -20187,11 +18661,6 @@ vm-browserify@^1.0.1, vm-browserify@^1.1.2: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -void-elements@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= - w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -20265,47 +18734,6 @@ web-namespaces@^1.0.0: resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec" integrity sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw== -webdriver@6.12.1: - version "6.12.1" - resolved "https://registry.yarnpkg.com/webdriver/-/webdriver-6.12.1.tgz#30eee65340ea5124aa564f99a4dbc7d2f965b308" - integrity sha512-3rZgAj9o2XHp16FDTzvUYaHelPMSPbO1TpLIMUT06DfdZjNYIzZiItpIb/NbQDTPmNhzd9cuGmdI56WFBGY2BA== - dependencies: - "@wdio/config" "6.12.1" - "@wdio/logger" "6.10.10" - "@wdio/protocols" "6.12.0" - "@wdio/utils" "6.11.0" - got "^11.0.2" - lodash.merge "^4.6.1" - -webdriverio@^6.7.0: - version "6.12.1" - resolved "https://registry.yarnpkg.com/webdriverio/-/webdriverio-6.12.1.tgz#5b6f1167373bd7a154419d8a930ef1ffda9d0537" - integrity sha512-Nx7ge0vTWHVIRUbZCT+IuMwB5Q0Q5nLlYdgnmmJviUKLuc3XtaEBkYPTbhHWHgSBXsPZMIc023vZKNkn+6iyeQ== - dependencies: - "@types/puppeteer-core" "^5.4.0" - "@wdio/config" "6.12.1" - "@wdio/logger" "6.10.10" - "@wdio/repl" "6.11.0" - "@wdio/utils" "6.11.0" - archiver "^5.0.0" - atob "^2.1.2" - css-shorthand-properties "^1.1.1" - css-value "^0.0.1" - devtools "6.12.1" - fs-extra "^9.0.1" - get-port "^5.1.1" - grapheme-splitter "^1.0.2" - lodash.clonedeep "^4.5.0" - lodash.isobject "^3.0.2" - lodash.isplainobject "^4.0.6" - lodash.zip "^4.2.0" - minimatch "^3.0.4" - puppeteer-core "^5.1.0" - resq "^1.9.1" - rgb2hex "0.2.3" - serialize-error "^8.0.0" - webdriver "6.12.1" - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -20418,13 +18846,6 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-merge@^4.1.5: - version "4.2.2" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" - integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== - dependencies: - lodash "^4.17.15" - webpack-merge@^5.7.3: version "5.8.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" @@ -20609,14 +19030,14 @@ which-typed-array@^1.1.2: has-tostringtag "^1.0.0" is-typed-array "^1.1.9" -which@^1.1.1, which@^1.2.1, which@^1.2.9, which@^1.3.1: +which@^1.1.1, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -which@^2.0.1, which@^2.0.2: +which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -20782,7 +19203,7 @@ ws@^6.1.4: dependencies: async-limiter "~1.0.0" -ws@^7, ws@^7.2.3: +ws@^7: version "7.5.8" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== @@ -20792,11 +19213,6 @@ ws@^8.2.3, ws@^8.4.2: resolved "https://registry.yarnpkg.com/ws/-/ws-8.7.0.tgz#eaf9d874b433aa00c0e0d8752532444875db3957" integrity sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg== -ws@~8.2.3: - version "8.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" - integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== - x-default-browser@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/x-default-browser/-/x-default-browser-0.4.0.tgz#70cf0da85da7c0ab5cb0f15a897f2322a6bdd481" @@ -20922,7 +19338,7 @@ yargs@14.2.0: y18n "^4.0.0" yargs-parser "^15.0.0" -yargs@16.2.0, yargs@^16.0.3, yargs@^16.1.1, yargs@^16.2.0: +yargs@16.2.0, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -20990,28 +19406,11 @@ yarn-or-npm@^3.0.1: cross-spawn "^6.0.5" pkg-dir "^4.2.0" -yauzl@^2.10.0, yauzl@^2.4.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zip-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79" - integrity sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A== - dependencies: - archiver-utils "^2.1.0" - compress-commons "^4.1.0" - readable-stream "^3.6.0" - zwitch@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-1.0.5.tgz#d11d7381ffed16b742f6af7b3f223d5cd9fe9920" From b63f891fcf07f58ae3edf157f394b32f291900db Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 13:10:09 -0700 Subject: [PATCH 04/13] Remove enzyme and replace enzyme in react native components test --- package.json | 4 +- test/jest/victory-native/components.test.js | 14 +- yarn.lock | 269 ++------------------ 3 files changed, 33 insertions(+), 254 deletions(-) diff --git a/package.json b/package.json index ddbfe91dd..b77150904 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "@storybook/react": "^6.5.5", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^12.1.2", + "@testing-library/react-native": "^9.1.0", "@types/jest": "^27.5.1", "@types/lodash": "^4.14.149", "@types/react": "^16.9.19", @@ -83,8 +84,6 @@ "chromatic": "^5.0.0", "cross-env": "^7.0.3", "emotion-theming": "^10.0.27", - "enzyme": "^3.11.0", - "enzyme-adapter-react-16": "^1.15.6", "eslint": "^7.32.0", "eslint-config-formidable": "^2.0.1", "eslint-config-prettier": "^6.0.0", @@ -116,6 +115,7 @@ "react": "^16.13.1", "react-dom": "^16.13.1", "react-hot-loader": "v2.0.0-alpha-4", + "react-test-renderer": "^16.13.1", "rimraf": "^3.0.2", "seedrandom": "^2.4.3", "sinon": "^11.1.2", diff --git a/test/jest/victory-native/components.test.js b/test/jest/victory-native/components.test.js index 72f72cd34..932bfb386 100644 --- a/test/jest/victory-native/components.test.js +++ b/test/jest/victory-native/components.test.js @@ -20,10 +20,8 @@ import { VictoryTooltip, VictoryVoronoi } from "victory-native"; -import enzyme from "enzyme"; -import Adapter from "enzyme-adapter-react-16"; - -enzyme.configure({ adapter: new Adapter() }); +import { render } from "@testing-library/react-native"; +import { Log } from "victory-core"; const components = [ { component: VictoryArea, name: "VictoryArea" }, @@ -48,10 +46,14 @@ const components = [ ]; describe("Default render", () => { + beforeEach(() => { + // This suppresses the warning `renderInPortal` is not supported outside of `VictoryContainer`. + jest.spyOn(Log, "warn").mockImplementation(() => {}); + }); components.forEach((C) => { it(`should work for ${C.name}`, () => { - const wrapper = enzyme.shallow(React.createElement(C.component)); - expect(wrapper).toHaveLength(1); + const { container } = render(React.createElement(C.component)); + expect(container).toBeDefined(); }); }); }); diff --git a/yarn.lock b/yarn.lock index 910aa809e..56f0a8d1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3979,6 +3979,13 @@ lodash "^4.17.15" redent "^3.0.0" +"@testing-library/react-native@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@testing-library/react-native/-/react-native-9.1.0.tgz#500698b4ae5ade98211cdea0ffd97d823c61c3ac" + integrity sha512-YBCSOIMYlh8gI0VG7ExRe80hNpfhC+i7j0cvpwiopUYtbpft8bMJXO35A4zEk7BkiWXEq6bYZ7VDJR3muSLhyQ== + dependencies: + pretty-format "^27.0.0" + "@testing-library/react@^12.1.2": version "12.1.5" resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-12.1.5.tgz#bb248f72f02a5ac9d949dea07279095fa577963b" @@ -5026,21 +5033,6 @@ airbnb-js-shims@^2.2.1: string.prototype.padstart "^3.0.0" symbol.prototype.description "^1.0.0" -airbnb-prop-types@^2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz#b96274cefa1abb14f623f804173ee97c13971dc2" - integrity sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg== - dependencies: - array.prototype.find "^2.1.1" - function.prototype.name "^1.1.2" - is-regex "^1.1.0" - object-is "^1.1.2" - object.assign "^4.1.0" - object.entries "^1.1.2" - prop-types "^15.7.2" - prop-types-exact "^1.2.0" - react-is "^16.13.1" - ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -5374,28 +5366,7 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== -array.prototype.filter@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/array.prototype.filter/-/array.prototype.filter-1.0.1.tgz#20688792acdb97a09488eaaee9eebbf3966aae21" - integrity sha512-Dk3Ty7N42Odk7PjU/Ci3zT4pLj20YvuVnneG/58ICM6bt4Ij5kZaJTVQ9TSaWaIECX2sFyz4KItkVZqHNnciqw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -array.prototype.find@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.2.0.tgz#153b8a28ad8965cd86d3117b07e6596af6f2880d" - integrity sha512-sn40qmUiLYAcRb/1HsIQjTTZ1kCy8II8VtZJpMn2Aoen9twULhbWXisfh3HimGqMlHGUul0/TfKCnXg42LuPpQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flat@^1.2.1, array.prototype.flat@^1.2.3, array.prototype.flat@^1.2.5: +array.prototype.flat@^1.2.1, array.prototype.flat@^1.2.5: version "1.3.0" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== @@ -6961,30 +6932,6 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -cheerio-select@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.6.0.tgz#489f36604112c722afa147dedd0d4609c09e1696" - integrity sha512-eq0GdBvxVFbqWgmCm7M3XGs1I8oLy/nExUnh6oLqmBditPO9AqQJrkslDpMun/hZ0yyTs8L0m85OHp4ho6Qm9g== - dependencies: - css-select "^4.3.0" - css-what "^6.0.1" - domelementtype "^2.2.0" - domhandler "^4.3.1" - domutils "^2.8.0" - -cheerio@^1.0.0-rc.3: - version "1.0.0-rc.10" - resolved "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz" - integrity sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw== - dependencies: - cheerio-select "^1.5.0" - dom-serializer "^1.3.2" - domhandler "^4.2.0" - htmlparser2 "^6.1.0" - parse5 "^6.0.1" - parse5-htmlparser2-tree-adapter "^6.0.1" - tslib "^2.2.0" - chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" @@ -7860,7 +7807,7 @@ css-loader@^3.6.0: schema-utils "^2.7.0" semver "^6.3.0" -css-select@^4.1.3, css-select@^4.2.1, css-select@^4.3.0: +css-select@^4.1.3, css-select@^4.2.1: version "4.3.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== @@ -8405,11 +8352,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -discontinuous-range@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" - integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo= - dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" @@ -8448,7 +8390,7 @@ dom-converter@^0.2.0: dependencies: utila "~0.4" -dom-serializer@^1.0.1, dom-serializer@^1.3.2: +dom-serializer@^1.0.1: version "1.4.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== @@ -8688,70 +8630,6 @@ envinfo@^7.3.1, envinfo@^7.7.2, envinfo@^7.7.3: resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== -enzyme-adapter-react-16@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz#fd677a658d62661ac5afd7f7f541f141f8085901" - integrity sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g== - dependencies: - enzyme-adapter-utils "^1.14.0" - enzyme-shallow-equal "^1.0.4" - has "^1.0.3" - object.assign "^4.1.2" - object.values "^1.1.2" - prop-types "^15.7.2" - react-is "^16.13.1" - react-test-renderer "^16.0.0-0" - semver "^5.7.0" - -enzyme-adapter-utils@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.0.tgz#afbb0485e8033aa50c744efb5f5711e64fbf1ad0" - integrity sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg== - dependencies: - airbnb-prop-types "^2.16.0" - function.prototype.name "^1.1.3" - has "^1.0.3" - object.assign "^4.1.2" - object.fromentries "^2.0.3" - prop-types "^15.7.2" - semver "^5.7.1" - -enzyme-shallow-equal@^1.0.1, enzyme-shallow-equal@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.4.tgz#b9256cb25a5f430f9bfe073a84808c1d74fced2e" - integrity sha512-MttIwB8kKxypwHvRynuC3ahyNc+cFbR8mjVIltnmzQ0uKGqmsfO4bfBuLxb0beLNPhjblUEYvEbsg+VSygvF1Q== - dependencies: - has "^1.0.3" - object-is "^1.1.2" - -enzyme@^3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.11.0.tgz#71d680c580fe9349f6f5ac6c775bc3e6b7a79c28" - integrity sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw== - dependencies: - array.prototype.flat "^1.2.3" - cheerio "^1.0.0-rc.3" - enzyme-shallow-equal "^1.0.1" - function.prototype.name "^1.1.2" - has "^1.0.3" - html-element-map "^1.2.0" - is-boolean-object "^1.0.1" - is-callable "^1.1.5" - is-number-object "^1.0.4" - is-regex "^1.0.5" - is-string "^1.0.5" - is-subset "^0.1.1" - lodash.escape "^4.0.1" - lodash.isequal "^4.5.0" - object-inspect "^1.7.0" - object-is "^1.0.2" - object.assign "^4.1.0" - object.entries "^1.1.1" - object.values "^1.1.1" - raf "^3.4.1" - rst-selector-parser "^2.2.3" - string.prototype.trim "^1.2.1" - err-code@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" @@ -8786,7 +8664,7 @@ errorhandler@^1.5.0: accepts "~1.3.7" escape-html "~1.0.3" -es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.4, es-abstract@^1.19.5, es-abstract@^1.20.0, es-abstract@^1.20.1: +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.0, es-abstract@^1.20.1: version "1.20.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== @@ -9946,7 +9824,7 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -function.prototype.name@^1.1.0, function.prototype.name@^1.1.2, function.prototype.name@^1.1.3, function.prototype.name@^1.1.5: +function.prototype.name@^1.1.0, function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== @@ -10620,14 +10498,6 @@ hpack.js@^2.1.6: readable-stream "^2.0.1" wbuf "^1.1.0" -html-element-map@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/html-element-map/-/html-element-map-1.3.1.tgz#44b2cbcfa7be7aa4ff59779e47e51012e1c73c08" - integrity sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg== - dependencies: - array.prototype.filter "^1.0.0" - call-bind "^1.0.2" - html-encoding-sniffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" @@ -11103,7 +10973,7 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-boolean-object@^1.0.1, is-boolean-object@^1.1.0: +is-boolean-object@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== @@ -11121,7 +10991,7 @@ is-buffer@^2.0.0: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.4: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== @@ -11373,7 +11243,7 @@ is-promise@^2.1.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== -is-regex@^1.0.4, is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.2, is-regex@^1.1.4: +is-regex@^1.0.4, is-regex@^1.1.2, is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -11422,11 +11292,6 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-subset@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" - integrity sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= - is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" @@ -12641,26 +12506,11 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash.escape@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" - integrity sha1-yQRGkMIeBClL6qUXcS/e0fqI3pg= - -lodash.flattendeep@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" - integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= - lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= -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.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -13648,11 +13498,6 @@ moment@^2.18.1: resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3" integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw== -moo@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4" - integrity sha512-I1mnb5xn4fO80BH9BLcF0yLypy2UKl+Cb01Fu0hJRkJjlCRtxZMWkTdAtDd5ZqCOxtCkhmRwyI57vWT+1iZ67w== - move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -13759,16 +13604,6 @@ ncp@2.0.0: resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= -nearley@^2.7.10: - version "2.20.1" - resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.20.1.tgz#246cd33eff0d012faf197ff6774d7ac78acdd474" - integrity sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ== - dependencies: - commander "^2.19.0" - moo "^0.5.0" - railroad-diagrams "^1.0.0" - randexp "0.4.6" - negotiator@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" @@ -14204,12 +14039,12 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.12.0, object-inspect@^1.7.0, object-inspect@^1.9.0: +object-inspect@^1.12.0, object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== -object-is@^1.0.1, object-is@^1.0.2, object-is@^1.1.2: +object-is@^1.0.1: version "1.1.5" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== @@ -14239,7 +14074,7 @@ object.assign@^4.1.0, object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.entries@^1.1.0, object.entries@^1.1.1, object.entries@^1.1.2, object.entries@^1.1.4: +object.entries@^1.1.0, object.entries@^1.1.4: version "1.1.5" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== @@ -14248,7 +14083,7 @@ object.entries@^1.1.0, object.entries@^1.1.1, object.entries@^1.1.2, object.entr define-properties "^1.1.3" es-abstract "^1.19.1" -"object.fromentries@^2.0.0 || ^1.0.0", object.fromentries@^2.0.3, object.fromentries@^2.0.4: +"object.fromentries@^2.0.0 || ^1.0.0", object.fromentries@^2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== @@ -14282,7 +14117,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0, object.values@^1.1.1, object.values@^1.1.2, object.values@^1.1.4, object.values@^1.1.5: +object.values@^1.1.0, object.values@^1.1.4, object.values@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== @@ -14737,14 +14572,7 @@ parse-url@^6.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parse5-htmlparser2-tree-adapter@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" - integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== - dependencies: - parse5 "^6.0.1" - -parse5@6.0.1, parse5@^6.0.0, parse5@^6.0.1: +parse5@6.0.1, parse5@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== @@ -15254,15 +15082,6 @@ promzard@^0.3.0: dependencies: read "1" -prop-types-exact@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/prop-types-exact/-/prop-types-exact-1.2.0.tgz#825d6be46094663848237e3925a98c6e944e9869" - integrity sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA== - dependencies: - has "^1.0.3" - object.assign "^4.1.0" - reflect.ownkeys "^0.2.0" - prop-types@^15.0.0, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" @@ -15440,18 +15259,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -raf@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" - integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== - dependencies: - performance-now "^2.1.0" - -railroad-diagrams@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" - integrity sha1-635iZ1SN3t+4mcG5Dlc3RVnN234= - ramda@^0.26.1: version "0.26.1" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" @@ -15462,14 +15269,6 @@ ramda@^0.28.0: resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.28.0.tgz#acd785690100337e8b063cab3470019be427cc97" integrity sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA== -randexp@0.4.6: - version "0.4.6" - resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" - integrity sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ== - dependencies: - discontinuous-range "1.0.0" - ret "~0.1.10" - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -15756,7 +15555,7 @@ react-syntax-highlighter@^15.4.5: prismjs "^1.27.0" refractor "^3.6.0" -react-test-renderer@^16.0.0-0: +react-test-renderer@^16.13.1: version "16.14.0" resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.14.0.tgz#e98360087348e260c56d4fe2315e970480c228ae" integrity sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg== @@ -15966,11 +15765,6 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" -reflect.ownkeys@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" - integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA= - refractor@^2.4.1: version "2.10.1" resolved "https://registry.yarnpkg.com/refractor/-/refractor-2.10.1.tgz#166c32f114ed16fd96190ad21d5193d3afc7d34e" @@ -16341,14 +16135,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rst-selector-parser@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" - integrity sha1-gbIw6i/MYGbInjRy3nlChdmwPZE= - dependencies: - lodash.flattendeep "^4.4.0" - nearley "^2.7.10" - rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -17354,15 +17140,6 @@ string.prototype.padstart@^3.0.0: define-properties "^1.1.3" es-abstract "^1.19.1" -string.prototype.trim@^1.2.1: - version "1.2.6" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.6.tgz#824960787db37a9e24711802ed0c1d1c0254f83e" - integrity sha512-8lMR2m+U0VJTPp6JjvJTtGyc4FIGq9CdRt7O9p6T0e6K4vjU+OP+SQJpbe/SBmRcCUIvNUnjsbmY6lnMp8MhsQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.19.5" - string.prototype.trimend@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" @@ -18089,7 +17866,7 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.2.0: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== From 9e58601b78a6edeed7030d5d7c69f62f17058149 Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 13:18:44 -0700 Subject: [PATCH 05/13] Remove sinon --- package.json | 2 -- yarn.lock | 81 ++++------------------------------------------------ 2 files changed, 5 insertions(+), 78 deletions(-) diff --git a/package.json b/package.json index b77150904..a4a95c90a 100644 --- a/package.json +++ b/package.json @@ -118,8 +118,6 @@ "react-test-renderer": "^16.13.1", "rimraf": "^3.0.2", "seedrandom": "^2.4.3", - "sinon": "^11.1.2", - "sinon-chai": "^3.7.0", "storybook-addon-performance": "^0.10.0", "ts-jest": "^28.0.3", "ts-loader": "^9.3.0", diff --git a/yarn.lock b/yarn.lock index 56f0a8d1e..47398c94e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3021,41 +3021,20 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.23.5.tgz#93f7b9f4e3285a7a9ade7557d9a8d36809cbc47d" integrity sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg== -"@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.3": +"@sinonjs/commons@^1.7.0": version "1.8.3" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@>=5", "@sinonjs/fake-timers@^9.1.1": +"@sinonjs/fake-timers@^9.1.1": version "9.1.2" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== dependencies: "@sinonjs/commons" "^1.7.0" -"@sinonjs/fake-timers@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5" - integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg== - dependencies: - "@sinonjs/commons" "^1.7.0" - -"@sinonjs/samsam@^6.0.2": - version "6.1.1" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-6.1.1.tgz#627f7f4cbdb56e6419fa2c1a3e4751ce4f6a00b1" - integrity sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA== - dependencies: - "@sinonjs/commons" "^1.6.0" - lodash.get "^4.4.2" - type-detect "^4.0.8" - -"@sinonjs/text-encoding@^0.7.1": - version "0.7.1" - resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" - integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== - "@storybook/addon-actions@^6.5.5": version "6.5.5" resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.5.5.tgz#c88dc6196bc7e31cbdb7c59d4121db49b526f118" @@ -8093,7 +8072,7 @@ dedent@^0.7.0: deep-eql@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" - integrity sha1-71WKyrjeJSBs1xOQbXTlaTDrafI= + integrity sha512-6sEotTRGBFiNcqVoeHwnfopbSpi5NbH1VWJmYCVkmxMmaVTT0bUTrNaGyBwhgP4MZL012W/mkzIn3Da+iDYweg== dependencies: type-detect "0.1.1" @@ -8324,11 +8303,6 @@ diff@3.5.0: resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== -diff@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" - integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== - diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -11366,11 +11340,6 @@ is-wsl@^2.1.1, is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -12226,11 +12195,6 @@ junk@^3.1.0: resolved "https://registry.yarnpkg.com/junk/-/junk-3.1.0.tgz#31499098d902b7e98c5d9b9c80f43457a88abfa1" integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ== -just-extend@^4.0.2: - version "4.2.1" - resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744" - integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg== - kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -13631,17 +13595,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nise@^5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.1.tgz#ac4237e0d785ecfcb83e20f389185975da5c31f3" - integrity sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A== - dependencies: - "@sinonjs/commons" "^1.8.3" - "@sinonjs/fake-timers" ">=5" - "@sinonjs/text-encoding" "^0.7.1" - just-extend "^4.0.2" - path-to-regexp "^1.7.0" - no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" @@ -14657,13 +14610,6 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-to-regexp@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -16554,23 +16500,6 @@ simplebar@^4.2.3: lodash.throttle "^4.1.1" resize-observer-polyfill "^1.5.1" -sinon-chai@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-3.7.0.tgz#cfb7dec1c50990ed18c153f1840721cf13139783" - integrity sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g== - -sinon@^11.1.2: - version "11.1.2" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-11.1.2.tgz#9e78850c747241d5c59d1614d8f9cbe8840e8674" - integrity sha512-59237HChms4kg7/sXhiRcUzdSkKuydDeTiamT/jesUVHshBgL8XAmhgFo0GfK6RruMDM/iRSij1EybmMog9cJw== - dependencies: - "@sinonjs/commons" "^1.8.3" - "@sinonjs/fake-timers" "^7.1.2" - "@sinonjs/samsam" "^6.0.2" - diff "^5.0.0" - nise "^5.1.0" - supports-color "^7.2.0" - sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -17334,7 +17263,7 @@ supports-color@^5.3.0, supports-color@^5.5.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0, supports-color@^7.1.0, supports-color@^7.2.0: +supports-color@^7.0.0, supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== @@ -17924,7 +17853,7 @@ type-detect@0.1.1: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" integrity sha1-C6XsKohWQORw6k6FBZcZANrFiCI= -type-detect@4.0.8, type-detect@^4.0.3, type-detect@^4.0.8: +type-detect@4.0.8, type-detect@^4.0.3: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== From 385596210e9412f843d5643c26703ba1197fc47a Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 13:25:46 -0700 Subject: [PATCH 06/13] Convert node tests to jest syntax --- package-scripts.js | 2 +- test/node/setup.js | 1 - test/node/spec/victory/victory.spec.js | 260 ------------------------- test/node/victory.test.js | 259 ++++++++++++++++++++++++ 4 files changed, 260 insertions(+), 262 deletions(-) delete mode 100644 test/node/spec/victory/victory.spec.js create mode 100644 test/node/victory.test.js diff --git a/package-scripts.js b/package-scripts.js index 3a923d42a..8e6e775df 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -20,7 +20,7 @@ module.exports = { watch: "cross-env BABEL_ENV=commonjs jest --watch --config=jest-config.js" }, "test-node": { - default: "mocha ./test/node" + default: "jest ./test/node" }, test: { watch: npsUtils.concurrent.nps("watch", "jest.watch"), diff --git a/test/node/setup.js b/test/node/setup.js index baf129d9e..f369ef1ec 100644 --- a/test/node/setup.js +++ b/test/node/setup.js @@ -1,2 +1 @@ -const { expect } = require("chai"); global.expect = expect; // eslint-disable-line no-undef diff --git a/test/node/spec/victory/victory.spec.js b/test/node/spec/victory/victory.spec.js deleted file mode 100644 index 8e6e79762..000000000 --- a/test/node/spec/victory/victory.spec.js +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Client tests - */ -const Victory = require("victory"); - -describe("victory", () => { - // eslint-disable-line max-statements - describe("exports victory components", () => { - // eslint-disable-line max-statements - it("exports VictoryAnimation", () => { - expect(Victory.VictoryAnimation).not.to.equal(undefined); - }); - it("exports VictoryArea", () => { - expect(Victory.VictoryArea).not.to.equal(undefined); - }); - it("exports VictoryAxis", () => { - expect(Victory.VictoryAxis).not.to.equal(undefined); - }); - it("exports VictoryBar", () => { - expect(Victory.VictoryBar).not.to.equal(undefined); - }); - it("exports VictoryBoxPlot", () => { - expect(Victory.VictoryBoxPlot).not.to.equal(undefined); - }); - it("exports VictoryBrushContainer", () => { - expect(Victory.VictoryBrushContainer).not.to.equal(undefined); - }); - it("exports VictoryBrushLine", () => { - expect(Victory.VictoryBrushLine).not.to.equal(undefined); - }); - it("exports VictoryCandlestick", () => { - expect(Victory.VictoryCandlestick).not.to.equal(undefined); - }); - it("exports VictoryChart", () => { - expect(Victory.VictoryChart).not.to.equal(undefined); - }); - it("exports VictoryClipContainer", () => { - expect(Victory.VictoryClipContainer).not.to.equal(undefined); - }); - it("exports VictoryContainer", () => { - expect(Victory.VictoryContainer).not.to.equal(undefined); - }); - it("exports VictoryCursorContainer", () => { - expect(Victory.VictoryCursorContainer).not.to.equal(undefined); - }); - it("exports VictoryErrorBar", () => { - expect(Victory.VictoryErrorBar).not.to.equal(undefined); - }); - it("exports VictoryGroup", () => { - expect(Victory.VictoryGroup).not.to.equal(undefined); - }); - it("exports VictoryLabel", () => { - expect(Victory.VictoryLabel).not.to.equal(undefined); - }); - it("exports VictoryLegend", () => { - expect(Victory.VictoryLegend).not.to.equal(undefined); - }); - it("exports VictoryLine", () => { - expect(Victory.VictoryLine).not.to.equal(undefined); - }); - it("exports VictoryPie", () => { - expect(Victory.VictoryPie).not.to.equal(undefined); - }); - it("exports VictoryPolarAxis", () => { - expect(Victory.VictoryPolarAxis).not.to.equal(undefined); - }); - it("exports VictoryPortal", () => { - expect(Victory.VictoryPortal).not.to.equal(undefined); - }); - it("exports VictoryScatter", () => { - expect(Victory.VictoryScatter).not.to.equal(undefined); - }); - it("exports VictorySelectionContainer", () => { - expect(Victory.VictorySelectionContainer).not.to.equal(undefined); - }); - it("exports VictorySharedEvents", () => { - expect(Victory.VictorySharedEvents).not.to.equal(undefined); - }); - it("exports VictoryStack", () => { - expect(Victory.VictoryStack).not.to.equal(undefined); - }); - it("exports VictoryTheme", () => { - expect(Victory.VictoryTheme).not.to.equal(undefined); - }); - it("exports VictoryTransition", () => { - expect(Victory.VictoryTransition).not.to.equal(undefined); - }); - it("exports VictoryTooltip", () => { - expect(Victory.VictoryTooltip).not.to.equal(undefined); - }); - it("exports VictoryVoronoi", () => { - expect(Victory.VictoryVoronoi).not.to.equal(undefined); - }); - it("exports VictoryVoronoiContainer", () => { - expect(Victory.VictoryVoronoiContainer).not.to.equal(undefined); - }); - it("exports VictoryZoomContainer", () => { - expect(Victory.VictoryZoomContainer).not.to.equal(undefined); - }); - }); - describe("exports primitive components", () => { - // eslint-disable-line max-statements - it("exports Area", () => { - expect(Victory.Area).not.to.equal(undefined); - }); - it("exports Bar", () => { - expect(Victory.Bar).not.to.equal(undefined); - }); - it("exports Border", () => { - expect(Victory.Border).not.to.equal(undefined); - }); - it("exports Candle", () => { - expect(Victory.Candle).not.to.equal(undefined); - }); - it("exports Circle", () => { - expect(Victory.Circle).not.to.equal(undefined); - }); - it("exports ClipPath", () => { - expect(Victory.ClipPath).not.to.equal(undefined); - }); - it("exports Curve", () => { - expect(Victory.Curve).not.to.equal(undefined); - }); - it("exports ErrorBar", () => { - expect(Victory.ErrorBar).not.to.equal(undefined); - }); - it("exports Flyout", () => { - expect(Victory.Flyout).not.to.equal(undefined); - }); - it("exports LineSegment", () => { - expect(Victory.LineSegment).not.to.equal(undefined); - }); - it("exports Line", () => { - expect(Victory.Line).not.to.equal(undefined); - }); - it("exports Path", () => { - expect(Victory.Path).not.to.equal(undefined); - }); - it("exports Point", () => { - expect(Victory.Point).not.to.equal(undefined); - }); - it("exports Rect", () => { - expect(Victory.Rect).not.to.equal(undefined); - }); - it("exports Slice", () => { - expect(Victory.Slice).not.to.equal(undefined); - }); - it("exports Text", () => { - expect(Victory.Text).not.to.equal(undefined); - }); - it("exports TSpan", () => { - expect(Victory.TSpan).not.to.equal(undefined); - }); - it("exports Voronoi", () => { - expect(Victory.Voronoi).not.to.equal(undefined); - }); - it("exports Whisker", () => { - expect(Victory.Whisker).not.to.equal(undefined); - }); - }); - describe("exports helper components", () => { - // eslint-disable-line max-statements - it("exports addEvents", () => { - expect(Victory.addEvents).not.to.equal(undefined); - }); - it("exports Axis", () => { - expect(Victory.Axis).not.to.equal(undefined); - }); - it("exports brushContainerMixin", () => { - expect(Victory.brushContainerMixin).not.to.equal(undefined); - }); - it("exports BrushHelpers", () => { - expect(Victory.BrushHelpers).not.to.equal(undefined); - }); - it("exports Collection", () => { - expect(Victory.Collection).not.to.equal(undefined); - }); - it("exports combineContainerMixins", () => { - expect(Victory.combineContainerMixins).not.to.equal(undefined); - }); - it("exports createContainer", () => { - expect(Victory.createContainer).not.to.equal(undefined); - }); - it("exports cursorContainerMixin", () => { - expect(Victory.cursorContainerMixin).not.to.equal(undefined); - }); - it("exports CursorHelpers", () => { - expect(Victory.CursorHelpers).not.to.equal(undefined); - }); - it("exports Data", () => { - expect(Victory.Data).not.to.equal(undefined); - }); - it("exports DefaultTransitions", () => { - expect(Victory.DefaultTransitions).not.to.equal(undefined); - }); - it("exports Domain", () => { - expect(Victory.Domain).not.to.equal(undefined); - }); - it("exports Events", () => { - expect(Victory.Events).not.to.equal(undefined); - }); - it("exports Helpers", () => { - expect(Victory.Helpers).not.to.equal(undefined); - }); - it("exports LabelHelpers", () => { - expect(Victory.LabelHelpers).not.to.equal(undefined); - }); - it("exports Log", () => { - expect(Victory.Log).not.to.equal(undefined); - }); - it("exports makeCreateContainerFunction", () => { - expect(Victory.makeCreateContainerFunction).not.to.equal(undefined); - }); - it("exports Portal", () => { - expect(Victory.Portal).not.to.equal(undefined); - }); - it("exports PropTypes", () => { - expect(Victory.PropTypes).not.to.equal(undefined); - }); - it("exports RawZoomHelpers", () => { - expect(Victory.RawZoomHelpers).not.to.equal(undefined); - }); - it("exports Scale", () => { - expect(Victory.Scale).not.to.equal(undefined); - }); - it("exports Selection", () => { - expect(Victory.Selection).not.to.equal(undefined); - }); - it("exports selectionContainerMixin", () => { - expect(Victory.selectionContainerMixin).not.to.equal(undefined); - }); - it("exports SelectionHelpers", () => { - expect(Victory.SelectionHelpers).not.to.equal(undefined); - }); - it("exports Style", () => { - expect(Victory.Style).not.to.equal(undefined); - }); - it("exports TextSize", () => { - expect(Victory.TextSize).not.to.equal(undefined); - }); - it("exports Transitions", () => { - expect(Victory.Transitions).not.to.equal(undefined); - }); - it("exports voronoiContainerMixin", () => { - expect(Victory.voronoiContainerMixin).not.to.equal(undefined); - }); - it("exports VoronoiHelpers", () => { - expect(Victory.VoronoiHelpers).not.to.equal(undefined); - }); - it("exports Wrapper", () => { - expect(Victory.Wrapper).not.to.equal(undefined); - }); - it("exports zoomContainerMixin", () => { - expect(Victory.zoomContainerMixin).not.to.equal(undefined); - }); - it("exports ZoomHelpers", () => { - expect(Victory.ZoomHelpers).not.to.equal(undefined); - }); - }); -}); diff --git a/test/node/victory.test.js b/test/node/victory.test.js new file mode 100644 index 000000000..e75aa38e5 --- /dev/null +++ b/test/node/victory.test.js @@ -0,0 +1,259 @@ +/** + * Client tests + */ +const Victory = require("victory"); + +describe("victory", () => { + // eslint-disable-line max-statements + describe("exports victory components", () => { + it("exports VictoryAnimation", () => { + expect(Victory.VictoryAnimation).toBeDefined(); + }); + it("exports VictoryArea", () => { + expect(Victory.VictoryArea).toBeDefined(); + }); + it("exports VictoryAxis", () => { + expect(Victory.VictoryAxis).toBeDefined(); + }); + it("exports VictoryBar", () => { + expect(Victory.VictoryBar).toBeDefined(); + }); + it("exports VictoryBoxPlot", () => { + expect(Victory.VictoryBoxPlot).toBeDefined(); + }); + it("exports VictoryBrushContainer", () => { + expect(Victory.VictoryBrushContainer).toBeDefined(); + }); + it("exports VictoryBrushLine", () => { + expect(Victory.VictoryBrushLine).toBeDefined(); + }); + it("exports VictoryCandlestick", () => { + expect(Victory.VictoryCandlestick).toBeDefined(); + }); + it("exports VictoryChart", () => { + expect(Victory.VictoryChart).toBeDefined(); + }); + it("exports VictoryClipContainer", () => { + expect(Victory.VictoryClipContainer).toBeDefined(); + }); + it("exports VictoryContainer", () => { + expect(Victory.VictoryContainer).toBeDefined(); + }); + it("exports VictoryCursorContainer", () => { + expect(Victory.VictoryCursorContainer).toBeDefined(); + }); + it("exports VictoryErrorBar", () => { + expect(Victory.VictoryErrorBar).toBeDefined(); + }); + it("exports VictoryGroup", () => { + expect(Victory.VictoryGroup).toBeDefined(); + }); + it("exports VictoryLabel", () => { + expect(Victory.VictoryLabel).toBeDefined(); + }); + it("exports VictoryLegend", () => { + expect(Victory.VictoryLegend).toBeDefined(); + }); + it("exports VictoryLine", () => { + expect(Victory.VictoryLine).toBeDefined(); + }); + it("exports VictoryPie", () => { + expect(Victory.VictoryPie).toBeDefined(); + }); + it("exports VictoryPolarAxis", () => { + expect(Victory.VictoryPolarAxis).toBeDefined(); + }); + it("exports VictoryPortal", () => { + expect(Victory.VictoryPortal).toBeDefined(); + }); + it("exports VictoryScatter", () => { + expect(Victory.VictoryScatter).toBeDefined(); + }); + it("exports VictorySelectionContainer", () => { + expect(Victory.VictorySelectionContainer).toBeDefined(); + }); + it("exports VictorySharedEvents", () => { + expect(Victory.VictorySharedEvents).toBeDefined(); + }); + it("exports VictoryStack", () => { + expect(Victory.VictoryStack).toBeDefined(); + }); + it("exports VictoryTheme", () => { + expect(Victory.VictoryTheme).toBeDefined(); + }); + it("exports VictoryTransition", () => { + expect(Victory.VictoryTransition).toBeDefined(); + }); + it("exports VictoryTooltip", () => { + expect(Victory.VictoryTooltip).toBeDefined(); + }); + it("exports VictoryVoronoi", () => { + expect(Victory.VictoryVoronoi).toBeDefined(); + }); + it("exports VictoryVoronoiContainer", () => { + expect(Victory.VictoryVoronoiContainer).toBeDefined(); + }); + it("exports VictoryZoomContainer", () => { + expect(Victory.VictoryZoomContainer).toBeDefined(); + }); + }); + describe("exports primitive components", () => { + // eslint-disable-line max-statements + it("exports Area", () => { + expect(Victory.Area).toBeDefined(); + }); + it("exports Bar", () => { + expect(Victory.Bar).toBeDefined(); + }); + it("exports Border", () => { + expect(Victory.Border).toBeDefined(); + }); + it("exports Candle", () => { + expect(Victory.Candle).toBeDefined(); + }); + it("exports Circle", () => { + expect(Victory.Circle).toBeDefined(); + }); + it("exports ClipPath", () => { + expect(Victory.ClipPath).toBeDefined(); + }); + it("exports Curve", () => { + expect(Victory.Curve).toBeDefined(); + }); + it("exports ErrorBar", () => { + expect(Victory.ErrorBar).toBeDefined(); + }); + it("exports Flyout", () => { + expect(Victory.Flyout).toBeDefined(); + }); + it("exports LineSegment", () => { + expect(Victory.LineSegment).toBeDefined(); + }); + it("exports Line", () => { + expect(Victory.Line).toBeDefined(); + }); + it("exports Path", () => { + expect(Victory.Path).toBeDefined(); + }); + it("exports Point", () => { + expect(Victory.Point).toBeDefined(); + }); + it("exports Rect", () => { + expect(Victory.Rect).toBeDefined(); + }); + it("exports Slice", () => { + expect(Victory.Slice).toBeDefined(); + }); + it("exports Text", () => { + expect(Victory.Text).toBeDefined(); + }); + it("exports TSpan", () => { + expect(Victory.TSpan).toBeDefined(); + }); + it("exports Voronoi", () => { + expect(Victory.Voronoi).toBeDefined(); + }); + it("exports Whisker", () => { + expect(Victory.Whisker).toBeDefined(); + }); + }); + describe("exports helper components", () => { + // eslint-disable-line max-statements + it("exports addEvents", () => { + expect(Victory.addEvents).toBeDefined(); + }); + it("exports Axis", () => { + expect(Victory.Axis).toBeDefined(); + }); + it("exports brushContainerMixin", () => { + expect(Victory.brushContainerMixin).toBeDefined(); + }); + it("exports BrushHelpers", () => { + expect(Victory.BrushHelpers).toBeDefined(); + }); + it("exports Collection", () => { + expect(Victory.Collection).toBeDefined(); + }); + it("exports combineContainerMixins", () => { + expect(Victory.combineContainerMixins).toBeDefined(); + }); + it("exports createContainer", () => { + expect(Victory.createContainer).toBeDefined(); + }); + it("exports cursorContainerMixin", () => { + expect(Victory.cursorContainerMixin).toBeDefined(); + }); + it("exports CursorHelpers", () => { + expect(Victory.CursorHelpers).toBeDefined(); + }); + it("exports Data", () => { + expect(Victory.Data).toBeDefined(); + }); + it("exports DefaultTransitions", () => { + expect(Victory.DefaultTransitions).toBeDefined(); + }); + it("exports Domain", () => { + expect(Victory.Domain).toBeDefined(); + }); + it("exports Events", () => { + expect(Victory.Events).toBeDefined(); + }); + it("exports Helpers", () => { + expect(Victory.Helpers).toBeDefined(); + }); + it("exports LabelHelpers", () => { + expect(Victory.LabelHelpers).toBeDefined(); + }); + it("exports Log", () => { + expect(Victory.Log).toBeDefined(); + }); + it("exports makeCreateContainerFunction", () => { + expect(Victory.makeCreateContainerFunction).toBeDefined(); + }); + it("exports Portal", () => { + expect(Victory.Portal).toBeDefined(); + }); + it("exports PropTypes", () => { + expect(Victory.PropTypes).toBeDefined(); + }); + it("exports RawZoomHelpers", () => { + expect(Victory.RawZoomHelpers).toBeDefined(); + }); + it("exports Scale", () => { + expect(Victory.Scale).toBeDefined(); + }); + it("exports Selection", () => { + expect(Victory.Selection).toBeDefined(); + }); + it("exports selectionContainerMixin", () => { + expect(Victory.selectionContainerMixin).toBeDefined(); + }); + it("exports SelectionHelpers", () => { + expect(Victory.SelectionHelpers).toBeDefined(); + }); + it("exports Style", () => { + expect(Victory.Style).toBeDefined(); + }); + it("exports TextSize", () => { + expect(Victory.TextSize).toBeDefined(); + }); + it("exports Transitions", () => { + expect(Victory.Transitions).toBeDefined(); + }); + it("exports voronoiContainerMixin", () => { + expect(Victory.voronoiContainerMixin).toBeDefined(); + }); + it("exports VoronoiHelpers", () => { + expect(Victory.VoronoiHelpers).toBeDefined(); + }); + it("exports Wrapper", () => { + expect(Victory.Wrapper).toBeDefined(); + }); + it("exports zoomContainerMixin", () => { + expect(Victory.zoomContainerMixin).toBeDefined(); + }); + it("exports ZoomHelpers", () => { + expect(Victory.ZoomHelpers).toBeDefined(); + }); + }); +}); From b111c42eb47ce7ff6b8f80d534eb76e9872522b8 Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 13:37:44 -0700 Subject: [PATCH 07/13] Remove mocha and chai --- package.json | 2 - test/jest/victory-native/components.test.js | 9 +- yarn.lock | 101 +------------------- 3 files changed, 8 insertions(+), 104 deletions(-) diff --git a/package.json b/package.json index a4a95c90a..5ed8cef2e 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,6 @@ "babel-plugin-lodash": "^3.1.2", "babel-plugin-module-resolver": "^4.1.0", "babel-preset-react-native": "^4.0.1", - "chai": "^3.5.0", "chromatic": "^5.0.0", "cross-env": "^7.0.3", "emotion-theming": "^10.0.27", @@ -106,7 +105,6 @@ "lodash": "^4.17.19", "lodash-webpack-plugin": "^0.11.6", "metro-react-native-babel-preset": "0.66.2", - "mocha": "^5.0.0", "node-polyfill-webpack-plugin": "^1.1.4", "nps": "^5.9.0", "nps-utils": "^1.5.0", diff --git a/test/jest/victory-native/components.test.js b/test/jest/victory-native/components.test.js index 932bfb386..54cd83799 100644 --- a/test/jest/victory-native/components.test.js +++ b/test/jest/victory-native/components.test.js @@ -21,7 +21,6 @@ import { VictoryVoronoi } from "victory-native"; import { render } from "@testing-library/react-native"; -import { Log } from "victory-core"; const components = [ { component: VictoryArea, name: "VictoryArea" }, @@ -48,8 +47,14 @@ const components = [ describe("Default render", () => { beforeEach(() => { // This suppresses the warning `renderInPortal` is not supported outside of `VictoryContainer`. - jest.spyOn(Log, "warn").mockImplementation(() => {}); + jest.spyOn(console, "warn").mockImplementation((message) => { + if (message.includes("renderInPortal")) { + return; + } + return console.warn(message); + }); }); + components.forEach((C) => { it(`should work for ${C.name}`, () => { const { container } = render(React.createElement(C.component)); diff --git a/yarn.lock b/yarn.lock index 47398c94e..b00db51ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5442,11 +5442,6 @@ assert@^2.0.0: object-is "^1.0.1" util "^0.12.0" -assertion-error@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -6472,11 +6467,6 @@ 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.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.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" @@ -6836,15 +6826,6 @@ ccount@^1.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== -chai@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" - integrity sha512-eRYY0vPS2a9zt5w5Z0aCeWbrXTEyvk7u/Xf71EzNObrjSCPgMm1Nku/D/u2tiqHBX5j40wWhj54YJLtgn8g55A== - dependencies: - assertion-error "^1.0.1" - deep-eql "^0.1.3" - type-detect "^1.0.0" - chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -7238,11 +7219,6 @@ command-exists@^1.2.8: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -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.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d" @@ -8069,13 +8045,6 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= -deep-eql@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" - integrity sha512-6sEotTRGBFiNcqVoeHwnfopbSpi5NbH1VWJmYCVkmxMmaVTT0bUTrNaGyBwhgP4MZL012W/mkzIn3Da+iDYweg== - dependencies: - type-detect "0.1.1" - deep-equal@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" @@ -8298,11 +8267,6 @@ diff-sequences@^28.0.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.0.2.tgz#40f8d4ffa081acbd8902ba35c798458d0ff1af41" integrity sha512-YtEoNynLDFCRznv/XDalsKGSZDoj0U5kLnXvY0JSq3nBboRrZXjD81+eSiwi+nzcZDwedMmcowcxNwwgFW23mQ== -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.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -8744,7 +8708,7 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -10148,11 +10112,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -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== - gud@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" @@ -10392,11 +10351,6 @@ hastscript@^6.0.0: property-information "^5.0.0" space-separated-tokens "^1.0.0" -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" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -13291,13 +13245,6 @@ minimalistic-crypto-utils@^1.0.1: dependencies: brace-expansion "^1.1.7" -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -13315,11 +13262,6 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" @@ -13421,13 +13363,6 @@ mkdirp@*, mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" @@ -13435,23 +13370,6 @@ mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: dependencies: minimist "^1.2.6" -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.1" - commander "2.15.1" - debug "3.1.0" - diff "3.5.0" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.5" - he "1.1.1" - minimatch "3.0.4" - mkdirp "0.5.1" - supports-color "5.4.0" - modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -17237,13 +17155,6 @@ sudo-prompt@^9.0.0: resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz#77efb84309c9ca489527a4e749f287e6bdd52afd" integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw== -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 "^3.0.0" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -17848,21 +17759,11 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" - integrity sha1-C6XsKohWQORw6k6FBZcZANrFiCI= - type-detect@4.0.8, type-detect@^4.0.3: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -type-detect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" - integrity sha1-diIXzAbbJY7EiQihKY6LlRIejqI= - type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" From 25b10d62d000a6e63cd934b8cead3b216b608c14 Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 13:39:22 -0700 Subject: [PATCH 08/13] Remove mocha configuration --- package.json | 1 - test/.eslintrc | 4 +--- yarn.lock | 12 ------------ 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/package.json b/package.json index 5ed8cef2e..d4485f6c0 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,6 @@ "eslint-plugin-filenames": "^1.2.0", "eslint-plugin-import": "^2.20.1", "eslint-plugin-jest": "^25.2.2", - "eslint-plugin-mocha": "^5.0.0", "eslint-plugin-react": "^7.0.0", "eslint-plugin-react-hooks": "^4.2.0", "glob": "7.1.2", diff --git a/test/.eslintrc b/test/.eslintrc index 884869d2f..7098b82b2 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -1,10 +1,8 @@ { "extends": ["../.eslintrc.js"], - "env": { "mocha": true }, - "plugins": ["mocha"], + "env": { "jest": true }, "rules": { "react/sort-comp": "off", - "mocha/no-exclusive-tests": 2, "no-magic-numbers": 0, "max-statements": 0, "import/no-unresolved": 0 diff --git a/yarn.lock b/yarn.lock index b00db51ba..73adbf0e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8819,13 +8819,6 @@ eslint-plugin-jest@^25.2.2: dependencies: "@typescript-eslint/experimental-utils" "^5.0.0" -eslint-plugin-mocha@^5.0.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-5.3.0.tgz#cf3eb18ae0e44e433aef7159637095a7cb19b15b" - integrity sha512-3uwlJVLijjEmBeNyH60nzqgA1gacUWLUmcKV8PIGNvj1kwP/CTgAWQHn2ayyJVwziX+KETkr9opNwT1qD/RZ5A== - dependencies: - ramda "^0.26.1" - eslint-plugin-react-hooks@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz" @@ -15123,11 +15116,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -ramda@^0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" - integrity sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ== - ramda@^0.28.0: version "0.28.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.28.0.tgz#acd785690100337e8b063cab3470019be427cc97" From 22bbe739344107d77f2dca047d17a36eb8dc3dcc Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 13:42:13 -0700 Subject: [PATCH 09/13] Fix test lint rules --- test/.eslintrc | 3 ++- test/jest/victory-native/components.test.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/.eslintrc b/test/.eslintrc index 7098b82b2..d62a7dccd 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -5,7 +5,8 @@ "react/sort-comp": "off", "no-magic-numbers": 0, "max-statements": 0, - "import/no-unresolved": 0 + "import/no-unresolved": 0, + "no-undef": "off" }, "globals": { "expect": false } } diff --git a/test/jest/victory-native/components.test.js b/test/jest/victory-native/components.test.js index 54cd83799..e33ac6ace 100644 --- a/test/jest/victory-native/components.test.js +++ b/test/jest/victory-native/components.test.js @@ -51,7 +51,8 @@ describe("Default render", () => { if (message.includes("renderInPortal")) { return; } - return console.warn(message); + /* eslint-disable no-console */ + console.warn(message); }); }); From 24940677d65068675628b28c84ff7620f9fcd5b8 Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 13:47:51 -0700 Subject: [PATCH 10/13] Update contributing.md --- CONTRIBUTING.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b24705d9..c2cfcc6f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,32 +60,24 @@ $ lerna exec --scope victory-core -- yarn nps build-libs ## Checks, Tests -When running a development server, tests will be served automatically at http://localhost:3001/test/client/test.html - -Tests may also be run in the terminal with: +Tests can be run in the terminal with: ```sh # Build and run all tests. $ yarn nps test -# Run just Karma tests (packages must be already built). -$ yarn nps karma -$ KARMA_CAPTURE_CONSOLE=true yarn nps karma # Same, but enable console logging in CLI +# Run a watch script for tests and packages. +$ yarn nps test.watch ``` -If your terminal is under a proxy, you should turn off the proxy, or ChromeHeadless will not start properly. - -If you are debugging tests with Karma, it's usually easier to debug in a real browser. An example workflow: +You can also run the watch script in a separate terminal window to add arguments or isolate specific tests. ```sh # In one terminal run a watch on library files $ yarn nps watch -# In another terminal the browser Karma server -$ yarn nps server.test - -# Open a browser -$ open http://localhost:3001/test/client/test.html +# In another terminal the jest script +$ yarn nps "jest --watch" ``` Victory uses eslint and prettier to maintain code style consistency. Before creating a pull request, please lint and format your changes with the following commands: From 996779a8de0b0dc8bb30ec62195ec6de522783ba Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Wed, 1 Jun 2022 14:01:38 -0700 Subject: [PATCH 11/13] Remove istanbul and coverage config --- config/webpack/webpack.config.coverage.js | 23 --- package-scripts.js | 7 +- package.json | 2 - yarn.lock | 190 ++-------------------- 4 files changed, 16 insertions(+), 206 deletions(-) delete mode 100644 config/webpack/webpack.config.coverage.js diff --git a/config/webpack/webpack.config.coverage.js b/config/webpack/webpack.config.coverage.js deleted file mode 100644 index 278bcd61e..000000000 --- a/config/webpack/webpack.config.coverage.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -/** - * Webpack frontend test (w/ coverage) configuration. - */ -const _ = require("lodash"); -const testCfg = require("./webpack.config.test"); - -module.exports = _.merge({}, testCfg, { - module: { - rules: (testCfg.module.rules || []).concat([ - { - // Provide coverage only for our ESM output. - test: /\/es\/.*\.js$/, - exclude: /(test|node_modules)\//, - use: { - loader: require.resolve("istanbul-instrumenter-loader"), - options: { esModules: true } - }, - enforce: "post" - } - ]) - } -}); diff --git a/package-scripts.js b/package-scripts.js index 8e6e775df..51b0a4754 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -17,14 +17,17 @@ module.exports = { jest: { native: "jest --config=jest-native-config.js", default: "cross-env BABEL_ENV=commonjs jest --config=jest-config.js", - watch: "cross-env BABEL_ENV=commonjs jest --watch --config=jest-config.js" + watch: + "cross-env BABEL_ENV=commonjs jest --watch --config=jest-config.js", + cov: "cross-env BABEL_ENV=commonjs jest --coverage --config=jest-config.js" }, "test-node": { default: "jest ./test/node" }, test: { + cov: npsUtils.series.nps("build-package-libs", "jest.default"), watch: npsUtils.concurrent.nps("watch", "jest.watch"), - default: npsUtils.series.nps("build-package-libs", "jest.default") + default: npsUtils.series.nps("build-package-libs", "jest.cov") }, storybook: { server: "start-storybook -p 6006", diff --git a/package.json b/package.json index d4485f6c0..8504cbd05 100644 --- a/package.json +++ b/package.json @@ -94,8 +94,6 @@ "eslint-plugin-react-hooks": "^4.2.0", "glob": "7.1.2", "immutable": "^3.8.2", - "istanbul": "^0.4.5", - "istanbul-instrumenter-loader": "^3.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", "json-loader": "^0.5.4", diff --git a/yarn.lock b/yarn.lock index 73adbf0e6..71d4bb2c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4885,11 +4885,6 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abbrev@1.0.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== - abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -5036,16 +5031,6 @@ ajv-keywords@^5.0.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^5.0.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha512-Ajr4IcMXq/2QmMkEmSvxqfLN5zGmJ92gHXAeOXq1OekoH2rfDNsgdDoL2f7QaRCy7G/E6TpxBVdRuNraMztGHw== - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -5481,11 +5466,6 @@ async-retry@^1.3.3: dependencies: retry "0.13.1" -async@1.x: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== - async@^2.4.0: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" @@ -5569,20 +5549,6 @@ babel-eslint@^10.0.3: eslint-visitor-keys "^1.0.0" resolve "^1.12.0" -babel-generator@^6.18.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" @@ -6223,7 +6189,7 @@ babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: core-js "^2.4.0" regenerator-runtime "^0.11.0" -babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: +babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" integrity sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg== @@ -6234,7 +6200,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: +babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" integrity sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA== @@ -6249,7 +6215,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" integrity sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g== @@ -8207,13 +8173,6 @@ detab@2.0.4: dependencies: repeat-string "^1.5.4" -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" @@ -8723,18 +8682,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@1.8.x: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - escodegen@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" @@ -8949,11 +8896,6 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -esprima@2.7.x, esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= - esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -8973,11 +8915,6 @@ esrecurse@^4.1.0, esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= - estraverse@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" @@ -9220,11 +9157,6 @@ fake-tag@^2.0.0: resolved "https://registry.yarnpkg.com/fake-tag/-/fake-tag-2.0.0.tgz#08ea5df950ef8635833186247f569e8406ffb4da" integrity sha512-QDz+8qiNQ9AfBZ31EXlID5JIbUkU3e1nXDWk4tidFzd2gy8XJaEUW1HCuDY6DUy6t2Y0nvhD6PsUc+2WYy5w0w== -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" @@ -9989,17 +9921,6 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^5.0.15: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^6.0.1: version "6.0.4" resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" @@ -10123,7 +10044,7 @@ handle-thing@^2.0.0: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== -handlebars@^4.0.1, handlebars@^4.7.6, handlebars@^4.7.7: +handlebars@^4.7.6, handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -11332,39 +11253,11 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -istanbul-instrumenter-loader@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz#9957bd59252b373fae5c52b7b5188e6fde2a0949" - integrity sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w== - dependencies: - convert-source-map "^1.5.0" - istanbul-lib-instrument "^1.7.3" - loader-utils "^1.1.0" - schema-utils "^0.3.0" - -istanbul-lib-coverage@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" - integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== - istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== -istanbul-lib-instrument@^1.7.3: - version "1.10.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" - integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.1" - semver "^5.3.0" - istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz#31d18bdd127f825dd02ea7bfdfd906f8ab840e9f" @@ -11402,26 +11295,6 @@ istanbul-reports@^3.1.3, istanbul-reports@^3.1.4: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -istanbul@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" - integrity sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs= - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.8.x" - esprima "2.7.x" - glob "^5.0.15" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" - iterate-iterator@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.2.tgz#551b804c9eaa15b847ea6a7cdc2f5bf1ec150f91" @@ -11948,7 +11821,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@3.x, js-yaml@^3.13.1, js-yaml@^3.9.0: +js-yaml@^3.13.1, js-yaml@^3.9.0: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -11999,11 +11872,6 @@ jsdom@^19.0.0: ws "^8.2.3" xml-name-validator "^4.0.0" -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -12029,11 +11897,6 @@ json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -12342,7 +12205,7 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== -loader-utils@^1.1.0, loader-utils@^1.2.3: +loader-utils@^1.2.3: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== @@ -13356,7 +13219,7 @@ mkdirp@*, mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -13666,13 +13529,6 @@ node-stream-zip@^1.9.1: resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.15.0.tgz#158adb88ed8004c6c49a396b50a6a5de3bca33ea" integrity sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw== -nopt@3.x: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= - dependencies: - abbrev "1" - nopt@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" @@ -14024,7 +13880,7 @@ on-headers@~1.0.2: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -15905,11 +15761,6 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@1.1.x: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.3.2, resolve@^1.9.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" @@ -16102,13 +15953,6 @@ schema-utils@2.7.0: ajv "^6.12.2" ajv-keywords "^3.4.1" -schema-utils@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" - integrity sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8= - dependencies: - ajv "^5.0.0" - schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" @@ -16168,7 +16012,7 @@ selfsigned@^2.0.1: dependencies: node-forge "^1" -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -16583,13 +16427,6 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= - dependencies: - amdefine ">=0.0.4" - source-map@~0.8.0-beta.0: version "0.8.0-beta.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11" @@ -17148,7 +16985,7 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^3.1.0, supports-color@^3.2.3: +supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= @@ -17620,11 +17457,6 @@ trim-newlines@^3.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - trim-trailing-lines@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz#bd4abbec7cc880462f10b2c8b5ce1d8d1ec7c2c0" @@ -18625,7 +18457,7 @@ which-typed-array@^1.1.2: has-tostringtag "^1.0.0" is-typed-array "^1.1.9" -which@^1.1.1, which@^1.2.9, which@^1.3.1: +which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== From 66e928f9be3cb7ee3c8bd2c670d2f4e7a972d309 Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Thu, 2 Jun 2022 12:54:20 -0700 Subject: [PATCH 12/13] Add test disclaimers --- packages/victory-core/src/victory-util/add-events.js | 5 +++++ packages/victory-shared-events/src/victory-shared-events.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/packages/victory-core/src/victory-util/add-events.js b/packages/victory-core/src/victory-util/add-events.js index 76a2e0a79..0f20b5931 100644 --- a/packages/victory-core/src/victory-util/add-events.js +++ b/packages/victory-core/src/victory-util/add-events.js @@ -15,6 +15,11 @@ import * as Events from "./events"; import isEqual from "react-fast-compare"; import VictoryTransition from "../victory-transition/victory-transition"; +// DISCLAIMER: +// This file is not currently tested, and it is first on the list of files +// to refactor in our current refactoring effort. Please do not make changes +// to this file without manual testing and/or refactoring and adding tests. + const datumHasXandY = (datum) => { return !isNil(datum._x) && !isNil(datum._y); }; diff --git a/packages/victory-shared-events/src/victory-shared-events.js b/packages/victory-shared-events/src/victory-shared-events.js index c110269ef..a3748f566 100644 --- a/packages/victory-shared-events/src/victory-shared-events.js +++ b/packages/victory-shared-events/src/victory-shared-events.js @@ -19,6 +19,11 @@ import { import isEqual from "react-fast-compare"; import stringify from "json-stringify-safe"; +// DISCLAIMER: +// This file is not currently tested, and it is first on the list of files +// to refactor in our current refactoring effort. Please do not make changes +// to this file without manual testing and/or refactoring and adding tests. + export default class VictorySharedEvents extends React.Component { static displayName = "VictorySharedEvents"; From d306d4d262c46f0110d0831794b0557aaa6effaf Mon Sep 17 00:00:00 2001 From: Becca Bailey Date: Thu, 2 Jun 2022 12:54:40 -0700 Subject: [PATCH 13/13] Delete setup file --- test/node/setup.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test/node/setup.js diff --git a/test/node/setup.js b/test/node/setup.js deleted file mode 100644 index f369ef1ec..000000000 --- a/test/node/setup.js +++ /dev/null @@ -1 +0,0 @@ -global.expect = expect; // eslint-disable-line no-undef