diff --git a/.babelrc.js b/babel.config.js similarity index 100% rename from .babelrc.js rename to babel.config.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..51267065e --- /dev/null +++ b/jest.config.js @@ -0,0 +1,17 @@ +module.exports = { + roots: ["./test"], + setupFiles: ["/test/text_encoder.js"], + setupFilesAfterEnv: ["/test/index.js"], + testEnvironment: "jest-environment-jsdom", + collectCoverageFrom: [ + "**/*.{js,jsx}", + "!**/node_modules/**", + "!**/vendor/**", + ], + transformIgnorePatterns: ["/node_modules/(?!(@popperjs)|date-fns)"], + transform: { + "^.+\\.(js|jsx)$": "babel-jest", + "^.+\\.ts?$": "ts-jest", + "node_modules/(?!date-fns/.*)": "ts-jest", + }, +}; diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index 593e1877f..000000000 --- a/karma.conf.js +++ /dev/null @@ -1,68 +0,0 @@ -// Karma configuration -const path = require("path"); - -module.exports = function (config) { - config.set({ - frameworks: ["mocha", "sinon", "chai"], - - browsers: ["FirefoxHeadless"], - - files: ["test/index.js"], - - preprocessors: { - "test/index.js": ["webpack", "sourcemap"], - }, - - reporters: ["mocha", "coverage"], - - webpack: { - mode: "development", - devtool: "inline-source-map", - module: { - rules: [ - { - test: /\.jsx?$/, - exclude: /node_modules/, - loader: "babel-loader", - options: { - presets: ["airbnb"], - }, - }, - { - test: /\.jsx?$/, - include: path.resolve(__dirname, "src"), - loader: "istanbul-instrumenter-loader", - enforce: "post", - options: { esModules: true }, - }, - { - test: /\.scss$/, - include: path.resolve(__dirname, "src", "stylesheets"), - use: ["style-loader", "css-loader", "sass-loader"], - }, - ], - }, - resolve: { - extensions: [".jsx", ".js"], - }, - externals: { - cheerio: "window", - "react/addons": true, - "react/lib/ExecutionEnvironment": true, - "react/lib/ReactContext": true, - }, - }, - - coverageReporter: { - reporters: [ - { type: "text-summary" }, - { type: "html", dir: "coverage/" }, - { type: "lcov" }, - ], - }, - - webpackServer: { - noInfo: true, - }, - }); -}; diff --git a/package.json b/package.json index 320651d49..bb546ef57 100644 --- a/package.json +++ b/package.json @@ -40,15 +40,17 @@ "@babel/helpers": "^7.22.6", "@babel/plugin-external-helpers": "^7.22.5", "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/preset-env": "^7.22.7", + "@babel/preset-env": "^7.22.10", "@babel/preset-react": "^7.22.5", + "@testing-library/react": "^14.0.0", + "@types/jest": "^29.5.4", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "axe-core": "^4.4.1", + "babel-jest": "^29.6.4", "babel-loader": "^9.1.3", "babel-plugin-react-transform": "^3.0.0", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "babel-preset-airbnb": "^5.0.0", - "chai": "^4.2.0", "codecov": "^3.5.0", "core-js": "^3.29.1", "css-loader": "^6.8.1", @@ -63,17 +65,9 @@ "highlight.js": "^11.0.1", "husky": "8", "istanbul-instrumenter-loader": "^3.0.1", - "karma": "^6.4.2", - "karma-chai": "^0.1.0", - "karma-coverage": "^2.2.1", - "karma-firefox-launcher": "^2.1.2", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-sinon": "^1.0.5", - "karma-sourcemap-loader": "^0.4.0", - "karma-webpack": "^5.0.0", + "jest": "^29.6.4", + "jest-environment-jsdom": "^29.6.4", "lint-staged": "^14.0.1", - "mocha": "^10.0.0", "prettier": "^3.0.0", "react": "^18.2.0", "react-docgen": "^5.3.0", @@ -92,13 +86,13 @@ "rollup-plugin-uglify": "^6.0.4", "sass": "1.66.1", "sass-loader": "^13.3.2", - "sinon": "^15.0.3", "slugify": "^1.6.6", "style-loader": "^3.3.3", "stylelint": "^15.10.1", "stylelint-config-standard": "^34.0.0", "stylelint-config-standard-scss": "^10.0.0", "stylelint-scss": "^5.0.1", + "ts-jest": "^29.1.1", "webpack": "^5.88", "webpack-cli": "^5.1", "webpack-dev-middleware": "^6.1.1", @@ -124,9 +118,9 @@ "lint": "yarn run eslint && yarn run sass-lint", "prettier": "prettier --write '**/*.{js,jsx}'", "start": "yarn --cwd docs-site install && yarn --cwd docs-site start", - "test": "NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=test karma start karma.conf.js --single-run", - "test:ci": "NODE_ENV=test karma start karma.conf.js --single-run", - "test:watch": "NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=test karma start karma.conf.js --watch", + "test": "NODE_ENV=test jest", + "test:ci": "NODE_ENV=test jest --ci", + "test:watch": "NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=test jest --watch", "build": "NODE_ENV=production yarn run build:js && NODE_ENV=production yarn run css:prod && NODE_ENV=production yarn run css:modules:dev && NODE_ENV=production yarn run css:dev && NODE_ENV=production yarn run css:modules:dev", "build-dev": "NODE_ENV=development yarn run js:dev && NODE_ENV=development yarn run css:dev && NODE_ENV=development yarn run css:modules:dev", "css:prod": "sass --style compressed src/stylesheets/datepicker.scss > dist/react-datepicker.min.css", diff --git a/src/day.jsx b/src/day.jsx index 57cfacf9b..7efb85faf 100644 --- a/src/day.jsx +++ b/src/day.jsx @@ -44,7 +44,7 @@ export default class Day extends React.Component { handleOnKeyDown: PropTypes.func, containerRef: PropTypes.oneOfType([ PropTypes.func, - PropTypes.shape({ current: PropTypes.instanceOf(Element) }), + PropTypes.shape({ current: PropTypes.object }), ]), monthShowsDuplicateDaysEnd: PropTypes.bool, monthShowsDuplicateDaysStart: PropTypes.bool, @@ -275,7 +275,7 @@ export default class Day extends React.Component { this.isAfterMonth() || this.isBeforeMonth(), }, this.getHighLightedClass("react-datepicker__day--highlighted"), - this.getHolidaysClass() + this.getHolidaysClass(), ); }; @@ -359,7 +359,7 @@ export default class Day extends React.Component { } } - shouldFocusDay && this.dayEl.current.focus({ preventScroll: true }); + shouldFocusDay && this.dayEl.current?.focus({ preventScroll: true }); }; renderDayContents = () => { diff --git a/src/month.jsx b/src/month.jsx index caada9246..488825da4 100644 --- a/src/month.jsx +++ b/src/month.jsx @@ -45,7 +45,7 @@ const MONTH_NAVIGATION_HORIZONTAL_OFFSET = 1; function getMonthColumnsLayout( showFourColumnMonthYearPicker, - showTwoColumnMonthYearPicker + showTwoColumnMonthYearPicker, ) { if (showFourColumnMonthYearPicker) return MONTH_COLUMNS_LAYOUT.FOUR_COLUMNS; if (showTwoColumnMonthYearPicker) return MONTH_COLUMNS_LAYOUT.TWO_COLUMNS; @@ -68,7 +68,7 @@ export default class Month extends React.Component { PropTypes.shape({ start: PropTypes.instanceOf(Date), end: PropTypes.instanceOf(Date), - }) + }), ), filterDate: PropTypes.func, fixedHeight: PropTypes.bool, @@ -116,7 +116,7 @@ export default class Month extends React.Component { weekAriaLabelPrefix: PropTypes.string, containerRef: PropTypes.oneOfType([ PropTypes.func, - PropTypes.shape({ current: PropTypes.instanceOf(Element) }), + PropTypes.shape({ current: PropTypes.object }), ]), monthShowsDuplicateDaysEnd: PropTypes.bool, monthShowsDuplicateDaysStart: PropTypes.bool, @@ -294,7 +294,7 @@ export default class Month extends React.Component { let currentWeekStart = utils.getStartOfWeek( utils.getStartOfMonth(this.props.day), this.props.locale, - this.props.calendarStartDay + this.props.calendarStartDay, ); while (true) { @@ -343,7 +343,7 @@ export default class Month extends React.Component { calendarStartDay={this.props.calendarStartDay} monthShowsDuplicateDaysEnd={this.props.monthShowsDuplicateDaysEnd} monthShowsDuplicateDaysStart={this.props.monthShowsDuplicateDaysStart} - /> + />, ); if (breakAfterNextPush) break; @@ -373,13 +373,13 @@ export default class Month extends React.Component { onMonthClick = (e, m) => { this.handleDayClick( utils.getStartOfMonth(utils.setMonth(this.props.day, m)), - e + e, ); }; onMonthMouseEnter = (m) => { this.handleDayMouseEnter( - utils.getStartOfMonth(utils.setMonth(this.props.day, m)) + utils.getStartOfMonth(utils.setMonth(this.props.day, m)), ); }; @@ -407,7 +407,7 @@ export default class Month extends React.Component { if (!disabledKeyboardNavigation) { const monthColumnsLayout = getMonthColumnsLayout( showFourColumnMonthYearPicker, - showTwoColumnMonthYearPicker + showTwoColumnMonthYearPicker, ); const verticalOffset = MONTH_COLUMNS[monthColumnsLayout].verticalNavigationOffset; @@ -420,13 +420,13 @@ export default class Month extends React.Component { case "ArrowRight": this.handleMonthNavigation( month === 11 ? 0 : month + MONTH_NAVIGATION_HORIZONTAL_OFFSET, - utils.addMonths(preSelection, MONTH_NAVIGATION_HORIZONTAL_OFFSET) + utils.addMonths(preSelection, MONTH_NAVIGATION_HORIZONTAL_OFFSET), ); break; case "ArrowLeft": this.handleMonthNavigation( month === 0 ? 11 : month - MONTH_NAVIGATION_HORIZONTAL_OFFSET, - utils.subMonths(preSelection, MONTH_NAVIGATION_HORIZONTAL_OFFSET) + utils.subMonths(preSelection, MONTH_NAVIGATION_HORIZONTAL_OFFSET), ); break; case "ArrowUp": @@ -435,7 +435,7 @@ export default class Month extends React.Component { monthsGrid[0].includes(month) ? month + 12 - verticalOffset : month - verticalOffset, - utils.subMonths(preSelection, verticalOffset) + utils.subMonths(preSelection, verticalOffset), ); break; case "ArrowDown": @@ -444,7 +444,7 @@ export default class Month extends React.Component { monthsGrid[monthsGrid.length - 1].includes(month) ? month - 12 + verticalOffset : month + verticalOffset, - utils.addMonths(preSelection, verticalOffset) + utils.addMonths(preSelection, verticalOffset), ); break; } @@ -454,13 +454,13 @@ export default class Month extends React.Component { onQuarterClick = (e, q) => { this.handleDayClick( utils.getStartOfQuarter(utils.setQuarter(this.props.day, q)), - e + e, ); }; onQuarterMouseEnter = (q) => { this.handleDayMouseEnter( - utils.getStartOfQuarter(utils.setQuarter(this.props.day, q)) + utils.getStartOfQuarter(utils.setQuarter(this.props.day, q)), ); }; @@ -482,13 +482,13 @@ export default class Month extends React.Component { case "ArrowRight": this.handleQuarterNavigation( quarter === 4 ? 1 : quarter + 1, - utils.addQuarters(this.props.preSelection, 1) + utils.addQuarters(this.props.preSelection, 1), ); break; case "ArrowLeft": this.handleQuarterNavigation( quarter === 1 ? 4 : quarter - 1, - utils.subQuarters(this.props.preSelection, 1) + utils.subQuarters(this.props.preSelection, 1), ); break; } @@ -523,7 +523,7 @@ export default class Month extends React.Component { "react-datepicker__month-text--selected": this.isSelectedMonth( day, m, - selected + selected, ), "react-datepicker__month-text--keyboard-selected": !this.props.disabledKeyboardNavigation && @@ -534,7 +534,7 @@ export default class Month extends React.Component { startDate, endDate, m, - day + day, ), "react-datepicker__month-text--range-start": this.isRangeStartMonth(m), "react-datepicker__month-text--range-end": this.isRangeEndMonth(m), @@ -543,7 +543,7 @@ export default class Month extends React.Component { "react-datepicker__month-text--selecting-range-end": this.isSelectingMonthRangeEnd(m), "react-datepicker__month-text--today": this.isCurrentMonth(day, m), - } + }, ); }; @@ -603,7 +603,7 @@ export default class Month extends React.Component { "react-datepicker__quarter-text--selected": this.isSelectedQuarter( day, q, - selected + selected, ), "react-datepicker__quarter-text--keyboard-selected": utils.getQuarter(preSelection) === q, @@ -613,12 +613,12 @@ export default class Month extends React.Component { startDate, endDate, q, - day + day, ), "react-datepicker__quarter-text--range-start": this.isRangeStartQuarter(q), "react-datepicker__quarter-text--range-end": this.isRangeEndQuarter(q), - } + }, ); }; @@ -652,7 +652,7 @@ export default class Month extends React.Component { MONTH_COLUMNS[ getMonthColumnsLayout( showFourColumnMonthYearPicker, - showTwoColumnMonthYearPicker + showTwoColumnMonthYearPicker, ) ].grid; return monthColumns.map((month, i) => ( @@ -727,7 +727,7 @@ export default class Month extends React.Component { selectingDate && (selectsStart || selectsEnd), }, { "react-datepicker__monthPicker": showMonthYearPicker }, - { "react-datepicker__quarterPicker": showQuarterYearPicker } + { "react-datepicker__quarterPicker": showQuarterYearPicker }, ); }; diff --git a/src/week.jsx b/src/week.jsx index b04f173d5..08987c77d 100644 --- a/src/week.jsx +++ b/src/week.jsx @@ -23,7 +23,7 @@ export default class Week extends React.Component { PropTypes.shape({ start: PropTypes.instanceOf(Date), end: PropTypes.instanceOf(Date), - }) + }), ), filterDate: PropTypes.func, formatWeekNumber: PropTypes.func, @@ -60,7 +60,7 @@ export default class Week extends React.Component { isInputFocused: PropTypes.bool, containerRef: PropTypes.oneOfType([ PropTypes.func, - PropTypes.shape({ current: PropTypes.instanceOf(Element) }), + PropTypes.shape({ current: PropTypes.object }), ]), monthShowsDuplicateDaysEnd: PropTypes.bool, monthShowsDuplicateDaysStart: PropTypes.bool, @@ -112,7 +112,7 @@ export default class Week extends React.Component { weekNumber={weekNumber} onClick={onClickAction} ariaLabelPrefix={this.props.ariaLabelPrefix} - /> + />, ); } return days.concat( @@ -160,7 +160,7 @@ export default class Week extends React.Component { locale={this.props.locale} /> ); - }) + }), ); }; diff --git a/test/.eslintrc b/test/.eslintrc index c5a855ab6..8b0a3e25f 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -1,14 +1,10 @@ { - "env": { - "mocha": true - }, + "env": {}, "rules": { "no-unused-expressions": 0 }, "globals": { - "assert": true, "describe": true, - "expect": true, - "sinon": true + "expect": true } } diff --git a/test/calendar_test.js b/test/calendar_test.test.js similarity index 73% rename from test/calendar_test.js rename to test/calendar_test.test.js index 7eceab0be..7a10d0519 100644 --- a/test/calendar_test.js +++ b/test/calendar_test.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import React from "react"; import Calendar from "../src/calendar"; import Month from "../src/month"; @@ -9,7 +13,6 @@ import MonthDropdown from "../src/month_dropdown"; import MonthYearDropdown from "../src/month_year_dropdown"; import DatePicker from "../src/index.jsx"; import { shallow, mount } from "enzyme"; -import sinon from "sinon"; import * as utils from "../src/date_utils"; import eo from "date-fns/locale/eo"; import fi from "date-fns/locale/fi"; @@ -18,7 +21,7 @@ import { isSunday } from "date-fns"; // TODO Possibly rename const DATE_FORMAT = "MM/dd/yyyy"; -describe("Calendar", function () { +describe("Calendar", () => { const dateFormat = "MMMM yyyy"; utils.registerLocale("fi", fi); @@ -31,140 +34,141 @@ describe("Calendar", function () { hideCalendar={() => {}} dropdownMode="scroll" {...extraProps} - /> + />, ); } - it("should start with the current date in view if no date range", function () { + it("should start with the current date in view if no date range", () => { const now = utils.newDate(); const calendar = getCalendar(); - assert(utils.isSameDay(calendar.state().date, now)); + expect(utils.isSameDay(calendar.date, now)); }); - it("should start with the selected date in view if provided", function () { + it("should start with the selected date in view if provided", () => { const selected = utils.addYears(utils.newDate(), 1); const calendar = getCalendar({ selected }); - assert(utils.isSameDay(calendar.state().date, selected)); + expect(utils.isSameDay(calendar.date, selected)); }); - it("should start with the pre-selected date in view if provided", function () { + it("should start with the pre-selected date in view if provided", () => { const preSelected = utils.addYears(utils.newDate(), 2); const selected = utils.addYears(utils.newDate(), 1); const calendar = getCalendar({ preSelected, selected }); - assert(utils.isSameDay(calendar.state().date, selected)); + expect(utils.isSameDay(calendar.date, selected)); }); - it("should start with the current date in view if in date range", function () { + it("should start with the current date in view if in date range", () => { const now = utils.newDate(); const minDate = utils.subYears(now, 1); const maxDate = utils.addYears(now, 1); const calendar = getCalendar({ minDate, maxDate }); - assert(utils.isSameDay(calendar.state().date, now)); + expect(utils.isSameDay(calendar.date, now)); }); - it("should start with the min date in view if after the current date", function () { + it("should start with the min date in view if after the current date", () => { const minDate = utils.addYears(utils.newDate(), 1); const calendar = getCalendar({ minDate }); - assert(utils.isSameDay(calendar.state().date, minDate)); + expect(utils.isSameDay(calendar.date, minDate)); }); - it("should start with the min include date in view if after the current date", function () { + it("should start with the min include date in view if after the current date", () => { const minDate = utils.addYears(utils.newDate(), 1); const calendar = getCalendar({ includeDates: [minDate] }); - assert(utils.isSameDay(calendar.state().date, minDate)); + expect(utils.isSameDay(calendar.date, minDate)); }); - it("should start with the max date in view if before the current date", function () { + it("should start with the max date in view if before the current date", () => { const maxDate = utils.subYears(utils.newDate(), 1); const calendar = getCalendar({ maxDate }); - assert(utils.isSameDay(calendar.state().date, maxDate)); + expect(utils.isSameDay(calendar.date, maxDate)); }); - it("should start with the max include date in view if before the current date", function () { + it("should start with the max include date in view if before the current date", () => { const maxDate = utils.subYears(utils.newDate(), 1); const calendar = getCalendar({ includeDates: [maxDate] }); - assert(utils.isSameDay(calendar.state().date, maxDate)); + expect(utils.isSameDay(calendar.date, maxDate)); }); - it("should start with the open to date in view if given and no selected/min/max dates given", function () { + it("should start with the open to date in view if given and no selected/min/max dates given", () => { const openToDate = utils.parseDate("09/28/1993", DATE_FORMAT); const calendar = getCalendar({ openToDate }); - assert(utils.isSameDay(calendar.state().date, openToDate)); + expect(utils.isSameDay(calendar.date, openToDate)); }); - it("should start with the open to date in view if given and after a min date", function () { + it("should start with the open to date in view if given and after a min date", () => { const openToDate = utils.parseDate("09/28/1993", DATE_FORMAT); const minDate = utils.parseDate("01/01/1993", DATE_FORMAT); const calendar = getCalendar({ openToDate, minDate }); - assert(utils.isSameDay(calendar.state().date, openToDate)); + expect(utils.isSameDay(calendar.date, openToDate)); }); - it("should start with the open to date in view if given and before a max date", function () { + it("should start with the open to date in view if given and before a max date", () => { const openToDate = utils.parseDate("09/28/1993", DATE_FORMAT); const maxDate = utils.parseDate("12/31/1993", DATE_FORMAT); const calendar = getCalendar({ openToDate, maxDate }); - assert(utils.isSameDay(calendar.state().date, openToDate)); + expect(utils.isSameDay(calendar.date, openToDate)); }); - it("should start with the open to date in view if given and in range of the min/max dates", function () { + it("should start with the open to date in view if given and in range of the min/max dates", () => { const openToDate = utils.parseDate("09/28/1993", DATE_FORMAT); const minDate = utils.parseDate("01/01/1993", DATE_FORMAT); const maxDate = utils.parseDate("12/31/1993", DATE_FORMAT); const calendar = getCalendar({ openToDate, minDate, maxDate }); - assert(utils.isSameDay(calendar.state().date, openToDate)); + expect(utils.isSameDay(calendar.date, openToDate)); }); - it("should open on openToDate date rather than selected date when both are specified", function () { + it("should open on openToDate date rather than selected date when both are specified", () => { var openToDate = utils.parseDate("09/28/1993", DATE_FORMAT); var selected = utils.parseDate("09/28/1995", DATE_FORMAT); var calendar = getCalendar({ openToDate, selected }); - assert(utils.isSameDay(calendar.state().date, openToDate)); + expect(utils.isSameDay(calendar.date, openToDate)); }); it("should trigger date change when openToDate prop is set after calcInitialState()", () => { - const openToDate = utils.parseDate("09/28/1993", DATE_FORMAT); + let openToDate = utils.parseDate("09/28/1993", DATE_FORMAT); const oneMonthFromOpenToDate = utils.parseDate("10/28/1993", DATE_FORMAT); const calendar = getCalendar({ openToDate }); - assert(utils.isSameDay(calendar.state().date, openToDate)); + expect(utils.isSameDay(calendar.date, openToDate)); + // openToDate = oneMonthFromOpenToDate calendar.setProps({ openToDate: oneMonthFromOpenToDate }); - assert(utils.isSameDay(calendar.state().date, oneMonthFromOpenToDate)); + expect(utils.isSameDay(calendar.date, oneMonthFromOpenToDate)); }); - it("should not show the year dropdown menu by default", function () { + it("should not show the year dropdown menu by default", () => { const calendar = getCalendar(); const yearReadView = calendar.find(YearDropdown); - expect(yearReadView).to.have.length(0); + expect(yearReadView).toHaveLength(0); }); - it("should show the year dropdown menu if toggled on", function () { + it("should show the year dropdown menu if toggled on", () => { const calendar = getCalendar({ showYearDropdown: true }); const yearReadView = calendar.find(YearDropdown); - expect(yearReadView).to.have.length(1); + expect(yearReadView).toHaveLength(1); }); - it("should show only one year dropdown menu if toggled on and multiple month mode on", function () { + it("should show only one year dropdown menu if toggled on and multiple month mode on", () => { const calendar = getCalendar({ showYearDropdown: true, monthsShown: 2 }); const monthReadView = calendar.find(YearDropdown); - expect(monthReadView).to.have.length(1); + expect(monthReadView).toHaveLength(1); }); - it("should show month navigation if toggled on", function () { + it("should show month navigation if toggled on", () => { const calendar = getCalendar({ includeDates: [utils.newDate()], forceShowMonthNavigation: true, }); const nextNavigationButton = calendar.find( - ".react-datepicker__navigation--next" + ".react-datepicker__navigation--next", ); - expect(nextNavigationButton).to.have.length(1); + expect(nextNavigationButton).toHaveLength(1); }); - it("should correctly format weekday using formatWeekDay prop", function () { + it("should correctly format weekday using formatWeekDay prop", () => { const calendar = getCalendar({ formatWeekDay: (day) => day[0] }); calendar .find(".react-datepicker__day-name") - .forEach((dayName) => expect(dayName.text()).to.have.length(1)); + .forEach((dayName) => expect(dayName.text()).toHaveLength(1)); }); it("should contain the correct class when using the weekDayClassName prop", () => { @@ -177,11 +181,11 @@ describe("Calendar", function () { onClickOutside={() => {}} onSelect={() => {}} weekDayClassName={func} - /> + />, ); const sunday = calendar.find(".react-datepicker__day-name.sunday"); - expect(sunday).to.have.length(1); + expect(sunday).toHaveLength(1); }); it("should render the months correctly adjusted by monthSelectedIn", () => { @@ -189,7 +193,7 @@ describe("Calendar", function () { const calendar = getCalendar({ inline: true, monthsShown: 2, selected }); calendar.setProps({ monthSelectedIn: 1 }, () => { const renderedMonths = calendar.find(Month); - assert.equal(utils.getMonth(renderedMonths.first().prop("day")), 9); + expect(utils.getMonth(renderedMonths.first().prop("day"))).toEqual(9); }); }); @@ -202,8 +206,8 @@ describe("Calendar", function () { .find(".react-datepicker__navigation--next") .prop("aria-label"); - expect(previousButtonAriaLabel).to.equal("Previous Month"); - expect(nextButtonAriaLabel).to.equal("Next Month"); + expect(previousButtonAriaLabel).toBe("Previous Month"); + expect(nextButtonAriaLabel).toBe("Next Month"); }); it("should render by default aria labels for next and prev months button equal to the next and prev buttons text", () => { @@ -221,8 +225,8 @@ describe("Calendar", function () { .find(".react-datepicker__navigation--next") .prop("aria-label"); - expect(previousButtonAriaLabel).to.equal(previousMonthButtonLabel); - expect(nextButtonAriaLabel).to.equal(nextMonthButtonLabel); + expect(previousButtonAriaLabel).toBe(previousMonthButtonLabel); + expect(nextButtonAriaLabel).toBe(nextMonthButtonLabel); }); it("should allow user to pass a custom aria label for next and/or previous month button", () => { @@ -242,8 +246,8 @@ describe("Calendar", function () { .find(".react-datepicker__navigation--next") .prop("aria-label"); - expect(previousButtonAriaLabel).to.equal(previousButtonAriaLabel); - expect(nextButtonAriaLabel).to.equal(nextButtonAriaLabel); + expect(previousButtonAriaLabel).toBe(previousButtonAriaLabel); + expect(nextButtonAriaLabel).toBe(nextButtonAriaLabel); }); it("should render the correct default aria labels for next and prev year buttons", () => { @@ -255,8 +259,8 @@ describe("Calendar", function () { .find(".react-datepicker__navigation--next") .prop("aria-label"); - expect(previousButtonAriaLabel).to.equal("Previous Year"); - expect(nextButtonAriaLabel).to.equal("Next Year"); + expect(previousButtonAriaLabel).toBe("Previous Year"); + expect(nextButtonAriaLabel).toBe("Next Year"); }); it("should render by default aria labels for next and prev year buttons equal to the next and prev buttons text", () => { @@ -275,8 +279,8 @@ describe("Calendar", function () { .find(".react-datepicker__navigation--next") .prop("aria-label"); - expect(previousButtonAriaLabel).to.equal(previousYearButtonLabel); - expect(nextButtonAriaLabel).to.equal(nextYearButtonLabel); + expect(previousButtonAriaLabel).toBe(previousYearButtonLabel); + expect(nextButtonAriaLabel).toBe(nextYearButtonLabel); }); it("should allow user to pass a custom aria label for next and/or previous year button", () => { @@ -297,11 +301,11 @@ describe("Calendar", function () { .find(".react-datepicker__navigation--next") .prop("aria-label"); - expect(previousButtonAriaLabel).to.equal(previousYearAriaLabel); - expect(nextButtonAriaLabel).to.equal(nextYearAriaLabel); + expect(previousButtonAriaLabel).toBe(previousYearAriaLabel); + expect(nextButtonAriaLabel).toBe(nextYearAriaLabel); }); - describe("custom header", function () { + describe("custom header", () => { const months = [ "January", "February", @@ -373,127 +377,135 @@ describe("Calendar", function () { ); }; - it("should call render custom header function and returns parameters", function () { - const renderCustomHeader = sinon.spy(); + it("should call render custom header function and returns parameters", () => { + const renderCustomHeader = jest.fn(); getCalendar({ renderCustomHeader }); const match = { - customHeaderCount: 0, - changeMonth: sinon.match.func, - changeYear: sinon.match.func, - date: sinon.match.instanceOf(Date), - decreaseMonth: sinon.match.func, - increaseMonth: sinon.match.func, - nextMonthButtonDisabled: sinon.match.bool, - prevMonthButtonDisabled: sinon.match.bool, + customHeaderCount: expect.any(Number), + changeMonth: expect.any(Function), + changeYear: expect.any(Function), + date: expect.any(Date), + decreaseMonth: expect.any(Function), + increaseMonth: expect.any(Function), + decreaseYear: expect.any(Function), + increaseYear: expect.any(Function), + nextMonthButtonDisabled: expect.any(Boolean), + prevMonthButtonDisabled: expect.any(Boolean), + nextYearButtonDisabled: expect.any(Boolean), + prevYearButtonDisabled: expect.any(Boolean), + isRenderAriaLiveMessage: expect.any(Boolean), + monthContainer: null, + monthDate: expect.any(Date), + selectingDate: null, }; - expect(renderCustomHeader.calledWithMatch(match)).to.be.true; + expect(renderCustomHeader).toHaveBeenCalledWith(match); }); - it("should render only custom header", function () { + it("should render only custom header", () => { const calendar = getCalendar({ renderCustomHeader }); const nextMontButton = calendar.find( - ".react-datepicker__navigation--next" + ".react-datepicker__navigation--next", ); const prevMontButton = calendar.find( - ".react-datepicker__navigation--previous" + ".react-datepicker__navigation--previous", ); - expect(nextMontButton).to.have.length(0); - expect(prevMontButton).to.have.length(0); + expect(nextMontButton).toHaveLength(0); + expect(prevMontButton).toHaveLength(0); }); - it("should render custom header with selects and buttons", function () { + it("should render custom header with selects and buttons", () => { const calendar = getCalendar({ renderCustomHeader, }); - expect(calendar.find(".react-datepicker__header--custom")).to.have.length( - 1 + expect(calendar.find(".react-datepicker__header--custom")).toHaveLength( + 1, ); - expect(calendar.find(".custom-header")).to.have.length(1); + expect(calendar.find(".custom-header")).toHaveLength(1); const yearSelect = calendar.find(".year-select"); const monthSelect = calendar.find(".month-select"); const prevMonth = calendar.find(".prevMonth"); const nextMonth = calendar.find(".nextMonth"); - expect(yearSelect).to.have.length(1); - expect(monthSelect).to.have.length(1); - expect(prevMonth).to.have.length(1); - expect(nextMonth).to.have.length(1); + expect(yearSelect).toHaveLength(1); + expect(monthSelect).toHaveLength(1); + expect(prevMonth).toHaveLength(1); + expect(nextMonth).toHaveLength(1); }); - it("should render custom header when showing year picker", function () { + it("should render custom header when showing year picker", () => { const calendar = getCalendar({ renderCustomHeader, showYearPicker: true, }); - expect(calendar.find(".react-datepicker__header--custom")).to.have.length( - 1 + expect(calendar.find(".react-datepicker__header--custom")).toHaveLength( + 1, ); - expect( - calendar.find(".react-datepicker__year--container") - ).to.have.length(1); + expect(calendar.find(".react-datepicker__year--container")).toHaveLength( + 1, + ); }); - it("should render day names with renderCustomHeader", function () { + it("should render day names with renderCustomHeader", () => { const calendar = getCalendar({ renderCustomHeader, }); - expect(calendar.find(".react-datepicker__header--custom")).to.have.length( - 1 + expect(calendar.find(".react-datepicker__header--custom")).toHaveLength( + 1, ); - expect(calendar.find(".react-datepicker__day-names")).to.have.length(1); + expect(calendar.find(".react-datepicker__day-names")).toHaveLength(1); }); - it("should not render day names with renderCustomHeader & showMonthYearPicker", function () { + it("should not render day names with renderCustomHeader & showMonthYearPicker", () => { const calendar = getCalendar({ renderCustomHeader, showMonthYearPicker: true, }); - expect(calendar.find(".react-datepicker__header--custom")).to.have.length( - 1 + expect(calendar.find(".react-datepicker__header--custom")).toHaveLength( + 1, ); - expect(calendar.find(".react-datepicker__day-names")).to.have.length(0); + expect(calendar.find(".react-datepicker__day-names")).toHaveLength(0); }); - it("should not render day names with renderCustomHeader & showYearPicker", function () { + it("should not render day names with renderCustomHeader & showYearPicker", () => { const calendar = getCalendar({ renderCustomHeader, showYearPicker: true, }); - expect(calendar.find(".react-datepicker__header--custom")).to.have.length( - 1 + expect(calendar.find(".react-datepicker__header--custom")).toHaveLength( + 1, ); - expect(calendar.find(".react-datepicker__day-names")).to.have.length(0); + expect(calendar.find(".react-datepicker__day-names")).toHaveLength(0); }); - it("should not render day names with renderCustomHeader & showQuarterYearPicker", function () { + it("should not render day names with renderCustomHeader & showQuarterYearPicker", () => { const calendar = getCalendar({ renderCustomHeader, showQuarterYearPicker: true, }); - expect(calendar.find(".react-datepicker__header--custom")).to.have.length( - 1 + expect(calendar.find(".react-datepicker__header--custom")).toHaveLength( + 1, ); - expect(calendar.find(".react-datepicker__day-names")).to.have.length(0); + expect(calendar.find(".react-datepicker__day-names")).toHaveLength(0); }); - it("should go to previous month", function () { + it("should go to previous month", () => { const calendar = getCalendar({ renderCustomHeader, }); @@ -503,12 +515,12 @@ describe("Calendar", function () { prevMonth.simulate("click"); - expect(utils.getMonth(selected)).to.be.equal( - (utils.getMonth(calendar.state().date) + 1) % 12 + expect(utils.getMonth(selected)).toBe( + (utils.getMonth(calendar.state().date) + 1) % 12, ); }); - it("should go to next month", function () { + it("should go to next month", () => { const calendar = getCalendar({ renderCustomHeader, }); @@ -522,11 +534,11 @@ describe("Calendar", function () { const resultMonth = newMonth === -1 ? 11 : newMonth; - expect(utils.getMonth(selected)).to.be.equal(resultMonth); + expect(utils.getMonth(selected)).toBe(resultMonth); }); - it("nextMonthButtonDisabled flag should be true", function () { - const renderCustomHeader = sinon.spy(); + it("nextMonthButtonDisabled flag should be true", () => { + const renderCustomHeader = jest.fn(); getCalendar({ renderCustomHeader, @@ -535,20 +547,14 @@ describe("Calendar", function () { }); const { prevMonthButtonDisabled, nextMonthButtonDisabled } = - renderCustomHeader.getCall(0).args[0]; + renderCustomHeader.mock.calls[0][0]; - assert( - prevMonthButtonDisabled === false, - "prevMonthButtonDisabled should be set to false" - ); - assert( - nextMonthButtonDisabled === true, - "nextMonthButtonDisabled should be set to true" - ); + expect(prevMonthButtonDisabled).toBe(false); + expect(nextMonthButtonDisabled).toBe(true); }); - it("prevMonthButtonDisabled flag should be true", function () { - const renderCustomHeader = sinon.spy(); + it("prevMonthButtonDisabled flag should be true", () => { + const renderCustomHeader = jest.fn(); getCalendar({ renderCustomHeader, @@ -557,19 +563,13 @@ describe("Calendar", function () { }); const { prevMonthButtonDisabled, nextMonthButtonDisabled } = - renderCustomHeader.getCall(0).args[0]; + renderCustomHeader.mock.calls[0][0]; - assert( - prevMonthButtonDisabled === true, - "prevMonthButtonDisabled should be set to true" - ); - assert( - nextMonthButtonDisabled === false, - "nextMonthButtonDisabled should be set to false" - ); + expect(prevMonthButtonDisabled).toBe(true); + expect(nextMonthButtonDisabled).toBe(false); }); - it("should select april from month select", function () { + it("should select april from month select", () => { const calendar = getCalendar({ renderCustomHeader, }); @@ -580,10 +580,10 @@ describe("Calendar", function () { const selected = utils.newDate(calendar.state().date); - expect(utils.getMonth(selected)).to.be.equal(4); + expect(utils.getMonth(selected)).toBe(4); }); - it("should select 2017 from month select", function () { + it("should select 2017 from month select", () => { const calendar = getCalendar({ renderCustomHeader, }); @@ -594,7 +594,7 @@ describe("Calendar", function () { const selected = utils.newDate(calendar.state().date); - expect(utils.getYear(selected)).to.be.equal(2017); + expect(utils.getYear(selected)).toBe(2017); }); it("should render custom headers according to monthsShown prop", () => { @@ -603,16 +603,16 @@ describe("Calendar", function () { monthsShown: 2, }); expect( - twoMonthsCalendar.find(".react-datepicker__header--custom") - ).to.have.length(2); + twoMonthsCalendar.find(".react-datepicker__header--custom"), + ).toHaveLength(2); const fourMonthsCalendar = getCalendar({ renderCustomHeader, monthsShown: 4, }); expect( - fourMonthsCalendar.find(".react-datepicker__header--custom") - ).to.have.length(4); + fourMonthsCalendar.find(".react-datepicker__header--custom"), + ).toHaveLength(4); }); it("should set monthDate prop correctly when rendering custom headers", () => { @@ -635,15 +635,15 @@ describe("Calendar", function () { .at(1) .text(); - expect(firstDateInCustomHeader).to.equal( - `${firstDate.getFullYear()}-${firstDate.getMonth()}-${firstDate.getDate()}` + expect(firstDateInCustomHeader).toBe( + `${firstDate.getFullYear()}-${firstDate.getMonth()}-${firstDate.getDate()}`, ); - expect(secondDateInCustomHeader).to.equal( - `${secondDate.getFullYear()}-${secondDate.getMonth()}-${secondDate.getDate()}` + expect(secondDateInCustomHeader).toBe( + `${secondDate.getFullYear()}-${secondDate.getMonth()}-${secondDate.getDate()}`, ); }); - it("should render custom header with show time select", function () { + it("should render custom header with show time select", () => { const calendar = mount( {}} onSelect={() => {}} - /> + />, ); const header = calendar.find(".react-datepicker__header--custom"); const time = calendar.find(".react-datepicker__time"); - expect(header).to.have.length(1); - expect(time).to.have.length(1); + expect(header).toHaveLength(1); + expect(time).toHaveLength(1); }); }); describe("when showDisabledMonthNavigation is enabled", () => { - let onMonthChangeSpy = sinon.spy(); + let onMonthChangeSpy = jest.fn(); beforeEach(() => { - onMonthChangeSpy = sinon.spy(); + onMonthChangeSpy = jest.fn(); }); - it("should show disabled previous month navigation", function () { + it("should show disabled previous month navigation", () => { const calendar = getCalendar({ minDate: utils.newDate(), maxDate: utils.addMonths(utils.newDate(), 3), @@ -676,51 +676,51 @@ describe("Calendar", function () { }); const prevDisabledNavigationButton = calendar.find( - ".react-datepicker__navigation--previous--disabled" + ".react-datepicker__navigation--previous--disabled", ); const nextDisabledNavigationButton = calendar.find( - ".react-datepicker__navigation--next--disabled" + ".react-datepicker__navigation--next--disabled", ); - expect(prevDisabledNavigationButton).to.have.length(1); - expect(nextDisabledNavigationButton).to.have.length(0); + expect(prevDisabledNavigationButton).toHaveLength(1); + expect(nextDisabledNavigationButton).toHaveLength(0); }); - it("should show disabled next month navigation", function () { + it("should show disabled next month navigation", () => { const calendar = getCalendar({ minDate: utils.subMonths(utils.newDate(), 3), maxDate: utils.newDate(), showDisabledMonthNavigation: true, }); const prevDisabledNavigationButton = calendar.find( - ".react-datepicker__navigation--previous--disabled" + ".react-datepicker__navigation--previous--disabled", ); const nextDisabledNavigationButton = calendar.find( - ".react-datepicker__navigation--next--disabled" + ".react-datepicker__navigation--next--disabled", ); - expect(prevDisabledNavigationButton).to.have.length(0); - expect(nextDisabledNavigationButton).to.have.length(1); + expect(prevDisabledNavigationButton).toHaveLength(0); + expect(nextDisabledNavigationButton).toHaveLength(1); }); - it("should not show disabled previous/next month navigation when next/previous month available", function () { + it("should not show disabled previous/next month navigation when next/previous month available", () => { const calendar = getCalendar({ minDate: utils.subMonths(utils.newDate(), 3), maxDate: utils.addMonths(utils.newDate(), 3), showDisabledMonthNavigation: true, }); const prevDisabledNavigationButton = calendar.find( - ".react-datepicker__navigation--previous--disabled" + ".react-datepicker__navigation--previous--disabled", ); const nextDisabledNavigationButton = calendar.find( - ".react-datepicker__navigation--next--disabled" + ".react-datepicker__navigation--next--disabled", ); - expect(prevDisabledNavigationButton).to.have.length(0); - expect(nextDisabledNavigationButton).to.have.length(0); + expect(prevDisabledNavigationButton).toHaveLength(0); + expect(nextDisabledNavigationButton).toHaveLength(0); }); - it("when clicking disabled month navigation, should not change month", function () { + it("when clicking disabled month navigation, should not change month", () => { const calendar = getCalendar({ minDate: utils.newDate(), maxDate: utils.newDate(), @@ -728,29 +728,23 @@ describe("Calendar", function () { onMonthChange: onMonthChangeSpy, }); const prevNavigationButton = calendar.find( - ".react-datepicker__navigation--previous" + ".react-datepicker__navigation--previous", ); const nextNavigationButton = calendar.find( - ".react-datepicker__navigation--next" + ".react-datepicker__navigation--next", ); prevNavigationButton.simulate("click"); - assert( - onMonthChangeSpy.called === false, - "onMonthChange should not be called" - ); + expect(onMonthChangeSpy).toHaveBeenCalledTimes(0); nextNavigationButton.simulate("click"); - assert( - onMonthChangeSpy.called === false, - "onMonthChange should not be called" - ); + expect(onMonthChangeSpy).toHaveBeenCalledTimes(0); }); - it("when clicking non-disabled month navigation, should change month", function () { + it("when clicking non-disabled month navigation, should change month", () => { const calendar = getCalendar({ selected: utils.newDate(), minDate: utils.subMonths(utils.newDate(), 3), @@ -759,58 +753,55 @@ describe("Calendar", function () { onMonthChange: onMonthChangeSpy, }); const prevNavigationButton = calendar.find( - ".react-datepicker__navigation--previous" + ".react-datepicker__navigation--previous", ); const nextNavigationButton = calendar.find( - ".react-datepicker__navigation--next" + ".react-datepicker__navigation--next", ); prevNavigationButton.simulate("click"); nextNavigationButton.simulate("click"); - assert( - onMonthChangeSpy.callCount === 2, - "onMonthChange should be called 2 times" - ); + expect(onMonthChangeSpy).toHaveBeenCalledTimes(2); }); }); - it("should not show the month dropdown menu by default", function () { + it("should not show the month dropdown menu by default", () => { const calendar = getCalendar(); const monthReadView = calendar.find(MonthDropdown); - expect(monthReadView).to.have.length(0); + expect(monthReadView).toHaveLength(0); }); - it("should show the month dropdown menu if toggled on", function () { + it("should show the month dropdown menu if toggled on", () => { const calendar = getCalendar({ showMonthDropdown: true }); const monthReadView = calendar.find(MonthDropdown); - expect(monthReadView).to.have.length(1); + expect(monthReadView).toHaveLength(1); }); - it("should show only one month dropdown menu if toggled on and multiple month mode on", function () { + it("should show only one month dropdown menu if toggled on and multiple month mode on", () => { const calendar = getCalendar({ showMonthDropdown: true, monthsShown: 2 }); const monthReadView = calendar.find(MonthDropdown); - expect(monthReadView).to.have.length(1); + expect(monthReadView).toHaveLength(1); }); - it("should not show the month-year dropdown menu by default", function () { + it("should not show the month-year dropdown menu by default", () => { const calendar = getCalendar(); const monthYearReadView = calendar.find(MonthYearDropdown); - expect(monthYearReadView).to.have.length(0); + expect(monthYearReadView).toHaveLength(0); }); - it("should show the month-year dropdown menu if toggled on", function () { + it("should show the month-year dropdown menu if toggled on", () => { const calendar = getCalendar({ showMonthYearDropdown: true, minDate: utils.subYears(utils.newDate(), 1), maxDate: utils.addYears(utils.newDate(), 1), }); const monthYearReadView = calendar.find(MonthYearDropdown); - expect(monthYearReadView).to.have.length(1); + expect(monthYearReadView).toHaveLength(1); }); - it("should show only one month-year dropdown menu if toggled on and multiple month mode on", function () { + it("should show only one month-year dropdown menu if toggled on and multiple month mode on", () => { const calendar = getCalendar({ showMonthYearDropdown: true, minDate: utils.subYears(utils.newDate(), 1), @@ -818,20 +809,20 @@ describe("Calendar", function () { monthsShown: 2, }); const monthReadView = calendar.find(MonthYearDropdown); - expect(monthReadView).to.have.length(1); + expect(monthReadView).toHaveLength(1); }); - it("should not show the today button by default", function () { + it("should not show the today button by default", () => { const calendar = getCalendar(); const todayButton = calendar.find(".react-datepicker__today-button"); - expect(todayButton).to.have.length(0); + expect(todayButton).toHaveLength(0); }); - it("should show the today button if toggled on", function () { + it("should show the today button if toggled on", () => { const calendar = getCalendar({ todayButton: "Vandaag" }); const todayButton = calendar.find(".react-datepicker__today-button"); - expect(todayButton).to.have.length(1); - expect(todayButton.text()).to.equal("Vandaag"); + expect(todayButton).toHaveLength(1); + expect(todayButton.text()).toBe("Vandaag"); }); it("should set the date when pressing todayButton", () => { @@ -844,13 +835,13 @@ describe("Calendar", function () { it("should use a hash for week label if weekLabel is NOT provided", () => { const calendar = getCalendar({ showWeekNumbers: true }); const weekLabel = calendar.find(".react-datepicker__day-name"); - expect(weekLabel.at(0).text()).to.equal("#"); + expect(weekLabel.at(0).text()).toBe("#"); }); it("should set custom week label if weekLabel is provided", () => { const calendar = getCalendar({ showWeekNumbers: true, weekLabel: "Foo" }); const weekLabel = calendar.find(".react-datepicker__day-name"); - expect(weekLabel.at(0).text()).to.equal("Foo"); + expect(weekLabel.at(0).text()).toBe("Foo"); }); it("should track the currently hovered day", () => { @@ -860,14 +851,15 @@ describe("Calendar", function () { dropdownMode="scroll" onClickOutside={() => {}} onSelect={() => {}} - /> + />, ); const day = calendar.find(Day).first(); day.simulate("mouseenter"); const month = calendar.find(Month).first(); - expect(month.prop("selectingDate")).to.exist; - expect(utils.isSameDay(month.prop("selectingDate"), day.prop("day"))).to.be - .true; + expect(month.prop("selectingDate")).toBeDefined(); + expect(utils.isSameDay(month.prop("selectingDate"), day.prop("day"))).toBe( + true, + ); }); it("should clear the hovered day when the mouse leaves", () => { @@ -877,14 +869,14 @@ describe("Calendar", function () { dropdownMode="scroll" onClickOutside={() => {}} onSelect={() => {}} - /> + />, ); calendar.setState({ selectingDate: utils.newDate() }); const month = calendar.find(Month).first(); - expect(month.prop("selectingDate")).to.exist; + expect(month.prop("selectingDate")).toBeDefined(); month.simulate("mouseleave"); calendar.update(); - expect(calendar.find(Month).first().prop("selectingDate")).not.to.exist; + expect(calendar.find(Month).first().prop("selectingDate")).toBeFalsy(); }); it("uses weekdaysShort instead of weekdaysMin provided useWeekdaysShort prop is present", () => { @@ -895,7 +887,7 @@ describe("Calendar", function () { onClickOutside={() => {}} onSelect={() => {}} useWeekdaysShort - /> + />, ); const calendarMin = mount( {}} onSelect={() => {}} - /> + />, ); const daysNamesShort = calendarShort.find(".react-datepicker__day-name"); - expect(daysNamesShort.at(0).text()).to.equal("Sun"); - expect(daysNamesShort.at(6).text()).to.equal("Sat"); + expect(daysNamesShort.at(0).text()).toBe("Sun"); + expect(daysNamesShort.at(6).text()).toBe("Sat"); const daysNamesMin = calendarMin.find(".react-datepicker__day-name"); - expect(daysNamesMin.at(0).text()).to.equal("Su"); - expect(daysNamesMin.at(6).text()).to.equal("Sa"); + expect(daysNamesMin.at(0).text()).toBe("Su"); + expect(daysNamesMin.at(6).text()).toBe("Sa"); }); it("should set the date to the selected day of the previous month when previous button clicked", () => { @@ -925,19 +917,19 @@ describe("Calendar", function () { onChange={(d) => { date = d; }} - /> + />, ); TestUtils.Simulate.focus(ReactDOM.findDOMNode(datePicker.input)); const calendar = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Calendar + Calendar, )[0]; const previousButton = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__navigation--previous" + "react-datepicker__navigation--previous", ); TestUtils.Simulate.click(previousButton); - expect(utils.formatDate(date, "dd.MM.yyyy")).to.equal(expectedDate); + expect(utils.formatDate(date, "dd.MM.yyyy")).toBe(expectedDate); }); it("should set the date to the selected day of the next when next button clicked", () => { @@ -950,19 +942,19 @@ describe("Calendar", function () { onChange={(d) => { date = d; }} - /> + />, ); TestUtils.Simulate.focus(ReactDOM.findDOMNode(datePicker.input)); const calendar = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Calendar + Calendar, )[0]; const nextButton = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__navigation--next" + "react-datepicker__navigation--next", ); TestUtils.Simulate.click(nextButton); - expect(utils.formatDate(date, "dd.MM.yyyy")).to.equal(expectedDate); + expect(utils.formatDate(date, "dd.MM.yyyy")).toBe(expectedDate); }); it("should set the date to the last possible day of the previous month when previous button clicked", () => { @@ -975,47 +967,47 @@ describe("Calendar", function () { onChange={(d) => { date = d; }} - /> + />, ); TestUtils.Simulate.focus(ReactDOM.findDOMNode(datePicker.input)); const calendar = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Calendar + Calendar, )[0]; const previousButton = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__navigation--previous" + "react-datepicker__navigation--previous", ); TestUtils.Simulate.click(previousButton); - expect(utils.formatDate(date, "dd.MM.yyyy")).to.equal(expectedDate); + expect(utils.formatDate(date, "dd.MM.yyyy")).toBe(expectedDate); }); it("should trigger onCalendarOpen and onCalendarClose", () => { - const onCalendarOpen = sinon.spy(); - const onCalendarClose = sinon.spy(); + const onCalendarOpen = jest.fn(); + const onCalendarClose = jest.fn(); const datePicker = TestUtils.renderIntoDocument( + />, ); TestUtils.Simulate.focus(ReactDOM.findDOMNode(datePicker.input)); - assert(onCalendarOpen.called === true, "onCalendarOpen should be called"); + expect(onCalendarOpen).toHaveBeenCalled(); TestUtils.Simulate.blur(ReactDOM.findDOMNode(datePicker.input)); - assert(onCalendarOpen.called === true, "onCalendarClose should be called"); + expect(onCalendarOpen).toHaveBeenCalled(); }); describe("onMonthChange", () => { - let onMonthChangeSpy = sinon.spy(); + let onMonthChangeSpy = jest.fn(); let calendar; beforeEach(() => { - onMonthChangeSpy = sinon.spy(); + onMonthChangeSpy = jest.fn(); calendar = mount( + />, ); }); @@ -1035,39 +1027,30 @@ describe("Calendar", function () { const select = calendar.find(".react-datepicker__navigation--previous"); select.simulate("click"); - assert( - onMonthChangeSpy.called === true, - "onMonthChange should be called" - ); + expect(onMonthChangeSpy).toHaveBeenCalled(); }); it("calls onMonthChange prop when next month button clicked", () => { const select = calendar.find(".react-datepicker__navigation--next"); select.simulate("click"); - assert( - onMonthChangeSpy.called === true, - "onMonthChange should be called" - ); + expect(onMonthChangeSpy).toHaveBeenCalled(); }); it("calls onMonthChange prop when month changed from month dropdown", () => { const select = calendar.find(MonthDropdown).find("select"); select.simulate("change"); - assert( - onMonthChangeSpy.called === true, - "onMonthChange should be called" - ); + expect(onMonthChangeSpy).toHaveBeenCalled(); }); }); describe("onYearChange", () => { - let onYearChangeSpy = sinon.spy(); + let onYearChangeSpy = jest.fn(); let calendar; beforeEach(() => { - onYearChangeSpy = sinon.spy(); + onYearChangeSpy = jest.fn(); calendar = mount( + />, ); }); @@ -1085,18 +1068,18 @@ describe("Calendar", function () { const select = calendar.find(YearDropdown).find("select"); select.simulate("change"); - assert(onYearChangeSpy.called === true, "onYearChange should be called"); + expect(onYearChangeSpy).toHaveBeenCalled(); }); }); describe("monthYearDropdown change", () => { - let onYearChangeSpy = sinon.spy(); - let onMonthChangeSpy = sinon.spy(); + let onYearChangeSpy = jest.fn(); + let onMonthChangeSpy = jest.fn(); let calendar; beforeEach(() => { - onYearChangeSpy = sinon.spy(); - onMonthChangeSpy = sinon.spy(); + onYearChangeSpy = jest.fn(); + onMonthChangeSpy = jest.fn(); calendar = mount( + />, ); }); @@ -1121,7 +1104,7 @@ describe("Calendar", function () { .at(3); option.simulate("change"); - assert(onYearChangeSpy.called === true, "onYearChange should be called"); + expect(onYearChangeSpy).toHaveBeenCalled(); }); it("calls onMonthChange prop when selection is changed from month-year dropdown", () => { @@ -1132,19 +1115,16 @@ describe("Calendar", function () { .at(3); option.simulate("change"); - assert( - onMonthChangeSpy.called === true, - "onMonthChange should be called" - ); + expect(onMonthChangeSpy).toHaveBeenCalled(); }); }); describe("onDropdownFocus", () => { - let onDropdownFocusSpy = sinon.spy(); + let onDropdownFocusSpy = jest.fn(); let calendar; beforeEach(() => { - onDropdownFocusSpy = sinon.spy(); + onDropdownFocusSpy = jest.fn(); calendar = mount( + />, ); }); @@ -1166,65 +1146,53 @@ describe("Calendar", function () { const select = calendar.find(".react-datepicker__year-select"); select.simulate("focus"); - assert( - onDropdownFocusSpy.called === true, - "onDropdownFocus should be called" - ); + expect(onDropdownFocusSpy).toHaveBeenCalled(); }); it("calls onDropdownFocus prop when month select is focused", () => { const select = calendar.find(".react-datepicker__month-select"); select.simulate("focus"); - assert( - onDropdownFocusSpy.called === true, - "onDropdownFocus should to be called" - ); + expect(onDropdownFocusSpy).toHaveBeenCalled(); }); it("calls onDropdownFocus prop when year-month select is focused", () => { const select = calendar.find(".react-datepicker__month-year-select"); select.simulate("focus"); - assert( - onDropdownFocusSpy.called === true, - "onDropdownFocus should to be called" - ); + expect(onDropdownFocusSpy).toHaveBeenCalled(); }); it("does not call onDropdownFocus prop when the dropdown container div is focused", () => { const select = calendar.find(".react-datepicker__header__dropdown"); select.simulate("focus"); - assert( - onDropdownFocusSpy.called === false, - "onDropdownFocus should not to be called" - ); + expect(onDropdownFocusSpy).toHaveBeenCalledTimes(0); }); }); - describe("localization", function () { + describe("localization", () => { function testLocale(calendar, selected, locale) { const calendarText = calendar.find(".react-datepicker__current-month"); - expect(calendarText.text()).to.equal( - utils.formatDate(selected, dateFormat, locale) + expect(calendarText.text()).toBe( + utils.formatDate(selected, dateFormat, locale), ); const firstDateOfWeek = utils.getStartOfWeek(selected, locale); const firstWeekDayMin = utils.getWeekdayMinInLocale( firstDateOfWeek, - locale + locale, ); const firstHeader = calendar.find(".react-datepicker__day-name").at(0); - expect(firstHeader.text()).to.equal(firstWeekDayMin); + expect(firstHeader.text()).toBe(firstWeekDayMin); } - it("should use the 'en' locale by default", function () { + it("should use the 'en' locale by default", () => { const selected = utils.newDate(); const calendar = getCalendar({ selected }); testLocale(calendar, selected); }); - it("should use the default locale when set", function () { + it("should use the default locale when set", () => { const selected = utils.newDate(); utils.setDefaultLocale("fi"); @@ -1233,7 +1201,7 @@ describe("Calendar", function () { utils.setDefaultLocale(""); }); - it("should use the locale specified as a prop", function () { + it("should use the locale specified as a prop", () => { utils.registerLocale("fi", fi); const locale = "fi"; const selected = utils.newDate(); @@ -1241,7 +1209,7 @@ describe("Calendar", function () { testLocale(calendar, selected, locale); }); - it("should override the default locale with the locale prop", function () { + it("should override the default locale with the locale prop", () => { const locale = "en"; const selected = utils.newDate(); utils.setDefaultLocale("fi"); @@ -1251,7 +1219,7 @@ describe("Calendar", function () { utils.setDefaultLocale(""); }); - it("should accept a raw date-fns locale object", function () { + it("should accept a raw date-fns locale object", () => { // Note that we explicitly do not call `registerLocale`, because that // would create a global variable, which we want to avoid. const locale = eo; @@ -1262,18 +1230,18 @@ describe("Calendar", function () { // Other tests touch this global, so it will always be present, but at the // very least we can make sure the test worked without 'eo' being added. - expect(window.__localeData__).not.to.haveOwnProperty("eo"); + expect(window.__localeData__).not.toHaveProperty("eo"); }); - it("should render empty custom header", function () { + it("should render empty custom header", () => { const calendar = getCalendar({ renderCustomHeader: () => {} }); const header = calendar.find(".react-datepicker__header--custom"); - expect(header).to.have.length(1); + expect(header).toHaveLength(1); }); }); - describe("renderInputTimeSection", function () { + describe("renderInputTimeSection", () => { const renderCalendar = (props) => mount( + />, ); const timeInputSelector = ".react-datepicker__input-time-container"; - it("should render InputTime component", function () { + it("should render InputTime component", () => { const calendar = renderCalendar(); const timeInputClassname = calendar.find(timeInputSelector); - expect(timeInputClassname).to.have.length(1); + expect(timeInputClassname).toHaveLength(1); }); it("should pass empty string to InputTime when no selected date", () => { const calendar = renderCalendar(); const timeInputEl = calendar.find(`${timeInputSelector} input`); - expect(timeInputEl.prop("value")).to.equal(""); + expect(timeInputEl.prop("value")).toBe(""); }); }); - describe("renderYearPicker", function () { - it("should render YearPicker component", function () { + describe("renderYearPicker", () => { + it("should render YearPicker component", () => { let calendar = mount( {}} dropdownMode="select" showYearPicker - /> + />, ); const timeInputClassname = calendar.find(".react-datepicker__year"); - expect(timeInputClassname).to.have.length(1); + expect(timeInputClassname).toHaveLength(1); }); it("calls increaseYear when next year button clicked", () => { @@ -1325,12 +1293,12 @@ describe("Calendar", function () { onSelect={() => {}} onClickOutside={() => {}} showYearPicker - /> + />, ); calendar.state.date = utils.parseDate("09/28/1993", DATE_FORMAT); var increaseYear = calendar.increaseYear; increaseYear(); - assert.equal(utils.getYear(calendar.state.date), 2005); + expect(utils.getYear(calendar.state.date)).toBe(2005); }); it("calls decreaseYear when previous year button clicked", () => { @@ -1340,30 +1308,38 @@ describe("Calendar", function () { onSelect={() => {}} onClickOutside={() => {}} showYearPicker - /> + />, ); calendar.state.date = utils.parseDate("09/28/1993", DATE_FORMAT); var decreaseYear = calendar.decreaseYear; decreaseYear(); - assert.equal(utils.getYear(calendar.state.date), 1981); + expect(utils.getYear(calendar.state.date)).toBe(1981); }); it("calls increaseYear for custom year item number when next year button clicked", () => { let calendar = TestUtils.renderIntoDocument( - + , ); calendar.state.date = utils.parseDate("09/28/1993", DATE_FORMAT); calendar.increaseYear(); - assert.equal(utils.getYear(calendar.state.date), 2003); + expect(utils.getYear(calendar.state.date)).toBe(2003); }); it("calls decreaseYear for custom year item number when previous year button clicked", () => { let calendar = TestUtils.renderIntoDocument( - + , ); calendar.state.date = utils.parseDate("09/28/1993", DATE_FORMAT); calendar.decreaseYear(); - assert.equal(utils.getYear(calendar.state.date), 1983); + expect(utils.getYear(calendar.state.date)).toBe(1983); }); }); @@ -1375,16 +1351,16 @@ describe("Calendar", function () { onClickOutside={() => {}} hideCalendar={() => {}} showMonthYearPicker - /> + />, ); it("should change the next and previous labels", () => { const previous = calendar.find(".react-datepicker__navigation--previous"); const next = calendar.find(".react-datepicker__navigation--next"); - expect(previous.text()).to.equal("Previous Year"); - expect(next.text()).to.equal("Next Year"); + expect(previous.text()).toBe("Previous Year"); + expect(next.text()).toBe("Next Year"); }); - it("should render custom next and previous labels", function () { + it("should render custom next and previous labels", () => { var calendar = mount( + />, ); const previous = calendar.find(".react-datepicker__navigation--previous"); const next = calendar.find(".react-datepicker__navigation--next"); - expect(previous.text()).to.equal("Custom Previous Year Label"); - expect(next.text()).to.equal("Custom Next Year Label"); + expect(previous.text()).toBe("Custom Previous Year Label"); + expect(next.text()).toBe("Custom Next Year Label"); }); it("calls decreaseYear when previous month button clicked", () => { @@ -1408,12 +1384,12 @@ describe("Calendar", function () { onSelect={() => {}} onClickOutside={() => {}} showMonthYearPicker - /> + />, ); calendar.state.date = utils.parseDate("09/28/1993", DATE_FORMAT); var decreaseYear = calendar.decreaseYear; decreaseYear(); - assert.equal(utils.getYear(calendar.state.date), 1992); + expect(utils.getYear(calendar.state.date)).toBe(1992); }); it("calls increaseYear when next month button clicked", () => { @@ -1423,12 +1399,12 @@ describe("Calendar", function () { onSelect={() => {}} onClickOutside={() => {}} showMonthYearPicker - /> + />, ); calendar.state.date = utils.parseDate("09/28/1993", DATE_FORMAT); var increaseYear = calendar.increaseYear; increaseYear(); - assert.equal(utils.getYear(calendar.state.date), 1994); + expect(utils.getYear(calendar.state.date)).toBe(1994); }); }); @@ -1440,16 +1416,16 @@ describe("Calendar", function () { onClickOutside={() => {}} hideCalendar={() => {}} showQuarterYearPicker - /> + />, ); it("should change the next and previous labels", () => { const previous = calendar.find(".react-datepicker__navigation--previous"); const next = calendar.find(".react-datepicker__navigation--next"); - expect(previous.text()).to.equal("Previous Year"); - expect(next.text()).to.equal("Next Year"); + expect(previous.text()).toBe("Previous Year"); + expect(next.text()).toBe("Next Year"); }); - it("should render custom next and previous labels", function () { + it("should render custom next and previous labels", () => { var calendar = mount( + />, ); const previous = calendar.find(".react-datepicker__navigation--previous"); const next = calendar.find(".react-datepicker__navigation--next"); - expect(previous.text()).to.equal("Custom Previous Year Label"); - expect(next.text()).to.equal("Custom Next Year Label"); + expect(previous.text()).toBe("Custom Previous Year Label"); + expect(next.text()).toBe("Custom Next Year Label"); }); it("calls decreaseYear when previous month button clicked", () => { @@ -1473,12 +1449,12 @@ describe("Calendar", function () { onSelect={() => {}} onClickOutside={() => {}} showQuarterYearPicker - /> + />, ); calendar.state.date = utils.parseDate("09/28/1993", DATE_FORMAT); var decreaseYear = calendar.decreaseYear; decreaseYear(); - assert.equal(utils.getYear(calendar.state.date), 1992); + expect(utils.getYear(calendar.state.date)).toBe(1992); }); it("calls increaseYear when next month button clicked", () => { @@ -1488,23 +1464,23 @@ describe("Calendar", function () { onSelect={() => {}} onClickOutside={() => {}} showQuarterYearPicker - /> + />, ); calendar.state.date = utils.parseDate("09/28/1993", DATE_FORMAT); var increaseYear = calendar.increaseYear; increaseYear(); - assert.equal(utils.getYear(calendar.state.date), 1994); + expect(utils.getYear(calendar.state.date)).toBe(1994); }); }); describe("using click outside", () => { - const clickOutsideSpy = sinon.spy(); + const clickOutsideSpy = jest.fn(); const calendar = mount( {}} onClickOutside={clickOutsideSpy} - /> + />, ); const instance = calendar.instance(); @@ -1512,14 +1488,14 @@ describe("Calendar", function () { it("calls onClickOutside prop when handles click outside", () => { instance.handleClickOutside("__event__"); - assert(clickOutsideSpy.calledWith("__event__")); + expect(clickOutsideSpy).toHaveBeenCalledWith("__event__"); }); it("setClickOutsideRef function returns container ref", () => { const ref = instance.setClickOutsideRef(); - assert.isNotNull(ref); - assert.equal(ref, instance.containerRef.current); + expect(ref).not.toBeNull(); + expect(ref).toEqual(instance.containerRef.current); }); }); @@ -1532,11 +1508,11 @@ describe("Calendar", function () { onSelect={() => {}} onClickOutside={() => {}} showQuarterYearPicker - /> + />, ); expect( - shallowCalendar.html().indexOf(`aria-label="${ariaLabel}"`) - ).not.equal(-1); + shallowCalendar.html().indexOf(`aria-label="${ariaLabel}"`), + ).not.toBe(-1); }); it("should have a previous-button with the provided aria-label for year", () => { @@ -1548,11 +1524,11 @@ describe("Calendar", function () { onSelect={() => {}} onClickOutside={() => {}} showQuarterYearPicker - /> + />, ); expect( - shallowCalendar.html().indexOf(`aria-label="${ariaLabel}"`) - ).not.equal(-1); + shallowCalendar.html().indexOf(`aria-label="${ariaLabel}"`), + ).not.toBe(-1); }); it("should have a next-button with the provided aria-label for month", () => { @@ -1563,11 +1539,11 @@ describe("Calendar", function () { dateFormat={DATE_FORMAT} onSelect={() => {}} onClickOutside={() => {}} - /> + />, ); expect( - shallowCalendar.html().indexOf(`aria-label="${ariaLabel}"`) - ).not.equal(-1); + shallowCalendar.html().indexOf(`aria-label="${ariaLabel}"`), + ).not.toBe(-1); }); it("should have a previous-button with the provided aria-label for month", () => { @@ -1578,11 +1554,11 @@ describe("Calendar", function () { dateFormat={DATE_FORMAT} onSelect={() => {}} onClickOutside={() => {}} - /> + />, ); expect( - shallowCalendar.html().indexOf(`aria-label="${ariaLabel}"`) - ).not.equal(-1); + shallowCalendar.html().indexOf(`aria-label="${ariaLabel}"`), + ).not.toBe(-1); }); describe("changing the month also changes the preselection to preserve keyboard navigation abilities", () => { @@ -1592,18 +1568,18 @@ describe("Calendar", function () { const currentMonth = selected.getMonth(); const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); TestUtils.Simulate.click( TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__navigation--next" - ) + "react-datepicker__navigation--next", + ), ); - expect(datePicker.state.preSelection.getMonth()).to.equal( - currentMonth === 11 ? 0 : currentMonth + 1 + expect(datePicker.state.preSelection.getMonth()).toBe( + currentMonth === 11 ? 0 : currentMonth + 1, ); }); it("updates the preselection when you choose Previous Month", () => { @@ -1612,18 +1588,18 @@ describe("Calendar", function () { const currentMonth = selected.getMonth(); const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); TestUtils.Simulate.click( TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__navigation--previous" - ) + "react-datepicker__navigation--previous", + ), ); - expect(datePicker.state.preSelection.getMonth()).to.equal( - currentMonth === 0 ? 11 : currentMonth - 1 + expect(datePicker.state.preSelection.getMonth()).toBe( + currentMonth === 0 ? 11 : currentMonth - 1, ); }); }); @@ -1632,17 +1608,17 @@ describe("Calendar", function () { it("should not contain the time select classname in header by default", () => { const calendar = getCalendar(); const header = calendar.find( - ".react-datepicker__header--has-time-select" + ".react-datepicker__header--has-time-select", ); - expect(header).to.have.length(0); + expect(header).toHaveLength(0); }); it("should contain the time select classname in header if enabled", () => { const calendar = getCalendar({ showTimeSelect: true }); const header = calendar.find( - ".react-datepicker__header--has-time-select" + ".react-datepicker__header--has-time-select", ); - expect(header).to.have.length(1); + expect(header).toHaveLength(1); }); }); @@ -1650,60 +1626,60 @@ describe("Calendar", function () { it("should have default sunday as start day if No prop passed", () => { const calendar = getCalendar(); const calendarDays = calendar.find(".react-datepicker__day-name"); - expect(calendarDays.at(0).text()).to.equal("Su"); - expect(calendarDays.at(6).text()).to.equal("Sa"); + expect(calendarDays.at(0).text()).toBe("Su"); + expect(calendarDays.at(6).text()).toBe("Sa"); }); it("should have default wednesday as start day if No prop passed", () => { const calendar = getCalendar({ calendarStartDay: 3 }); const calendarDays = calendar.find(".react-datepicker__day-name"); - expect(calendarDays.at(0).text()).to.equal("We"); - expect(calendarDays.at(6).text()).to.equal("Tu"); + expect(calendarDays.at(0).text()).toBe("We"); + expect(calendarDays.at(6).text()).toBe("Tu"); }); }); describe("prev/next month button onKeyDown handler", () => { it("should call the prevMonthButton onKeyDown handler on Tab press", () => { - const onKeyDownSpy = sinon.spy(); + const onKeyDownSpy = jest.fn(); const datePicker = TestUtils.renderIntoDocument( + />, ); TestUtils.Simulate.focus(ReactDOM.findDOMNode(datePicker.input)); const prevMonthButton = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__navigation--previous" + "react-datepicker__navigation--previous", ); TestUtils.Simulate.keyDown(prevMonthButton, { key: "Tab", code: 9, which: 9, }); - expect(onKeyDownSpy.calledOnce).to.be.true; + expect(onKeyDownSpy).toHaveBeenCalledTimes(1); }); it("should call the nextMonthButton onKeyDown handler on Tab press", () => { - const onKeyDownSpy = sinon.spy(); + const onKeyDownSpy = jest.fn(); const datePicker = TestUtils.renderIntoDocument( + />, ); TestUtils.Simulate.focus(ReactDOM.findDOMNode(datePicker.input)); const nextMonthButton = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__navigation--next" + "react-datepicker__navigation--next", ); TestUtils.Simulate.keyDown(nextMonthButton, { key: "Tab", code: 9, which: 9, }); - expect(onKeyDownSpy.calledOnce).to.be.true; + expect(onKeyDownSpy).toHaveBeenCalledTimes(1); }); }); @@ -1717,29 +1693,29 @@ describe("Calendar", function () { hideCalendar={() => {}} dropdownMode="scroll" {...props} - /> + />, ); const childrenContainerSelector = ".react-datepicker__children-container"; - it("should render children components", function () { + it("should render children components", () => { const calendar = renderCalendar({ children:
This is a child component for test.
, }); const childrenContainer = calendar.find(childrenContainerSelector); - expect(childrenContainer).to.have.length(1); + expect(childrenContainer).toHaveLength(1); }); - it("should not render children components", function () { + it("should not render children components", () => { const calendar = renderCalendar(); const childrenContainer = calendar.find(childrenContainerSelector); - expect(childrenContainer).to.have.length(0); + expect(childrenContainer).toHaveLength(0); }); }); describe("should render aria live region after month/year change", () => { it("should render aria live region after month change", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; @@ -1747,30 +1723,30 @@ describe("Calendar", function () { const calendar = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Calendar + Calendar, )[0]; const nextNavigationButton = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__navigation--next" + "react-datepicker__navigation--next", ); nextNavigationButton.click(); const currentMonthText = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__current-month" + "react-datepicker__current-month", ).textContent; const ariaLiveMessage = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__aria-live" + "react-datepicker__aria-live", ).textContent; - expect(currentMonthText).to.equal(ariaLiveMessage); + expect(currentMonthText).toBe(ariaLiveMessage); }); it("should render aria live region after year change", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; @@ -1778,30 +1754,30 @@ describe("Calendar", function () { const calendar = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Calendar + Calendar, )[0]; const yearDropdown = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__year-read-view" + "react-datepicker__year-read-view", ); yearDropdown.click(); const option = TestUtils.scryRenderedDOMComponentsWithClass( calendar, - "react-datepicker__year-option" + "react-datepicker__year-option", )[7]; option.click(); const ariaLiveMessage = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__aria-live" + "react-datepicker__aria-live", ).textContent; - expect(ariaLiveMessage).to.equal( + expect(ariaLiveMessage).toBe( `${utils.getMonthInLocale( utils.getMonth(calendar.state.date), - datePicker.props.locale - )} ${utils.getYear(calendar.state.date)}` + datePicker.props.locale, + )} ${utils.getYear(calendar.state.date)}`, ); }); }); diff --git a/test/date_utils_test.js b/test/date_utils_test.test.js similarity index 70% rename from test/date_utils_test.js rename to test/date_utils_test.test.js index 064ba67ae..77a7c04c3 100644 --- a/test/date_utils_test.js +++ b/test/date_utils_test.test.js @@ -47,162 +47,173 @@ import { addYears } from "date-fns"; registerLocale("pt-BR", ptBR); -describe("date_utils", function () { - describe("newDate", function () { - it("should return null for invalid value passed", function () { - expect(newDate("21123asd")).to.be.null; +describe("date_utils", () => { + describe("newDate", () => { + it("should return null for invalid value passed", () => { + expect(newDate("21123asd")).toBeNull(); }); }); - describe("isEqual", function () { - it("should return true for null dates", function () { - expect(isEqual(null, null)).to.be.true; + describe("isEqual", () => { + it("should return true for null dates", () => { + expect(isEqual(null, null)).toBe(true); }); - it("should return false for a null and non-null date", function () { - expect(isEqual(newDate(), null)).to.be.false; - expect(isEqual(null, newDate())).to.be.false; + it("should return false for a null and non-null date", () => { + expect(isEqual(newDate(), null)).toBe(false); + expect(isEqual(null, newDate())).toBe(false); }); - it("should return false for non-equal dates", function () { - expect(isEqual(newDate("2016-02-10"), newDate("2016-02-11"))).to.be.false; + it("should return false for non-equal dates", () => { + expect(isEqual(newDate("2016-02-10"), newDate("2016-02-11"))).toBe(false); }); - it("should return false for non-equal date and date with time", function () { - expect(isEqual(newDate("2016-02-10"), newDate("2016-02-11 13:13"))).to.be - .false; + it("should return false for non-equal date and date with time", () => { + expect(isEqual(newDate("2016-02-10"), newDate("2016-02-11 13:13"))).toBe( + false, + ); }); - it("should return false for non-equal time", function () { - expect(isEqual(newDate("2016-02-10 13:13"), newDate("2016-02-11 13:14"))) - .to.be.false; + it("should return false for non-equal time", () => { + expect( + isEqual(newDate("2016-02-10 13:13"), newDate("2016-02-11 13:14")), + ).toBe(false); }); - it("should return true for equal dates", function () { - expect(isEqual(newDate("2016-02-10"), newDate("2016-02-10"))).to.be.true; + it("should return true for equal dates", () => { + expect(isEqual(newDate("2016-02-10"), newDate("2016-02-10"))).toBe(true); }); - it("should return true for equal time", function () { - expect(isEqual(newDate("2016-02-10 13:13"), newDate("2016-02-10 13:13"))) - .to.be.true; + it("should return true for equal time", () => { + expect( + isEqual(newDate("2016-02-10 13:13"), newDate("2016-02-10 13:13")), + ).toBe(true); }); }); - describe("isSameDay", function () { - it("should return true for null dates", function () { - expect(isSameDay(null, null)).to.be.true; + describe("isSameDay", () => { + it("should return true for null dates", () => { + expect(isSameDay(null, null)).toBe(true); }); - it("should return false for a null and non-null date", function () { - expect(isSameDay(newDate(), null)).to.be.false; - expect(isSameDay(null, newDate())).to.be.false; + it("should return false for a null and non-null date", () => { + expect(isSameDay(newDate(), null)).toBe(false); + expect(isSameDay(null, newDate())).toBe(false); }); - it("should return false for non-equal dates", function () { - expect(isSameDay(newDate("2016-02-10"), newDate("2016-02-11"))).to.be - .false; + it("should return false for non-equal dates", () => { + expect(isSameDay(newDate("2016-02-10"), newDate("2016-02-11"))).toBe( + false, + ); }); - it("should return true for equal dates", function () { - expect(isSameDay(newDate("2016-02-10"), newDate("2016-02-10"))).to.be - .true; + it("should return true for equal dates", () => { + expect(isSameDay(newDate("2016-02-10"), newDate("2016-02-10"))).toBe( + true, + ); }); }); - describe("isSameMonth", function () { - it("should return true for null dates", function () { - expect(isSameMonth(null, null)).to.be.true; + describe("isSameMonth", () => { + it("should return true for null dates", () => { + expect(isSameMonth(null, null)).toBe(true); }); - it("should return false for a null and non-null date", function () { - expect(isSameMonth(newDate(), null)).to.be.false; - expect(isSameMonth(null, newDate())).to.be.false; + it("should return false for a null and non-null date", () => { + expect(isSameMonth(newDate(), null)).toBe(false); + expect(isSameMonth(null, newDate())).toBe(false); }); - it("should return false for non-equal months ", function () { - expect(isSameMonth(newDate("2016-02-10"), newDate("2016-03-10"))).to.be - .false; + it("should return false for non-equal months ", () => { + expect(isSameMonth(newDate("2016-02-10"), newDate("2016-03-10"))).toBe( + false, + ); }); - it("should return true for equal months", function () { - expect(isSameMonth(newDate("2016-02-10"), newDate("2016-02-29"))).to.be - .true; + it("should return true for equal months", () => { + expect(isSameMonth(newDate("2016-02-10"), newDate("2016-02-29"))).toBe( + true, + ); }); }); - describe("isSameQuarter", function () { - it("should return true for null dates", function () { - expect(isSameQuarter(null, null)).to.be.true; + describe("isSameQuarter", () => { + it("should return true for null dates", () => { + expect(isSameQuarter(null, null)).toBe(true); }); - it("should return false for a null and non-null date", function () { - expect(isSameQuarter(newDate(), null)).to.be.false; - expect(isSameQuarter(null, newDate())).to.be.false; + it("should return false for a null and non-null date", () => { + expect(isSameQuarter(newDate(), null)).toBe(false); + expect(isSameQuarter(null, newDate())).toBe(false); }); - it("should return false for non-equal quarters ", function () { - expect(isSameQuarter(newDate("2016-02-10"), newDate("2016-04-10"))).to.be - .false; + it("should return false for non-equal quarters ", () => { + expect(isSameQuarter(newDate("2016-02-10"), newDate("2016-04-10"))).toBe( + false, + ); }); - it("should return true for equal quarters", function () { - expect(isSameQuarter(newDate("2016-02-10"), newDate("2016-03-29"))).to.be - .true; + it("should return true for equal quarters", () => { + expect(isSameQuarter(newDate("2016-02-10"), newDate("2016-03-29"))).toBe( + true, + ); }); }); - describe("isSameYear", function () { - it("should return true for null dates", function () { - expect(isSameYear(null, null)).to.be.true; + describe("isSameYear", () => { + it("should return true for null dates", () => { + expect(isSameYear(null, null)).toBe(true); }); - it("should return false for a null and non-null date", function () { - expect(isSameYear(newDate(), null)).to.be.false; - expect(isSameYear(null, newDate())).to.be.false; + it("should return false for a null and non-null date", () => { + expect(isSameYear(newDate(), null)).toBe(false); + expect(isSameYear(null, newDate())).toBe(false); }); - it("should return false for non-equal years ", function () { - expect(isSameYear(newDate("2016-02-10"), newDate("2015-02-10"))).to.be - .false; + it("should return false for non-equal years ", () => { + expect(isSameYear(newDate("2016-02-10"), newDate("2015-02-10"))).toBe( + false, + ); }); - it("should return true for equal years", function () { - expect(isSameYear(newDate("2016-02-10"), newDate("2016-12-24"))).to.be - .true; + it("should return true for equal years", () => { + expect(isSameYear(newDate("2016-02-10"), newDate("2016-12-24"))).toBe( + true, + ); }); }); - describe("isDayDisabled", function () { + describe("isDayDisabled", () => { it("should be enabled by default", () => { const day = newDate(); - expect(isDayDisabled(day)).to.be.false; + expect(isDayDisabled(day)).toBe(false); }); it("should be enabled if on the min date", () => { const day = newDate(); - expect(isDayDisabled(day, { minDate: day })).to.be.false; + expect(isDayDisabled(day, { minDate: day })).toBe(false); }); it("should be disabled if before the min date", () => { const day = newDate(); const minDate = addDays(day, 1); - expect(isDayDisabled(day, { minDate })).to.be.true; + expect(isDayDisabled(day, { minDate })).toBe(true); }); it("should be enabled if on the max date", () => { const day = newDate(); - expect(isDayDisabled(day, { maxDate: day })).to.be.false; + expect(isDayDisabled(day, { maxDate: day })).toBe(false); }); it("should be disabled if after the max date", () => { const day = newDate(); const maxDate = subDays(day, 1); - expect(isDayDisabled(day, { maxDate })).to.be.true; + expect(isDayDisabled(day, { maxDate })).toBe(true); }); it("should be disabled if in excluded dates", () => { const day = newDate(); - expect(isDayDisabled(day, { excludeDates: [day] })).to.be.true; + expect(isDayDisabled(day, { excludeDates: [day] })).toBe(true); }); it("should be disabled if on excluded date interval start", () => { @@ -210,8 +221,8 @@ describe("date_utils", function () { expect( isDayDisabled(day, { excludeDateIntervals: [{ start: day, end: addDays(day, 1) }], - }) - ).to.be.true; + }), + ).toBe(true); }); it("should be disabled if within excluded date interval", () => { @@ -221,8 +232,8 @@ describe("date_utils", function () { excludeDateIntervals: [ { start: subDays(day, 1), end: addDays(day, 1) }, ], - }) - ).to.be.true; + }), + ).toBe(true); }); it("should be disabled if on excluded date interval end", () => { @@ -230,8 +241,8 @@ describe("date_utils", function () { expect( isDayDisabled(day, { excludeDateIntervals: [{ start: subDays(day, 1), end: day }], - }) - ).to.be.true; + }), + ).toBe(true); }); it("should throw error if excluded date interval is invalid", () => { @@ -241,13 +252,13 @@ describe("date_utils", function () { excludeDateIntervals: [ { start: addDays(day, 1), end: subDays(day, 1) }, ], - }) - ).to.throw("Invalid interval"); + }), + ).toThrow("Invalid interval"); }); it("should be enabled if excluded date interval is empty", () => { const day = newDate(); - expect(isDayDisabled(day, { excludeDateIntervals: [] })).to.be.false; + expect(isDayDisabled(day, { excludeDateIntervals: [] })).toBe(false); }); it("should be enabled if not in excluded date interval", () => { @@ -257,13 +268,13 @@ describe("date_utils", function () { excludeDateIntervals: [ { start: addDays(day, 1), end: addDays(day, 2) }, ], - }) - ).to.be.false; + }), + ).toBe(false); }); it("should be enabled if in included dates", () => { const day = newDate(); - expect(isDayDisabled(day, { includeDates: [day] })).to.be.false; + expect(isDayDisabled(day, { includeDates: [day] })).toBe(false); }); it("should be enabled if in included date intervals", () => { @@ -273,14 +284,14 @@ describe("date_utils", function () { includeDateIntervals: [ { start: subDays(day, 1), end: addDays(day, 1) }, ], - }) - ).to.be.false; + }), + ).toBe(false); }); it("should be disabled if not in included dates", () => { const day = newDate(); const includeDates = [addDays(day, 1)]; - expect(isDayDisabled(day, { includeDates })).to.be.true; + expect(isDayDisabled(day, { includeDates })).toBe(true); }); it("should be disabled if not in included dates", () => { @@ -290,20 +301,20 @@ describe("date_utils", function () { includeDateIntervals: [ { start: subDays(day, 10), end: subDays(day, 5) }, ], - }) - ).to.be.true; + }), + ).toBe(true); }); it("should be enabled if date filter returns true", () => { const day = newDate(); const filterDate = (d) => isEqual(d, day); - expect(isDayDisabled(day, { filterDate })).to.be.false; + expect(isDayDisabled(day, { filterDate })).toBe(false); }); it("should be disabled if date filter returns false", () => { const day = newDate(); const filterDate = (d) => !isEqual(d, day); - expect(isDayDisabled(day, { filterDate })).to.be.true; + expect(isDayDisabled(day, { filterDate })).toBe(true); }); it("should not allow date filter to modify input date", () => { @@ -314,14 +325,14 @@ describe("date_utils", function () { return true; }; isDayDisabled(day, { filterDate }); - expect(isEqual(day, dayClone)).to.be.true; + expect(isEqual(day, dayClone)).toBe(true); }); }); - describe("isDayExcluded", function () { + describe("isDayExcluded", () => { it("should not be excluded by default", () => { const day = newDate(); - expect(isDayExcluded(day)).to.be.false; + expect(isDayExcluded(day)).toBe(false); }); it("should be excluded if within excluded date interval", () => { @@ -331,13 +342,13 @@ describe("date_utils", function () { excludeDateIntervals: [ { start: subDays(day, 1), end: addDays(day, 1) }, ], - }) - ).to.be.true; + }), + ).toBe(true); }); it("should not be excluded if excluded date interval is empty", () => { const day = newDate(); - expect(isDayExcluded(day, { excludeDateIntervals: [] })).to.be.false; + expect(isDayExcluded(day, { excludeDateIntervals: [] })).toBe(false); }); it("should not be excluded if not within excluded date intervals", () => { @@ -347,8 +358,8 @@ describe("date_utils", function () { excludeDateIntervals: [ { start: addDays(day, 1), end: addDays(day, 2) }, ], - }) - ).to.be.false; + }), + ).toBe(false); }); it("should throw error if excluded date interval is invalid", () => { @@ -358,8 +369,8 @@ describe("date_utils", function () { excludeDateIntervals: [ { start: addDays(day, 1), end: subDays(day, 1) }, ], - }) - ).to.be.throw("Invalid interval"); + }), + ).toThrow("Invalid interval"); }); it("should not be excluded if in excluded dates and not within excluded date intervals", () => { @@ -370,13 +381,13 @@ describe("date_utils", function () { excludeDateIntervals: [ { start: addDays(day, 1), end: addDays(day, 2) }, ], - }) - ).to.be.false; + }), + ).toBe(false); }); it("should be excluded if in excluded dates and there are no excluded date intervals", () => { const day = newDate(); - expect(isDayExcluded(day, { excludeDates: [day] })).to.be.true; + expect(isDayExcluded(day, { excludeDates: [day] })).toBe(true); }); it("should not be excluded if not in excluded dates and there are no excluded date intervals", () => { @@ -388,60 +399,60 @@ describe("date_utils", function () { }); }); - describe("isMonthDisabled", function () { + describe("isMonthDisabled", () => { it("should be enabled by default", () => { const day = newDate(); - expect(isMonthDisabled(day)).to.be.false; + expect(isMonthDisabled(day)).toBe(false); }); it("should be enabled if on the min date", () => { const day = newDate(); - expect(isMonthDisabled(day, { minDate: day })).to.be.false; + expect(isMonthDisabled(day, { minDate: day })).toBe(false); }); it("should be disabled if before the min date", () => { const day = newDate(); const minDate = addDays(day, 40); - expect(isMonthDisabled(day, { minDate })).to.be.true; + expect(isMonthDisabled(day, { minDate })).toBe(true); }); it("should be enabled if on the max date", () => { const day = newDate(); - expect(isMonthDisabled(day, { maxDate: day })).to.be.false; + expect(isMonthDisabled(day, { maxDate: day })).toBe(false); }); it("should be disabled if after the max date", () => { const day = newDate(); const maxDate = subDays(day, 40); - expect(isMonthDisabled(day, { maxDate })).to.be.true; + expect(isMonthDisabled(day, { maxDate })).toBe(true); }); it("should be disabled if in excluded dates", () => { const day = newDate(); - expect(isMonthDisabled(day, { excludeDates: [day] })).to.be.true; + expect(isMonthDisabled(day, { excludeDates: [day] })).toBe(true); }); it("should be enabled if in included dates", () => { const day = newDate(); - expect(isMonthDisabled(day, { includeDates: [day] })).to.be.false; + expect(isMonthDisabled(day, { includeDates: [day] })).toBe(false); }); it("should be disabled if not in included dates", () => { const day = newDate(); const includeDates = [addDays(day, 40)]; - expect(isMonthDisabled(day, { includeDates })).to.be.true; + expect(isMonthDisabled(day, { includeDates })).toBe(true); }); it("should be enabled if date filter returns true", () => { const day = newDate(); const filterDate = (d) => isEqual(d, day); - expect(isMonthDisabled(day, { filterDate })).to.be.false; + expect(isMonthDisabled(day, { filterDate })).toBe(false); }); it("should be disabled if date filter returns false", () => { const day = newDate(); const filterDate = (d) => !isEqual(d, day); - expect(isMonthDisabled(day, { filterDate })).to.be.true; + expect(isMonthDisabled(day, { filterDate })).toBe(true); }); it("should not allow date filter to modify input date", () => { @@ -452,76 +463,78 @@ describe("date_utils", function () { return true; }; isMonthDisabled(day, { filterDate }); - expect(isEqual(day, dayClone)).to.be.true; + expect(isEqual(day, dayClone)).toBe(true); }); it("should be enabled if before minDate but same month", () => { const day = newDate("2023-01-01"); - expect(isMonthDisabled(day, { minDate: newDate("2023-01-02") })).to.be - .false; + expect(isMonthDisabled(day, { minDate: newDate("2023-01-02") })).toBe( + false, + ); }); it("should be enabled if after maxDate but same month", () => { const day = newDate("2023-01-02"); - expect(isMonthDisabled(day, { maxDate: newDate("2023-01-01") })).to.be - .false; + expect(isMonthDisabled(day, { maxDate: newDate("2023-01-01") })).toBe( + false, + ); }); }); - describe("isQuarterDisabled", function () { + describe("isQuarterDisabled", () => { it("should be enabled by default", () => { const day = newDate(); - expect(isQuarterDisabled(day)).to.be.false; + expect(isQuarterDisabled(day)).toBe(false); }); it("should be enabled if on the min date", () => { const day = newDate(); - expect(isQuarterDisabled(day, { minDate: day })).to.be.false; + expect(isQuarterDisabled(day, { minDate: day })).toBe(false); }); it("should be disabled if before the min date", () => { const day = newDate(); const minDate = addDays(day, 40); - expect(isQuarterDisabled(day, { minDate })).to.be.true; + expect(isQuarterDisabled(day, { minDate })).toBe(true); }); it("should be enabled if on the max date", () => { const day = newDate(); - expect(isQuarterDisabled(day, { maxDate: day })).to.be.false; + expect(isQuarterDisabled(day, { maxDate: day })).toBe(false); }); it("should be disabled if after the max date", () => { const day = newDate(); const maxDate = subDays(day, 40); - expect(isQuarterDisabled(day, { maxDate })).to.be.true; + expect(isQuarterDisabled(day, { maxDate })).toBe(true); }); it("should be disabled if in excluded dates", () => { const day = newDate(); - expect(isQuarterDisabled(day, { excludeDates: [day] })).to.be.true; + expect(isQuarterDisabled(day, { excludeDates: [day] })).toBe(true); }); it("should be enabled if in included dates", () => { const day = newDate(); - expect(isQuarterDisabled(day, { includeDates: [day] })).to.be.false; + expect(isQuarterDisabled(day, { includeDates: [day] })).toBe(false); }); it("should be disabled if not in included dates", () => { const day = newDate(); const includeDates = [addQuarters(day, 1)]; - expect(isQuarterDisabled(day, { includeDates })).to.be.true; + expect(isQuarterDisabled(day, { includeDates })).toBe(true); }); it("should be enabled if date filter returns true", () => { const day = newDate(); const filterDate = (d) => isEqual(d, day); - expect(isQuarterDisabled(day, { filterDate })).to.be.false; + expect(isQuarterDisabled(day, { filterDate })).toBe(false); }); it("should be disabled if date filter returns false", () => { const day = newDate(); const filterDate = (d) => !isEqual(d, day); - expect(isQuarterDisabled(day, { filterDate })).to.be.true; + expect(isQuarterDisabled(day, { filterDate })).toBe(true); }); it("should not allow date filter to modify input date", () => { @@ -532,184 +545,186 @@ describe("date_utils", function () { return true; }; isQuarterDisabled(day, { filterDate }); - expect(isEqual(day, dayClone)).to.be.true; + expect(isEqual(day, dayClone)).toBe(true); }); }); - describe("isYearDisabled", function () { + describe("isYearDisabled", () => { const year = 2023; const newYearsDay = newDate(`${year}-01-01`); it("should be enabled by default", () => { - expect(isYearDisabled(year)).to.be.false; + expect(isYearDisabled(year)).toBe(false); }); it("should be enabled if on the min date", () => { - expect(isYearDisabled(year, { minDate: newYearsDay })).to.be.false; + expect(isYearDisabled(year, { minDate: newYearsDay })).toBe(false); }); it("should be disabled if before the min date", () => { - expect(isYearDisabled(year, { minDate: addYears(newYearsDay, 1) })).to.be - .true; + expect(isYearDisabled(year, { minDate: addYears(newYearsDay, 1) })).toBe( + true, + ); }); it("should be enabled if on the max date", () => { - expect(isYearDisabled(year, { maxDate: newYearsDay })).to.be.false; + expect(isYearDisabled(year, { maxDate: newYearsDay })).toBe(false); }); it("should be disabled if after the max date", () => { - expect(isYearDisabled(year, { maxDate: addYears(newYearsDay, -1) })).to.be - .true; + expect(isYearDisabled(year, { maxDate: addYears(newYearsDay, -1) })).toBe( + true, + ); }); it("should be disabled if in excluded dates", () => { const day = newDate(); - expect(isYearDisabled(year, { excludeDates: [day] })).to.be.true; + expect(isYearDisabled(year, { excludeDates: [day] })).toBe(true); }); it("should be enabled if in included dates", () => { - expect(isYearDisabled(year, { includeDates: [newYearsDay] })).to.be.false; + expect(isYearDisabled(year, { includeDates: [newYearsDay] })).toBe(false); }); it("should be disabled if not in included dates", () => { const includeDates = [addYears(newYearsDay, 1)]; - expect(isYearDisabled(year, { includeDates })).to.be.true; + expect(isYearDisabled(year, { includeDates })).toBe(true); }); it("should be enabled if date filter returns true", () => { const filterDate = (d) => isSameYear(d, newYearsDay); - expect(isYearDisabled(year, { filterDate })).to.be.false; + expect(isYearDisabled(year, { filterDate })).toBe(false); }); it("should be disabled if date filter returns false", () => { const filterDate = (d) => !isSameYear(d, newYearsDay); - expect(isYearDisabled(year, { filterDate })).to.be.true; + expect(isYearDisabled(year, { filterDate })).toBe(true); }); }); describe("isValid", () => { it("should return true if date is valid and equal or after minDate", () => { - expect(isValid(newDate("2021-11-15"), newDate("2021-11-15"))).to.be.true; - expect(isValid(newDate("2021-11-30"), newDate("2021-11-15"))).to.be.true; + expect(isValid(newDate("2021-11-15"), newDate("2021-11-15"))).toBe(true); + expect(isValid(newDate("2021-11-30"), newDate("2021-11-15"))).toBe(true); }); it("should return false if date is valid and before minDate", () => { - expect(isValid(newDate("2021-11-01"), newDate("2021-11-15"))).to.be.false; + expect(isValid(newDate("2021-11-01"), newDate("2021-11-15"))).toBe(false); }); }); describe("monthDisabledBefore", () => { it("should return false by default", () => { - expect(monthDisabledBefore(newDate())).to.be.false; + expect(monthDisabledBefore(newDate())).toBe(false); }); it("should return true if min date is in the same month", () => { const day = newDate("2016-03-19"); const minDate = newDate("2016-03-01"); - expect(monthDisabledBefore(day, { minDate })).to.be.true; + expect(monthDisabledBefore(day, { minDate })).toBe(true); }); it("should return false if min date is in the previous month", () => { const day = newDate("2016-03-19"); const minDate = newDate("2016-02-29"); - expect(monthDisabledBefore(day, { minDate })).to.be.false; + expect(monthDisabledBefore(day, { minDate })).toBe(false); }); it("should return true if previous month is before include dates", () => { const day = newDate("2016-03-19"); const includeDates = [newDate("2016-03-01")]; - expect(monthDisabledBefore(day, { includeDates })).to.be.true; + expect(monthDisabledBefore(day, { includeDates })).toBe(true); }); }); describe("monthDisabledAfter", () => { it("should return false by default", () => { - expect(monthDisabledAfter(newDate())).to.be.false; + expect(monthDisabledAfter(newDate())).toBe(false); }); it("should return true if max date is in the same month", () => { const day = newDate("2016-03-19"); const maxDate = newDate("2016-03-31"); - expect(monthDisabledAfter(day, { maxDate })).to.be.true; + expect(monthDisabledAfter(day, { maxDate })).toBe(true); }); it("should return false if max date is in the next month", () => { const day = newDate("2016-03-19"); const maxDate = newDate("2016-04-01"); - expect(monthDisabledAfter(day, { maxDate })).to.be.false; + expect(monthDisabledAfter(day, { maxDate })).toBe(false); }); it("should return true if next month is after include dates", () => { const day = newDate("2016-03-19"); const includeDates = [newDate("2016-03-01")]; - expect(monthDisabledAfter(day, { includeDates })).to.be.true; + expect(monthDisabledAfter(day, { includeDates })).toBe(true); }); }); describe("yearDisabledBefore", () => { it("should return false by default", () => { - expect(yearDisabledBefore(newDate())).to.be.false; + expect(yearDisabledBefore(newDate())).toBe(false); }); it("should return true if min date is in the same year", () => { const day = newDate("2016-02-19"); const minDate = newDate("2016-03-01"); - expect(yearDisabledBefore(day, { minDate })).to.be.true; + expect(yearDisabledBefore(day, { minDate })).toBe(true); }); it("should return false if min date is in the previous year", () => { const day = newDate("2016-03-19"); const minDate = newDate("2015-03-29"); - expect(yearDisabledBefore(day, { minDate })).to.be.false; + expect(yearDisabledBefore(day, { minDate })).toBe(false); }); it("should return true if previous year is before include dates", () => { const day = newDate("2016-03-19"); const includeDates = [newDate("2016-03-01")]; - expect(yearDisabledBefore(day, { includeDates })).to.be.true; + expect(yearDisabledBefore(day, { includeDates })).toBe(true); }); }); describe("yearDisabledAfter", () => { it("should return false by default", () => { - expect(yearDisabledAfter(newDate())).to.be.false; + expect(yearDisabledAfter(newDate())).toBe(false); }); it("should return true if max date is in the same year", () => { const day = newDate("2016-03-19"); const maxDate = newDate("2016-08-31"); - expect(yearDisabledAfter(day, { maxDate })).to.be.true; + expect(yearDisabledAfter(day, { maxDate })).toBe(true); }); it("should return false if max date is in the next year", () => { const day = newDate("2016-03-19"); const maxDate = newDate("2017-04-01"); - expect(yearDisabledAfter(day, { maxDate })).to.be.false; + expect(yearDisabledAfter(day, { maxDate })).toBe(false); }); it("should return true if next year is after include dates", () => { const day = newDate("2016-03-19"); const includeDates = [newDate("2016-03-01")]; - expect(yearDisabledAfter(day, { includeDates })).to.be.true; + expect(yearDisabledAfter(day, { includeDates })).toBe(true); }); }); describe("getEffectiveMinDate", () => { it("should return null by default", () => { - expect(getEffectiveMinDate({})).to.not.exist; + expect(getEffectiveMinDate({})).toBeFalsy(); }); it("should return the min date", () => { const minDate = newDate("2016-03-30"); const result = getEffectiveMinDate({ minDate }); - assert(isEqual(minDate, result)); + expect(minDate).toEqual(result); }); it("should return the minimum include date", () => { const date1 = newDate("2016-03-30"); const date2 = newDate("2016-04-01"); const includeDates = [date1, date2]; - assert(isEqual(getEffectiveMinDate({ includeDates }), date1)); + expect(getEffectiveMinDate({ includeDates })).toEqual(date1); }); it("should return the minimum include date satisfying the min date", () => { @@ -717,25 +732,25 @@ describe("date_utils", function () { const date1 = newDate("2016-03-30"); const date2 = newDate("2016-04-01"); const includeDates = [date1, date2]; - assert(isEqual(getEffectiveMinDate({ minDate, includeDates }), date2)); + expect(getEffectiveMinDate({ minDate, includeDates })).toEqual(date2); }); }); describe("getEffectiveMaxDate", () => { it("should return null by default", () => { - expect(getEffectiveMaxDate({})).to.not.exist; + expect(getEffectiveMaxDate({})).toBeFalsy(); }); it("should return the max date", () => { const maxDate = newDate("2016-03-30"); - assert(isEqual(getEffectiveMaxDate({ maxDate }), maxDate)); + expect(getEffectiveMaxDate({ maxDate })).toEqual(maxDate); }); it("should return the maximum include date", () => { const date1 = newDate("2016-03-30"); const date2 = newDate("2016-04-01"); const includeDates = [date1, date2]; - assert(isEqual(getEffectiveMaxDate({ includeDates }), date2)); + expect(getEffectiveMaxDate({ includeDates })).toEqual(date2); }); it("should return the maximum include date satisfying the max date", () => { @@ -743,7 +758,7 @@ describe("date_utils", function () { const date1 = newDate("2016-03-30"); const date2 = newDate("2016-04-01"); const includeDates = [date1, date2]; - assert(isEqual(getEffectiveMaxDate({ maxDate, includeDates }), date1)); + expect(getEffectiveMaxDate({ maxDate, includeDates })).toEqual(date1); }); }); @@ -752,55 +767,55 @@ describe("date_utils", function () { const input = 11; const expected = "11"; const result = addZero(input); - assert(result === expected); + expect(result).toEqual(expected); }); it("should return the number prefixed with zero if less than 10", () => { const input = 1; const expected = "01"; const result = addZero(input); - assert(result === expected); + expect(result).toEqual(expected); }); }); - describe("isTimeDisabled", function () { + describe("isTimeDisabled", () => { it("should be enabled by default", () => { const date = newDate(); const time = setHours(setMinutes(date, 30), 1); - expect(isTimeDisabled(time)).to.be.false; + expect(isTimeDisabled(time)).toBe(false); }); it("should be disabled if in excluded times", () => { const date = newDate(); const time = setHours(setMinutes(date, 30), 1); - expect(isTimeDisabled(time, { excludeTimes: [time] })).to.be.true; + expect(isTimeDisabled(time, { excludeTimes: [time] })).toBe(true); }); it("should be enabled if in included times", () => { const date = newDate(); const time = setHours(setMinutes(date, 30), 1); - expect(isTimeDisabled(time, { includeTimes: [time] })).to.be.false; + expect(isTimeDisabled(time, { includeTimes: [time] })).toBe(false); }); it("should be disabled if not in included times", () => { const date = newDate(); const time = setHours(setMinutes(date, 30), 1); const includeTimes = [addHours(time, 1)]; - expect(isTimeDisabled(time, { includeTimes })).to.be.true; + expect(isTimeDisabled(time, { includeTimes })).toBe(true); }); it("should be enabled if time filter returns true", () => { const date = newDate(); const time = setHours(setMinutes(date, 30), 1); const filterTime = (t) => isEqual(t, time); - expect(isTimeDisabled(time, { filterTime })).to.be.false; + expect(isTimeDisabled(time, { filterTime })).toBe(false); }); it("should be disabled if time filter returns false", () => { const date = newDate(); const time = setHours(setMinutes(date, 30), 1); const filterTime = (t) => !isEqual(t, time); - expect(isTimeDisabled(time, { filterTime })).to.be.true; + expect(isTimeDisabled(time, { filterTime })).toBe(true); }); it("should not allow time filter to modify input time", () => { @@ -812,7 +827,7 @@ describe("date_utils", function () { return true; }; isTimeDisabled(time, { filterTime }); - expect(isEqual(time, timeClone)).to.be.true; + expect(isEqual(time, timeClone)).toBe(true); }); }); @@ -822,7 +837,7 @@ describe("date_utils", function () { const time = setHours(setMinutes(date, 30), 1); const minTime = setHours(setMinutes(date, 30), 0); const maxTime = setHours(setMinutes(date, 30), 5); - expect(isTimeInDisabledRange(time, { minTime, maxTime })).to.be.false; + expect(isTimeInDisabledRange(time, { minTime, maxTime })).toBe(false); }); it("should tell if time is not in disabled range", () => { @@ -830,7 +845,7 @@ describe("date_utils", function () { const time = setHours(setMinutes(date, 30), 0); const minTime = setHours(setMinutes(date, 30), 1); const maxTime = setHours(setMinutes(date, 30), 5); - expect(isTimeInDisabledRange(time, { minTime, maxTime })).to.be.true; + expect(isTimeInDisabledRange(time, { minTime, maxTime })).toBe(true); }); it("should not throw an exception if max time is before min time", () => { @@ -838,7 +853,7 @@ describe("date_utils", function () { const time = setHours(setMinutes(date, 30), 10); const minTime = setHours(setMinutes(date, 30), 5); const maxTime = setHours(setMinutes(date, 30), 0); - expect(isTimeInDisabledRange(time, { minTime, maxTime })).to.be.false; + expect(isTimeInDisabledRange(time, { minTime, maxTime })).toBe(false); }); }); @@ -847,35 +862,35 @@ describe("date_utils", function () { const day = newDate("2016-02-15 09:40"); const startDate = newDate("2016-02-01 09:40"); const endDate = newDate("2016-03-15 08:40"); - expect(isDayInRange(day, startDate, endDate)).to.be.true; + expect(isDayInRange(day, startDate, endDate)).toBe(true); }); it("should tell if day is in range, max bound test", () => { const day = newDate("2016-03-15 09:40"); const startDate = newDate("2016-02-01 09:40"); const endDate = newDate("2016-03-15 08:40"); - expect(isDayInRange(day, startDate, endDate)).to.be.true; + expect(isDayInRange(day, startDate, endDate)).toBe(true); }); it("should tell if day is in range, min bound test", () => { const day = newDate("2016-02-01 08:40"); const startDate = newDate("2016-02-01 09:40"); const endDate = newDate("2016-03-15 08:40"); - expect(isDayInRange(day, startDate, endDate)).to.be.true; + expect(isDayInRange(day, startDate, endDate)).toBe(true); }); it("should tell if day is not in range", () => { const day = newDate("2016-07-15 09:40"); const startDate = newDate("2016-02-15 09:40"); const endDate = newDate("2016-03-15 08:40"); - expect(isDayInRange(day, startDate, endDate)).to.be.false; + expect(isDayInRange(day, startDate, endDate)).toBe(false); }); it("should not throw exception if end date is before start date", () => { const day = newDate("2016-02-01 09:40"); const startDate = newDate("2016-02-15 09:40"); const endDate = newDate("2016-01-15 08:40"); - expect(isDayInRange(day, startDate, endDate)).to.be.false; + expect(isDayInRange(day, startDate, endDate)).toBe(false); }); }); @@ -884,7 +899,7 @@ describe("date_utils", function () { const value = "01/15/2019"; const dateFormat = "MM/dd/yyyy"; - expect(parseDate(value, dateFormat, null, true)).to.not.be.null; + expect(parseDate(value, dateFormat, null, true)).not.toBeNull(); }); it("should parse date based on locale", () => { @@ -894,35 +909,35 @@ describe("date_utils", function () { const expected = new Date("05/26/1995"); const actual = parseDate(value, dateFormat, "pt-BR", true); - assert(isEqual(actual, expected)); + expect(actual).toEqual(expected); }); it("should parse date that matches one of the formats", () => { const value = "01/15/2019"; const dateFormat = ["MM/dd/yyyy", "yyyy-MM-dd"]; - expect(parseDate(value, dateFormat, null, true)).to.not.be.null; + expect(parseDate(value, dateFormat, null, true)).not.toBeNull(); }); it("should not parse date that does not match the format", () => { const value = "01/15/20"; const dateFormat = "MM/dd/yyyy"; - expect(parseDate(value, dateFormat, null, true)).to.be.null; + expect(parseDate(value, dateFormat, null, true)).toBeNull(); }); it("should not parse date that does not match any of the formats", () => { const value = "01/15/20"; const dateFormat = ["MM/dd/yyyy", "yyyy-MM-dd"]; - expect(parseDate(value, dateFormat, null, true)).to.be.null; + expect(parseDate(value, dateFormat, null, true)).toBeNull(); }); it("should parse date without strict parsing", () => { const value = "01/15/20"; const dateFormat = "MM/dd/yyyy"; - expect(parseDate(value, dateFormat, null, false)).to.not.be.null; + expect(parseDate(value, dateFormat, null, false)).not.toBeNull(); }); it("should parse date based on locale without strict parsing", () => { @@ -932,7 +947,7 @@ describe("date_utils", function () { const expected = new Date("05/26/1995"); const actual = parseDate(value, dateFormat, "pt-BR", false); - assert(isEqual(actual, expected)); + expect(actual).toEqual(expected); }); it("should not parse date based on locale without a given locale", () => { @@ -941,7 +956,7 @@ describe("date_utils", function () { const actual = parseDate(value, dateFormat, null, false); - expect(actual).to.be.null; + expect(actual).toBeNull(); }); it("should parse date based on default locale", () => { @@ -953,7 +968,7 @@ describe("date_utils", function () { const actual = parseDate(value, dateFormat, null, false); setDefaultLocale(null); - assert(isEqual(actual, expected)); + expect(actual).toEqual(expected); }); }); @@ -963,7 +978,7 @@ describe("date_utils", function () { const startDate = newDate("2015-01-01"); const endDate = newDate("2015-08-01"); - expect(isMonthinRange(startDate, endDate, 4, day)).to.be.true; + expect(isMonthinRange(startDate, endDate, 4, day)).toBe(true); }); it("should return false if the month passed is not in range", () => { @@ -971,7 +986,7 @@ describe("date_utils", function () { const startDate = newDate("2015-01-01"); const endDate = newDate("2015-08-01"); - expect(isMonthinRange(startDate, endDate, 9, day)).to.be.false; + expect(isMonthinRange(startDate, endDate, 9, day)).toBe(false); }); it("should return true if the month passed is in range and maxDate +1 year", () => { @@ -979,15 +994,15 @@ describe("date_utils", function () { const startDate = newDate("2019-06-04"); const endDate = newDate("2020-02-01"); - expect(isMonthinRange(startDate, endDate, 5, day)).to.be.true; + expect(isMonthinRange(startDate, endDate, 5, day)).toBe(true); }); }); describe("getStartOfYear", () => { it("should return the start of the year", () => { const day = new Date("2020-04-13T00:00:00.000+08:00"); - expect(getStartOfYear(day).getDate()).to.be.eq(1); - expect(getStartOfYear(day).getMonth()).to.be.eq(0); + expect(getStartOfYear(day).getDate()).toBe(1); + expect(getStartOfYear(day).getMonth()).toBe(0); }); }); @@ -997,7 +1012,7 @@ describe("date_utils", function () { const startDate = newDate("2015-01-01"); const endDate = newDate("2015-08-01"); - expect(isQuarterInRange(startDate, endDate, 2, day)).to.be.true; + expect(isQuarterInRange(startDate, endDate, 2, day)).toBe(true); }); it("should return false if the quarter passed is not in range", () => { @@ -1005,7 +1020,7 @@ describe("date_utils", function () { const startDate = newDate("2015-01-01"); const endDate = newDate("2015-09-01"); - expect(isQuarterInRange(startDate, endDate, 4, day)).to.be.false; + expect(isQuarterInRange(startDate, endDate, 4, day)).toBe(false); }); it("should return true if the quarter passed is in range and maxDate +1 year", () => { @@ -1013,7 +1028,7 @@ describe("date_utils", function () { const startDate = newDate("2019-06-04"); const endDate = newDate("2020-02-01"); - expect(isQuarterInRange(startDate, endDate, 5, day)).to.be.true; + expect(isQuarterInRange(startDate, endDate, 5, day)).toBe(true); }); }); @@ -1022,22 +1037,22 @@ describe("date_utils", function () { const startDate = newDate("2000-01-01"); const endDate = newDate("2015-08-01"); // Check start range - expect(isYearInRange(2000, startDate, endDate)).to.be.true; + expect(isYearInRange(2000, startDate, endDate)).toBe(true); // Check end range - expect(isYearInRange(2015, startDate, endDate)).to.be.true; - expect(isYearInRange(2010, startDate, endDate)).to.be.true; + expect(isYearInRange(2015, startDate, endDate)).toBe(true); + expect(isYearInRange(2010, startDate, endDate)).toBe(true); }); it("should return false if the year passed is not in range", () => { const startDate = newDate("2000-01-01"); const endDate = newDate("2015-08-01"); - expect(isYearInRange(1999, startDate, endDate)).to.be.false; - expect(isYearInRange(2016, startDate, endDate)).to.be.false; + expect(isYearInRange(1999, startDate, endDate)).toBe(false); + expect(isYearInRange(2016, startDate, endDate)).toBe(false); }); it("should return false if range isn't passed", () => { - expect(isYearInRange(2016)).to.be.false; + expect(isYearInRange(2016)).toBe(false); }); }); @@ -1045,80 +1060,80 @@ describe("date_utils", function () { it("should get start and end of default 11 years period", () => { const date = newDate("2000-01-01"); const { startPeriod, endPeriod } = getYearsPeriod(date); - expect(startPeriod).to.be.eq(1993); - expect(endPeriod).to.be.eq(2004); + expect(startPeriod).toBe(1993); + expect(endPeriod).toBe(2004); }); it("should get start and end of custom 8 years period", () => { const date = newDate("2000-01-01"); const { startPeriod, endPeriod } = getYearsPeriod(date, 9); - expect(startPeriod).to.be.eq(1999); - expect(endPeriod).to.be.eq(2007); + expect(startPeriod).toBe(1999); + expect(endPeriod).toBe(2007); }); }); describe("yearsDisabledAfter", () => { it("should return false by default", () => { - expect(yearsDisabledAfter(newDate())).to.be.false; + expect(yearsDisabledAfter(newDate())).toBe(false); }); it("should return true if max date is in the same year", () => { const day = newDate("2016-03-19"); const maxDate = newDate("2016-08-31"); - expect(yearsDisabledAfter(day, { maxDate })).to.be.true; + expect(yearsDisabledAfter(day, { maxDate })).toBe(true); }); it("should return false if max date is in the next period years", () => { const day = newDate("2016-03-19"); const maxDate = newDate("2018-04-01"); - expect(yearsDisabledAfter(day, { maxDate })).to.be.false; + expect(yearsDisabledAfter(day, { maxDate })).toBe(false); }); it("should return false if max date is in a next period year", () => { const day = newDate("1996-08-08 00:00:00"); const maxDate = newDate("2020-08-08 00:00:00"); - expect(yearsDisabledAfter(day, { maxDate })).to.be.false; + expect(yearsDisabledAfter(day, { maxDate })).toBe(false); }); }); describe("yearsDisabledBefore", () => { it("should return false by default", () => { - expect(yearsDisabledBefore(newDate())).to.be.false; + expect(yearsDisabledBefore(newDate())).toBe(false); }); it("should return true if min date is in the same year", () => { const day = newDate("2016-02-19"); const minDate = newDate("2016-03-01"); - expect(yearsDisabledBefore(day, { minDate })).to.be.true; + expect(yearsDisabledBefore(day, { minDate })).toBe(true); }); it("should return false if min date is in the previous period year", () => { const day = newDate("2016-03-19"); const minDate = newDate("2004-03-29"); - expect(yearsDisabledBefore(day, { minDate })).to.be.false; + expect(yearsDisabledBefore(day, { minDate })).toBe(false); }); it("should return false if min date is in a previous period year", () => { const day = newDate("2044-08-08 00:00:00"); const minDate = newDate("2020-08-08 00:00:00"); - expect(yearsDisabledBefore(day, { minDate })).to.be.false; + expect(yearsDisabledBefore(day, { minDate })).toBe(false); }); }); describe("week", () => { it("should return the first 2021 year week", () => { const first2021Day = new Date("2021-01-01"); - assert(getWeek(first2021Day) === 53); + expect(getWeek(first2021Day)).toEqual(53); }); it("should return the 4 2021 year week", () => { const date = new Date("2021-01-19"); - assert(getWeek(date) === 3); + expect(getWeek(date)).toEqual(3); }); it("should return the first 2022 year week", () => { const first2022Day = new Date("2022-01-01"); - assert(getWeek(first2022Day) === 52); + expect(getWeek(first2022Day)).toEqual(52); }); }); @@ -1131,22 +1146,22 @@ describe("date_utils", function () { it("should return blank string when startDate and endDate are both null", () => { const startDate = null; const endDate = null; - expect(safeDateRangeFormat(startDate, endDate, props)).to.equal(""); + expect(safeDateRangeFormat(startDate, endDate, props)).toBe(""); }); it("should return a formatted startDate followed by a dash when endDate is null", () => { const startDate = new Date("2021-04-20 00:00:00"); const endDate = null; - expect(safeDateRangeFormat(startDate, endDate, props)).to.equal( - "04/20/2021 - " + expect(safeDateRangeFormat(startDate, endDate, props)).toBe( + "04/20/2021 - ", ); }); it("should return a formatted startDate followed by a dash followed by a formatted endDate when startDate and endDate both have values", () => { const startDate = new Date("2021-04-20 00:00:00"); const endDate = new Date("2021-04-28 00:00:00"); - expect(safeDateRangeFormat(startDate, endDate, props)).to.equal( - "04/20/2021 - 04/28/2021" + expect(safeDateRangeFormat(startDate, endDate, props)).toBe( + "04/20/2021 - 04/28/2021", ); }); }); @@ -1156,42 +1171,42 @@ describe("date_utils", function () { const holidayDates = [ { date: new Date(2023, 7, 15), - holidayName: "India's Independence Day" + holidayName: "India's Independence Day", }, { date: new Date(2023, 11, 25), - holidayName: "Christmas" - } + holidayName: "Christmas", + }, ]; - expect(getHolidaysMap(holidayDates)).to.have.lengthOf(2); - expect(getHolidaysMap(holidayDates)).to.have.all.keys( + + expect([...getHolidaysMap(holidayDates).keys()]).toEqual([ "08.15.2023", - "12.25.2023" - ); + "12.25.2023", + ]); }); it("should return empty if invalid date is provided", () => { const holidayDates = [ { date: "2024-02-31", - holidayName: "Fake holiday" - } + holidayName: "Fake holiday", + }, ]; - expect(getHolidaysMap(holidayDates)).to.have.lengthOf(0); + expect([...getHolidaysMap(holidayDates).keys()]).toHaveLength(0); }); it("should not add duplicate entries", () => { const holidayDates = [ { date: new Date(2023, 7, 15), - holidayName: "India's Independence Day" + holidayName: "India's Independence Day", }, { date: new Date(2023, 7, 15), - holidayName: "India's Independence Day" - } + holidayName: "India's Independence Day", + }, ]; - expect(getHolidaysMap(holidayDates)).to.have.lengthOf(1); + expect([...getHolidaysMap(holidayDates).keys()]).toHaveLength(1); }); }); @@ -1199,13 +1214,13 @@ describe("date_utils", function () { it("should return true if both arrays are equal", () => { const array1 = ["India's Independence Day", "Christmas"]; const array2 = ["India's Independence Day", "Christmas"]; - expect(arraysAreEqual(array1, array2)).to.be.true; + expect(arraysAreEqual(array1, array2)).toBe(true); }); it("should return false if both arrays are not equal", () => { const array1 = ["India's Independence Day", "Christmas"]; const array2 = ["New Year's day"]; - expect(arraysAreEqual(array1, array2)).to.be.false; + expect(arraysAreEqual(array1, array2)).toBe(false); }); }); }); diff --git a/test/datepicker_test.js b/test/datepicker_test.test.js similarity index 76% rename from test/datepicker_test.js rename to test/datepicker_test.test.js index 26b257ae0..c941306ca 100644 --- a/test/datepicker_test.js +++ b/test/datepicker_test.test.js @@ -5,41 +5,35 @@ import { enUS, enGB } from "date-fns/locale"; import { mount } from "enzyme"; import defer from "lodash/defer"; import DatePicker, { registerLocale } from "../src/index.jsx"; -import Day from "../src/day"; -import WeekNumber from "../src/week_number"; +import Day from "../src/day.jsx"; +import WeekNumber from "../src/week_number.jsx"; import TestWrapper from "./test_wrapper.jsx"; import PopperComponent from "../src/popper_component.jsx"; import CustomInput from "./helper_components/custom_input.jsx"; -import * as utils from "../src/date_utils"; +import * as utils from "../src/date_utils.js"; import Month from "../src/month.jsx"; -import { getKey } from "./test_utils"; +import { getKey } from "./test_utils.js"; function getSelectedDayNode(datePicker) { return ( datePicker.calendar && datePicker.calendar.componentNode.querySelector( - '.react-datepicker__day[tabindex="0"]' + '.react-datepicker__day[tabindex="0"]', ) ); } describe("DatePicker", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - afterEach(() => { - sandbox.restore(); + jest.resetAllMocks(); }); it("should show the calendar when focusing on the date input", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.calendar).to.exist; + expect(datePicker.calendar).toBeDefined(); }); it("should allow the user to supply a wrapper component for the popper", () => { @@ -48,8 +42,8 @@ describe("DatePicker", () => { const dateInput = datePicker.instance().input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.find(".test-wrapper").length).to.equal(1); - expect(datePicker.instance().calendar).to.exist; + expect(datePicker.find(".test-wrapper").length).toBe(1); + expect(datePicker.instance().calendar).toBeDefined(); }); it("should allow the user to pass a wrapper component for the calendar", () => { @@ -59,8 +53,8 @@ describe("DatePicker", () => { TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); datePicker.update(); - expect(datePicker.find(".test-wrapper").length).to.equal(1); - expect(datePicker.instance().calendar).to.exist; + expect(datePicker.find(".test-wrapper").length).toBe(1); + expect(datePicker.instance().calendar).toBeDefined(); }); it("should pass a custom class to the popper container", () => { @@ -70,15 +64,15 @@ describe("DatePicker", () => { datePicker.update(); const popper = datePicker.find(".react-datepicker-popper"); - expect(popper.length).to.equal(1); - expect(popper.hasClass("some-class-name")).to.equal(true); + expect(popper.length).toBe(1); + expect(popper.hasClass("some-class-name")).toBe(true); }); it("should show the calendar when clicking on the date input", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; TestUtils.Simulate.click(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.calendar).to.exist; + expect(datePicker.calendar).toBeDefined(); }); it("should render the calendar in the portalHost prop when provided", () => { @@ -88,19 +82,19 @@ describe("DatePicker", () => { shadow.appendChild(appHost); var datePicker = ReactDOM.render( , - appHost + appHost, ); var dateInput = datePicker.input; TestUtils.Simulate.click(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.calendar).to.exist; - expect(shadow.getElementById("test-portal")).to.exist; + expect(datePicker.calendar).toBeDefined(); + expect(shadow.getElementById("test-portal")).toBeDefined(); }); - it("should not set open state when it is disabled and gets clicked", function () { + it("should not set open state when it is disabled and gets clicked", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; TestUtils.Simulate.click(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.state.open).to.be.false; + expect(datePicker.state.open).toBe(false); }); it("should close the popper and return focus to the date input.", (done) => { @@ -122,26 +116,26 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(today, getKey("Escape")); defer(() => { - expect(datePicker.calendar).to.not.exist; - expect(datePicker.state.preventFocus).to.be.false; - expect(document.activeElement).to.equal(div.querySelector("input")); + expect(datePicker.calendar).toBeFalsy(); + expect(datePicker.state.preventFocus).toBe(false); + expect(document.activeElement).toBe(div.querySelector("input")); done(); }); }); - it("should not re-focus the date input when focusing the year dropdown", (done) => { - const onBlurSpy = sandbox.spy(); + it("should not re-focus the date input when focusing the year dropdown", () => { + const onBlurSpy = jest.fn(); const datePicker = mount( + />, ); const dateInput = datePicker.instance().input; const dateInputWrapper = datePicker.find("input"); - const focusSpy = sandbox.spy(dateInput, "focus"); + const focusSpy = jest.spyOn(dateInput, "focus"); dateInputWrapper.simulate("focus"); const calendarWrapper = datePicker.find("Calendar"); @@ -149,21 +143,18 @@ describe("DatePicker", () => { dateInputWrapper.simulate("blur"); yearSelect.simulate("focus"); - defer(() => { - assert(focusSpy.called === false, "should not refocus the date input"); - assert(onBlurSpy.called === false, "should not call DatePicker onBlur"); - done(); - }); + expect(focusSpy).not.toBeCalled(); + expect(onBlurSpy).not.toBeCalled(); }); - it("should fire onYearChange when the year is selected", (done) => { - const onYearChangeSpy = sinon.spy(); + it("should fire onYearChange when the year is selected", () => { + const onYearChangeSpy = jest.fn(); const datePicker = mount( + />, ); const dateInputWrapper = datePicker.find("input"); @@ -172,10 +163,7 @@ describe("DatePicker", () => { const yearSelect = calendarWrapper.find(".react-datepicker__year-select"); yearSelect.simulate("change"); - defer(() => { - assert(onYearChangeSpy.called === true, "onYearChange should be called"); - done(); - }); + expect(onYearChangeSpy).toHaveBeenCalled(); }); it("should keep the calendar shown when clicking the calendar", () => { @@ -183,21 +171,21 @@ describe("DatePicker", () => { var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); TestUtils.Simulate.click(ReactDOM.findDOMNode(datePicker.calendar)); - expect(datePicker.calendar).to.exist; + expect(datePicker.calendar).toBeDefined(); }); - it("should not set open state when it is disabled and gets clicked", function () { + it("should not set open state when it is disabled and gets clicked", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; TestUtils.Simulate.click(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.state.open).to.be.false; + expect(datePicker.state.open).toBe(false); }); - it("should not set open state when it is readOnly and gets clicked", function () { + it("should not set open state when it is readOnly and gets clicked", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; TestUtils.Simulate.click(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.state.open).to.be.false; + expect(datePicker.state.open).toBe(false); }); it("should hide the calendar when clicking a day on the calendar", () => { @@ -206,33 +194,33 @@ describe("DatePicker", () => { TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); var day = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Day + Day, )[0]; TestUtils.Simulate.click(ReactDOM.findDOMNode(day)); - expect(datePicker.calendar).to.not.exist; + expect(datePicker.calendar).toBeFalsy(); }); it("should not hide the calendar when clicking a day on the calendar and shouldCloseOnSelect prop is false", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); var day = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Day + Day, )[0]; TestUtils.Simulate.click(ReactDOM.findDOMNode(day)); - expect(datePicker.state.open).to.be.true; + expect(datePicker.state.open).toBe(true); }); it("should set open to true if showTimeInput is true", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); var handleTimeChange = datePicker.handleTimeChange; handleTimeChange("13:00"); - expect(datePicker.state.open).to.be.true; + expect(datePicker.state.open).toBe(true); }); it("should not hide the calendar when selecting a day in the calendar with Enter press, and shouldCloseOnSelect prop is false", () => { @@ -242,9 +230,9 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowUp")); TestUtils.Simulate.keyDown( ReactDOM.findDOMNode(dateInput), - getKey("Enter") + getKey("Enter"), ); - expect(data.datePicker.state.open).to.be.true; + expect(data.datePicker.state.open).toBe(true); }); it("should update the preSelection state when a day is selected with Enter press", () => { @@ -253,21 +241,21 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowDown") + getKey("ArrowDown"), ); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowDown") + getKey("ArrowDown"), ); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("Enter") + getKey("Enter"), ); data.copyM = utils.addWeeks(data.copyM, 2); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); xit("should update the preSelection state when a day is selected with mouse click", () => { @@ -284,8 +272,8 @@ describe("DatePicker", () => { : utils.subDays(data.copyM, 1); // update copyM to expected date expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should update the preSelection state when Today button is clicked after selecting a different day for inline mode", () => { @@ -298,7 +286,7 @@ describe("DatePicker", () => { // eslint-disable-next-line var date = d; }} - /> + />, ); var today = getSelectedDayNode(datePicker); @@ -306,13 +294,13 @@ describe("DatePicker", () => { TestUtils.Simulate.click(anyOtherDay); // will update the preSelection to next or previous day var todayBtn = datePicker.calendar.componentNode.querySelector( - ".react-datepicker__today-button" + ".react-datepicker__today-button", ); TestUtils.Simulate.click(todayBtn); // will update the preSelection - expect( - utils.formatDate(datePicker.state.preSelection, "yyyy-MM-dd") - ).to.equal(utils.formatDate(utils.newDate(), "yyyy-MM-dd")); + expect(utils.formatDate(datePicker.state.preSelection, "yyyy-MM-dd")).toBe( + utils.formatDate(utils.newDate(), "yyyy-MM-dd"), + ); }); it("should hide the calendar when pressing enter in the date input", () => { @@ -321,9 +309,9 @@ describe("DatePicker", () => { TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); TestUtils.Simulate.keyDown( ReactDOM.findDOMNode(dateInput), - getKey("Enter") + getKey("Enter"), ); - expect(datePicker.calendar).to.not.exist; + expect(datePicker.calendar).toBeFalsy(); }); it("should hide the calendar when the pressing escape in the date input", () => { @@ -332,36 +320,32 @@ describe("DatePicker", () => { TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); TestUtils.Simulate.keyDown( ReactDOM.findDOMNode(dateInput), - getKey("Escape") + getKey("Escape"), ); - expect(datePicker.calendar).to.not.exist; + expect(datePicker.calendar).toBeFalsy(); }); - it("should hide the calendar when the pressing Shift + Tab in the date input", (done) => { + it("should hide the calendar when the pressing Shift + Tab in the date input", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); var dateInput = datePicker.input; - const onBlurSpy = sandbox.spy(dateInput, "blur"); + const onBlurSpy = jest.spyOn(dateInput, "blur"); TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); TestUtils.Simulate.keyDown( ReactDOM.findDOMNode(dateInput), - getKey("Tab", true) + getKey("Tab", true), ); - expect(datePicker.calendar).to.not.exist; - - defer(() => { - assert(onBlurSpy.called === true, "should blur date input"); - done(); - }); + expect(datePicker.calendar).toBeNull(); + expect(onBlurSpy).toHaveBeenCalled(); }); it("should not apply the react-datepicker-ignore-onclickoutside class to the date input when closed", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; - expect(ReactDOM.findDOMNode(dateInput).className).to.not.contain( - "react-datepicker-ignore-onclickoutside" + expect(ReactDOM.findDOMNode(dateInput).className).not.toContain( + "react-datepicker-ignore-onclickoutside", ); }); @@ -369,20 +353,20 @@ describe("DatePicker", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); - expect(ReactDOM.findDOMNode(dateInput).className).to.contain( - "react-datepicker-ignore-onclickoutside" + expect(ReactDOM.findDOMNode(dateInput).className).toContain( + "react-datepicker-ignore-onclickoutside", ); }); it("should set the type attribute on the clear button to button", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); var clearButton = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__close-icon" + "react-datepicker__close-icon", ); - expect(clearButton.type).to.equal("button"); + expect(clearButton.type).toBe("button"); }); it("should allow clearing the date when isClearable is true", () => { @@ -397,26 +381,26 @@ describe("DatePicker", () => { selected={utils.newDate("2015-12-15")} isClearable onChange={handleChange} - /> + />, ); var clearButton = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__close-icon" + "react-datepicker__close-icon", ); TestUtils.Simulate.click(clearButton); - expect(cleared).to.be.true; + expect(cleared).toBe(true); }); it("should clear input value in the local state", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); var clearButton = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__close-icon" + "react-datepicker__close-icon", ); TestUtils.Simulate.click(clearButton); - expect(datePicker.state.inputValue).to.be.null; + expect(datePicker.state.inputValue).toBeNull(); }); it("should set the title attribute on the clear button if clearButtonTitle is supplied", () => { @@ -425,38 +409,38 @@ describe("DatePicker", () => { selected={utils.newDate("2018-03-19")} isClearable clearButtonTitle="clear button" - /> + />, ); const clearButtonText = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__close-icon" + "react-datepicker__close-icon", ).getAttribute("title"); - expect(clearButtonText).to.equal("clear button"); + expect(clearButtonText).toBe("clear button"); }); it("should customize the className attribute on the clear button if clearButtonClassName is supplied", () => { let datePicker = TestUtils.renderIntoDocument( - + , ); let clearButtonClass = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__close-icon" + "react-datepicker__close-icon", ).getAttribute("class"); - expect(clearButtonClass).to.equal("react-datepicker__close-icon"); + expect(clearButtonClass).toBe("react-datepicker__close-icon"); datePicker = TestUtils.renderIntoDocument( + />, ); clearButtonClass = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__close-icon" + "react-datepicker__close-icon", ).getAttribute("class"); - expect(clearButtonClass).to.equal( - "react-datepicker__close-icon customized-close-icon" + expect(clearButtonClass).toBe( + "react-datepicker__close-icon customized-close-icon", ); }); @@ -471,17 +455,17 @@ describe("DatePicker", () => { onChange={(d) => { date = d; }} - /> + />, ); var dayButton = TestUtils.scryRenderedDOMComponentsWithClass( datePicker, - "react-datepicker__day" + "react-datepicker__day", )[0]; TestUtils.Simulate.click(dayButton); - expect(utils.getHours(date)).to.equal(10); - expect(utils.getMinutes(date)).to.equal(11); - expect(utils.getSeconds(date)).to.equal(12); + expect(utils.getHours(date)).toBe(10); + expect(utils.getMinutes(date)).toBe(11); + expect(utils.getSeconds(date)).toBe(12); }); it("should save time from the selected date during date change", () => { @@ -494,16 +478,16 @@ describe("DatePicker", () => { onChange={(d) => { date = d; }} - /> + />, ); var input = ReactDOM.findDOMNode(datePicker.input); input.value = utils.newDate("2014-01-02"); TestUtils.Simulate.change(input); - expect(utils.getHours(date)).to.equal(10); - expect(utils.getMinutes(date)).to.equal(11); - expect(utils.getSeconds(date)).to.equal(12); + expect(utils.getHours(date)).toBe(10); + expect(utils.getMinutes(date)).toBe(11); + expect(utils.getSeconds(date)).toBe(12); }); it("should mount and unmount properly", (done) => { @@ -526,7 +510,7 @@ describe("DatePicker", () => { expect(function () { TestUtils.findRenderedComponentWithType(datePicker, PopperComponent); - }).to.not.throw(); + }).not.toThrow(); }); it("should render calendar directly without PopperComponent when inline prop is set", () => { @@ -534,29 +518,29 @@ describe("DatePicker", () => { expect(function () { TestUtils.findRenderedComponentWithType(datePicker, PopperComponent); - }).to.throw(); - expect(datePicker.calendar).to.exist; + }).toThrow(); + expect(datePicker.calendar).toBeDefined(); }); it("should ignore disable prop when inline prop is set", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); - expect(datePicker.calendar).to.exist; + expect(datePicker.calendar).toBeDefined(); }); it("should ignore withPortal prop when inline prop is set", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); expect(function () { TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__portal" + "react-datepicker__portal", ); - }).to.throw(); + }).toThrow(); }); it("should render Calendar in portal when withPortal is set and input has focus", () => { @@ -567,15 +551,15 @@ describe("DatePicker", () => { expect(function () { TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__portal" + "react-datepicker__portal", ); - }).to.not.throw(); - expect(datePicker.calendar).to.exist; + }).not.toThrow(); + expect(datePicker.calendar).toBeDefined(); }); it("should render Calendar in portal when withPortal is set and should close on Escape key when focus is on header", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); @@ -583,21 +567,21 @@ describe("DatePicker", () => { expect(function () { TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__portal" + "react-datepicker__portal", ); - }).to.not.throw(); - expect(datePicker.calendar).to.exist; + }).not.toThrow(); + expect(datePicker.calendar).toBeDefined(); var header = TestUtils.scryRenderedDOMComponentsWithClass( datePicker, - "react-datepicker__current-month" + "react-datepicker__current-month", )[0]; TestUtils.Simulate.click(ReactDOM.findDOMNode(header)); TestUtils.Simulate.keyDown(ReactDOM.findDOMNode(header), getKey("Escape")); - expect(datePicker.calendar).to.not.exist; + expect(datePicker.calendar).toBeFalsy(); }); it("should not render Calendar when withPortal is set and no focus is given to input", () => { @@ -606,20 +590,20 @@ describe("DatePicker", () => { expect(function () { TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__portal" + "react-datepicker__portal", ); - }).to.throw(); - expect(datePicker.calendar).not.to.exist; + }).toThrow(); + expect(datePicker.calendar).toBeFalsy(); }); it("should render Calendar in a ReactDOM portal when withPortal is set and portalId is set", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); - expect(document.getElementById("portal-id-dom-test")).to.exist; + expect(document.getElementById("portal-id-dom-test")).toBeDefined(); }); function getOnInputKeyDownStuff(opts) { @@ -628,8 +612,8 @@ describe("DatePicker", () => { var copyM = utils.newDate(m); var testFormat = "yyyy-MM-dd"; var exactishFormat = "yyyy-MM-dd hh: zzzz"; - var callback = sandbox.spy(); - var onInputErrorCallback = sandbox.spy(); + var callback = jest.fn(); + var onInputErrorCallback = jest.fn(); var datePicker = TestUtils.renderIntoDocument( { onInputError={onInputErrorCallback} dateFormat={testFormat} {...opts} - /> + />, ); var dateInput = datePicker.input; var nodeInput = ReactDOM.findDOMNode(dateInput); @@ -662,119 +646,119 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowLeft") + getKey("ArrowLeft"), ); data.copyM = utils.subDays(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should handle onDayKeyDown ArrowRight", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowRight") + getKey("ArrowRight"), ); data.copyM = utils.addDays(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should handle onDayKeyDown ArrowUp", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowUp") + getKey("ArrowUp"), ); data.copyM = utils.subWeeks(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should handle onDayKeyDown ArrowDown", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowDown") + getKey("ArrowDown"), ); data.copyM = utils.addWeeks(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should handle onDayKeyDown PageUp", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("PageUp") + getKey("PageUp"), ); data.copyM = utils.subMonths(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should handle onDayKeyDown PageDown", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("PageDown") + getKey("PageDown"), ); data.copyM = utils.addMonths(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should handle onDayKeyDown End", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("End") + getKey("End"), ); data.copyM = utils.addYears(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should handle onDayKeyDown Home", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("Home") + getKey("Home"), ); data.copyM = utils.subYears(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should call onMonthchange when keyboard navigation moves preSelection to different month", () => { - var onMonthChangeSpy = sandbox.spy(); + var onMonthChangeSpy = jest.fn(); var opts = { onMonthChange: onMonthChangeSpy }; var data = getOnInputKeyDownStuff(opts); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("PageDown") + getKey("PageDown"), ); - expect(onMonthChangeSpy.calledOnce).to.be.true; + expect(onMonthChangeSpy).toHaveBeenCalledTimes(1); }); it("should call onSelect only once when keyboard navigation moves selection to different month", () => { - var onSelectSpy = sandbox.spy(); + var onSelectSpy = jest.fn(); var opts = { onSelect: onSelectSpy, adjustDateOnChange: true }; var data = getOnInputKeyDownStuff(opts); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("PageDown") + getKey("PageDown"), ); - expect(onSelectSpy.calledOnce).to.be.true; + expect(onSelectSpy).toHaveBeenCalledTimes(1); }); it("should not preSelect date if not between minDate and maxDate", () => { var data = getOnInputKeyDownStuff({ @@ -783,8 +767,8 @@ describe("DatePicker", () => { }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should not preSelect date if before minDate", () => { var data = getOnInputKeyDownStuff({ @@ -792,8 +776,8 @@ describe("DatePicker", () => { }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowUp")); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should not preSelect date if after maxDate", () => { var data = getOnInputKeyDownStuff({ @@ -801,8 +785,8 @@ describe("DatePicker", () => { }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should be possible to preSelect minDate (no maxDate set)", () => { @@ -812,17 +796,15 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowRight") + getKey("ArrowRight"), ); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowLeft") + getKey("ArrowLeft"), ); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal( - utils.formatDate(data.datePicker.props.minDate, data.testFormat) - ); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.datePicker.props.minDate, data.testFormat)); }); it("should be possible to preSelect minDate (maxDate set)", () => { @@ -833,17 +815,15 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowRight") + getKey("ArrowRight"), ); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowLeft") + getKey("ArrowLeft"), ); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal( - utils.formatDate(data.datePicker.props.minDate, data.testFormat) - ); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.datePicker.props.minDate, data.testFormat)); }); it("should be possible to preSelect maxDate (no minDate set)", () => { @@ -853,13 +833,11 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowRight") + getKey("ArrowRight"), ); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal( - utils.formatDate(data.datePicker.props.maxDate, data.testFormat) - ); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.datePicker.props.maxDate, data.testFormat)); }); it("should be possible to preSelect maxDate (minDate set)", () => { @@ -870,20 +848,18 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowRight") + getKey("ArrowRight"), ); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal( - utils.formatDate(data.datePicker.props.maxDate, data.testFormat) - ); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.datePicker.props.maxDate, data.testFormat)); }); it("should not clear the preSelect date when a pressed key is not a navigation key", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("x")); - expect(data.datePicker.state.preSelection.valueOf()).to.equal( - data.copyM.valueOf() + expect(data.datePicker.state.preSelection.valueOf()).toBe( + data.copyM.valueOf(), ); }); @@ -895,7 +871,7 @@ describe("DatePicker", () => { selected={new Date("1993-07-02")} minDate={new Date("1800/01/01")} open - /> + />, ); }); @@ -906,12 +882,12 @@ describe("DatePicker", () => { }, }); - expect(datePicker.input.value).to.equal("1801/01/01"); + expect(datePicker.input.value).toBe("1801/01/01"); expect( datePicker.calendar.componentNode.querySelector( - ".react-datepicker__current-month" - ).innerHTML - ).to.equal("January 1801"); + ".react-datepicker__current-month", + ).innerHTML, + ).toBe("January 1801"); }); it("should not auto update calendar when the updated date text is before props.minDate", () => { @@ -923,9 +899,9 @@ describe("DatePicker", () => { expect( datePicker.calendar.componentNode.querySelector( - ".react-datepicker__current-month" - ).innerHTML - ).to.equal("July 1993"); + ".react-datepicker__current-month", + ).innerHTML, + ).toBe("July 1993"); }); }); @@ -940,7 +916,7 @@ describe("DatePicker", () => { }, }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); - expect(data.callback.calledOnce).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not manual select date if after maxDate", () => { var maxDate = utils.addDays(utils.newDate(), 1); @@ -953,7 +929,7 @@ describe("DatePicker", () => { }, }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); - expect(data.callback.calledOnce).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); describe("onInputKeyDown Enter", () => { it("should update the selected date", () => { @@ -961,18 +937,18 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); // puts focus on the calendar day TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowLeft") + getKey("ArrowLeft"), ); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("Enter") + getKey("Enter"), ); data.copyM = utils.subDays(data.copyM, 1); - expect(data.callback.calledOnce).to.be.true; - var result = data.callback.args[0][0]; - expect(utils.formatDate(result, data.testFormat)).to.equal( - utils.formatDate(data.copyM, data.testFormat) + expect(data.callback).toHaveBeenCalled(); + var result = data.callback.mock.calls[0][0]; + expect(utils.formatDate(result, data.testFormat)).toBe( + utils.formatDate(data.copyM, data.testFormat), ); }); it("should update the selected date on manual input", () => { @@ -983,8 +959,8 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); data.copyM = utils.newDate("2017-02-02"); expect( - utils.formatDate(data.callback.args[0][0], data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.callback.mock.calls[0][0], data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should not select excludeDates", () => { var data = getOnInputKeyDownStuff({ @@ -992,7 +968,7 @@ describe("DatePicker", () => { }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowLeft")); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); - expect(data.callback.calledOnce).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); describe("with excludeDateIntervals", () => { it("should not select the start date of the interval", () => { @@ -1006,7 +982,7 @@ describe("DatePicker", () => { }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowLeft")); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); - expect(data.callback.calledOnce).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not select a dates within the interval", () => { var data = getOnInputKeyDownStuff({ @@ -1018,7 +994,7 @@ describe("DatePicker", () => { ], }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); - expect(data.callback.calledOnce).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not select the end date of the interval", () => { var data = getOnInputKeyDownStuff({ @@ -1031,7 +1007,7 @@ describe("DatePicker", () => { }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowRight")); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); - expect(data.callback.calledOnce).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); }); it("should not select dates excluded from filterDate", () => { @@ -1042,7 +1018,7 @@ describe("DatePicker", () => { }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowLeft")); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); - expect(data.callback.calledOnce).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); }); describe("onInputKeyDown Escape", () => { @@ -1051,8 +1027,8 @@ describe("DatePicker", () => { var preSelection = data.datePicker.state.preSelection; TestUtils.Simulate.keyDown(data.nodeInput, getKey("Backspace")); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Escape")); - expect(data.callback.calledOnce).to.be.false; // confirms that handleChange occurred - expect(preSelection).to.equal(data.datePicker.state.preSelection); // confirms the preSelection is still the same + expect(data.callback).not.toHaveBeenCalled(); // confirms that handleChange occurred + expect(preSelection).toBe(data.datePicker.state.preSelection); // confirms the preSelection is still the same }); }); it("should reset the keyboard selection when closed", () => { @@ -1060,42 +1036,42 @@ describe("DatePicker", () => { TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowLeft")); data.datePicker.setOpen(false); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should retain the keyboard selection when already open", () => { var data = getOnInputKeyDownStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); TestUtils.Simulate.keyDown( getSelectedDayNode(data.datePicker), - getKey("ArrowLeft") + getKey("ArrowLeft"), ); data.copyM = utils.subDays(data.copyM, 1); expect( - utils.formatDate(data.datePicker.state.preSelection, data.testFormat) - ).to.equal(utils.formatDate(data.copyM, data.testFormat)); + utils.formatDate(data.datePicker.state.preSelection, data.testFormat), + ).toBe(utils.formatDate(data.copyM, data.testFormat)); }); it("should open the calendar when the down arrow key is pressed", () => { var data = getOnInputKeyDownStuff(); data.datePicker.setOpen(false); - expect(data.datePicker.state.open).to.be.false; + expect(data.datePicker.state.open).toBe(false); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); - expect(data.datePicker.state.open).to.be.true; + expect(data.datePicker.state.open).toBe(true); }); it("should not open the calendar when the left arrow key is pressed", () => { var data = getOnInputKeyDownStuff(); data.datePicker.setOpen(false); - expect(data.datePicker.state.open).to.be.false; + expect(data.datePicker.state.open).toBe(false); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowLeft")); - expect(data.datePicker.state.open).to.be.false; + expect(data.datePicker.state.open).toBe(false); }); it("should default to the current day on Enter", () => { const data = getOnInputKeyDownStuff({ selected: null }); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Enter")); - expect(data.callback.calledOnce).to.be.true; - const selected = data.callback.getCall(0).args[0]; - expect(utils.formatDate(selected, data.exactishFormat)).to.equal( - utils.formatDate(data.copyM, data.exactishFormat) + expect(data.callback).toHaveBeenCalledTimes(1); + const selected = data.callback.mock.calls[0][0]; + expect(utils.formatDate(selected, data.exactishFormat)).toBe( + utils.formatDate(data.copyM, data.exactishFormat), ); }); @@ -1103,34 +1079,35 @@ describe("DatePicker", () => { var div = document.createElement("div"); document.body.appendChild(div); ReactDOM.render(, div); - expect(div.querySelector("input")).to.equal(document.activeElement); + expect(div.querySelector("input")).toBe(document.activeElement); }); it("should autofocus the input when calling the setFocus method", () => { var div = document.createElement("div"); document.body.appendChild(div); var datePicker = ReactDOM.render(, div); datePicker.setFocus(); - expect(div.querySelector("input")).to.equal(document.activeElement); + expect(div.querySelector("input")).toBe(document.activeElement); }); it("should clear preventFocus timeout id when component is unmounted", () => { var div = document.createElement("div"); document.body.appendChild(div); var datePicker = ReactDOM.render(, div); - datePicker.clearPreventFocusTimeout = sinon.spy(); + datePicker.clearPreventFocusTimeout = jest.fn(); ReactDOM.unmountComponentAtNode(div); - assert( - datePicker.clearPreventFocusTimeout.calledOnce, - "should call clearPreventFocusTimeout" - ); + expect(datePicker.clearPreventFocusTimeout).toHaveBeenCalledTimes(1); }); function getOnInputKeyDownDisabledKeyboardNavigationStuff() { var m = utils.newDate(); var copyM = utils.newDate(m); var testFormat = "yyyy-MM-dd"; - var callback = sandbox.spy(); + var callback = jest.fn(); var datePicker = TestUtils.renderIntoDocument( - + , ); var dateInput = datePicker.input; var nodeInput = ReactDOM.findDOMNode(dateInput); @@ -1148,42 +1125,42 @@ describe("DatePicker", () => { it("should not handle onInputKeyDown ArrowLeft", () => { var data = getOnInputKeyDownDisabledKeyboardNavigationStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowLeft")); - expect(data.callback.called).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not handle onInputKeyDown ArrowRight", () => { var data = getOnInputKeyDownDisabledKeyboardNavigationStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowRight")); - expect(data.callback.called).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not handle onInputKeyDown ArrowUp", () => { var data = getOnInputKeyDownDisabledKeyboardNavigationStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowUp")); - expect(data.callback.called).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not handle onInputKeyDown ArrowDown", () => { var data = getOnInputKeyDownDisabledKeyboardNavigationStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("ArrowDown")); - expect(data.callback.called).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not handle onInputKeyDown PageUp", () => { var data = getOnInputKeyDownDisabledKeyboardNavigationStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("PageUp")); - expect(data.callback.called).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not handle onInputKeyDown PageDown", () => { var data = getOnInputKeyDownDisabledKeyboardNavigationStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("PageDown")); - expect(data.callback.called).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not handle onInputKeyDown Home", () => { var data = getOnInputKeyDownDisabledKeyboardNavigationStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("Home")); - expect(data.callback.called).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should not handle onInputKeyDown End", () => { var data = getOnInputKeyDownDisabledKeyboardNavigationStuff(); TestUtils.Simulate.keyDown(data.nodeInput, getKey("End")); - expect(data.callback.called).to.be.false; + expect(data.callback).not.toHaveBeenCalled(); }); it("should correctly clear date with empty input string", () => { var cleared = false; @@ -1198,18 +1175,18 @@ describe("DatePicker", () => { + />, ); var input = ReactDOM.findDOMNode(datePicker.input); input.value = ""; TestUtils.Simulate.change(input); - expect(cleared).to.be.true; + expect(cleared).toBe(true); }); it("should correctly update the input when the value prop changes", () => { const datePicker = mount(); - expect(datePicker.find("input").prop("value")).to.equal(""); + expect(datePicker.find("input").prop("value")).toBe(""); datePicker.setProps({ value: "foo" }); - expect(datePicker.find("input").prop("value")).to.equal("foo"); + expect(datePicker.find("input").prop("value")).toBe("foo"); }); it("should preserve user input as they are typing", () => { const onChange = (date) => datePicker.setProps({ selected: date }); @@ -1217,9 +1194,9 @@ describe("DatePicker", () => { + />, ); - expect(datePicker.find("input").prop("value")).to.equal(""); + expect(datePicker.find("input").prop("value")).toBe(""); const str = "12/30/1982"; datePicker.find("input").simulate("focus"); @@ -1228,256 +1205,253 @@ describe("DatePicker", () => { target: { value: datePicker.find("input").prop("value") + c }, }); datePicker.update(); - expect(datePicker.find("input").prop("value")).to.equal( - str.substring(0, i + 1) + expect(datePicker.find("input").prop("value")).toBe( + str.substring(0, i + 1), ); }); - expect( - utils.formatDate(datePicker.prop("selected"), "yyyy-MM-dd") - ).to.equal("1982-12-30"); + expect(utils.formatDate(datePicker.prop("selected"), "yyyy-MM-dd")).toBe( + "1982-12-30", + ); }); it("should invoke provided onChangeRaw function and should not invoke provided onSelect function on manual input change", () => { const inputValue = "test"; - const onChangeRawSpy = sandbox.spy(); - const onSelectSpy = sandbox.spy(); + const onChangeRawSpy = jest.fn(); + const onSelectSpy = jest.fn(); const datePicker = TestUtils.renderIntoDocument( + />, ); - expect(onChangeRawSpy.called).to.be.false; - expect(onSelectSpy.called).to.be.false; + expect(onChangeRawSpy).not.toHaveBeenCalled(); + expect(onSelectSpy).not.toHaveBeenCalled(); const input = ReactDOM.findDOMNode(datePicker.input); input.value = inputValue; TestUtils.Simulate.change(input); - expect(onChangeRawSpy.calledOnce).to.be.true; - expect(onChangeRawSpy.args[0][0].target.value).to.equal(inputValue); - expect(onSelectSpy.called).to.be.false; + expect(onChangeRawSpy).toHaveBeenCalledTimes(1); + expect(onChangeRawSpy.mock.calls[0][0].target.value).toBe(inputValue); + expect(onSelectSpy).not.toHaveBeenCalled(); }); it("should invoke provided onChangeRaw and onSelect functions when clicking a day on the calendar", () => { - const onChangeRawSpy = sandbox.spy(); - const onSelectSpy = sandbox.spy(); + const onChangeRawSpy = jest.fn(); + const onSelectSpy = jest.fn(); const datePicker = TestUtils.renderIntoDocument( + />, ); - expect(onChangeRawSpy.called).to.be.false; - expect(onSelectSpy.called).to.be.false; + expect(onChangeRawSpy).not.toHaveBeenCalled(); + expect(onSelectSpy).not.toHaveBeenCalled(); const input = ReactDOM.findDOMNode(datePicker.input); TestUtils.Simulate.focus(ReactDOM.findDOMNode(input)); const day = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Day + Day, )[0]; TestUtils.Simulate.click(ReactDOM.findDOMNode(day)); - expect(onChangeRawSpy.calledOnce).to.be.true; - expect(onSelectSpy.calledOnce).to.be.true; + expect(onChangeRawSpy).toHaveBeenCalledTimes(1); + expect(onSelectSpy).toHaveBeenCalledTimes(1); }); it("should allow onChangeRaw to prevent a change", () => { const onChangeRaw = (e) => e.target.value > "2" && e.preventDefault(); const datePicker = mount(); - expect(datePicker.find("input").prop("value")).to.equal(""); + expect(datePicker.find("input").prop("value")).toBe(""); datePicker.find("input").simulate("change", { target: { value: "3" } }); datePicker.update(); - expect(datePicker.find("input").prop("value")).to.equal(""); + expect(datePicker.find("input").prop("value")).toBe(""); datePicker.find("input").simulate("change", { target: { value: "1" } }); datePicker.update(); - expect(datePicker.find("input").prop("value")).to.equal("1"); + expect(datePicker.find("input").prop("value")).toBe("1"); }); it("should call onChangeRaw with all arguments", () => { const inputValue = "test"; - const onChangeRawSpy = sandbox.spy(); + const onChangeRawSpy = jest.fn(); const datePicker = TestUtils.renderIntoDocument( } onChangeRaw={onChangeRawSpy} - /> + />, ); - expect(onChangeRawSpy.called).to.be.false; + expect(onChangeRawSpy).not.toHaveBeenCalled(); const input = ReactDOM.findDOMNode(datePicker.input); input.value = inputValue; TestUtils.Simulate.change(input); - expect(onChangeRawSpy.calledOnce).to.be.true; - expect(onChangeRawSpy.args[0][0].target.value).to.equal(inputValue); - expect(onChangeRawSpy.args[0][1]).to.equal("test"); + expect(onChangeRawSpy).toHaveBeenCalledTimes(1); + expect(onChangeRawSpy.mock.calls[0][0].target.value).toBe(inputValue); + expect(onChangeRawSpy.mock.calls[0][1]).toBe("test"); }); it("should handle the lack of an 'event' object as the first argument to handleChange analogously to 'preventDefault' being called", () => { const inputValue = "test"; - const onChangeRawSpy = sandbox.spy(); + const onChangeRawSpy = jest.fn(); let customInput = [e.target.value]} />; const datePicker = TestUtils.renderIntoDocument( + />, ); - expect(onChangeRawSpy.called).to.be.false; + expect(onChangeRawSpy).not.toHaveBeenCalled(); const input = ReactDOM.findDOMNode(datePicker.input); input.value = inputValue; TestUtils.Simulate.change(input); - expect(onChangeRawSpy.calledOnce).to.be.true; - expect(onChangeRawSpy.args[0][0]).to.equal("test"); + expect(onChangeRawSpy).toHaveBeenCalled(); + expect(onChangeRawSpy.mock.calls[0][0]).toBe("test"); }); it("should handle a click outside of the calendar", () => { const datePicker = mount( - + , ).instance(); - const openSpy = sandbox.spy(datePicker, "setOpen"); - datePicker.handleCalendarClickOutside( - sandbox.stub({ preventDefault: () => {} }) - ); - expect(openSpy.calledOnce).to.be.true; - expect(openSpy.calledWithExactly(false)).to.be.true; + const openSpy = jest.spyOn(datePicker, "setOpen"); + datePicker.handleCalendarClickOutside({ preventDefault: jest.fn() }); + expect(openSpy).toHaveBeenCalledWith(false); }); it("should default to the currently selected date", () => { const datePicker = mount( - + , ); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal("1988-12-30"); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe("1988-12-30"); }); it("should default to the start date when selecting an end date", () => { const datePicker = mount( - + , ); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal("1988-11-30"); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe("1988-11-30"); }); it("should default to the end date when selecting a start date", () => { const datePicker = mount( - + , ); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal("1988-12-31"); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe("1988-12-31"); }); it("should default to a date <= maxDate", () => { const datePicker = mount( - + , ); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal("1982-01-01"); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe("1982-01-01"); }); it("should default to a date >= minDate", () => { const datePicker = mount( - + , ); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal("2063-04-05"); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe("2063-04-05"); }); it("should default to the openToDate if there is one", () => { const datePicker = mount( - + , ); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal("2020-01-23"); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe("2020-01-23"); }); it("should otherwise default to the current date", () => { const datePicker = mount(); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal(utils.formatDate(utils.newDate(), "yyyy-MM-dd")); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe(utils.formatDate(utils.newDate(), "yyyy-MM-dd")); }); it("should support an initial null `selected` value in inline mode", () => { const datePicker = mount(); expect(() => - datePicker.setProps({ selected: utils.newDate() }) - ).to.not.throw(); + datePicker.setProps({ selected: utils.newDate() }), + ).not.toThrow(); }); it("should switch month in inline mode immediately", () => { const selected = utils.newDate(); const future = utils.addDays(utils.newDate(), 100); const datePicker = mount(); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal(utils.formatDate(selected, "yyyy-MM-dd")); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe(utils.formatDate(selected, "yyyy-MM-dd")); datePicker.setProps({ selected: future }); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal(utils.formatDate(future, "yyyy-MM-dd")); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe(utils.formatDate(future, "yyyy-MM-dd")); }); it("should switch month in inline mode immediately, when year is updated", () => { const selected = utils.newDate(); const future = utils.addYears(utils.newDate(), 1); const datePicker = mount(); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal(utils.formatDate(selected, "yyyy-MM-dd")); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe(utils.formatDate(selected, "yyyy-MM-dd")); datePicker.setProps({ selected: future }); expect( - utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd") - ).to.equal(utils.formatDate(future, "yyyy-MM-dd")); + utils.formatDate(datePicker.state("preSelection"), "yyyy-MM-dd"), + ).toBe(utils.formatDate(future, "yyyy-MM-dd")); }); it("should not set open state when focusing on the date input and the preventOpenOnFocus prop is set", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.state.open).to.be.false; + expect(datePicker.state.open).toBe(false); }); it("should not set open state onInputKeyDown when preventOpenOnFocus prop is set", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; TestUtils.Simulate.keyDown( ReactDOM.findDOMNode(dateInput), - getKey("ArrowLeft") + getKey("ArrowLeft"), ); - expect(datePicker.state.open).to.be.false; + expect(datePicker.state.open).toBe(false); }); it("should clear the input when clear() member function is called", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); datePicker.clear(); - expect(datePicker.state.inputValue).to.be.null; + expect(datePicker.state.inputValue).toBeNull(); }); it("should not open when open is false and input is focused", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.calendar).to.not.exist; + expect(datePicker.calendar).toBeFalsy(); }); it("should open when open is true", () => { var datePicker = TestUtils.renderIntoDocument(); - expect(datePicker.calendar).to.exist; + expect(datePicker.calendar).toBeDefined(); }); it("should fire onInputClick when input is clicked", () => { - const onInputClickSpy = sinon.spy(); + const onInputClickSpy = jest.fn(); mount() .find("input") .simulate("click"); - assert(onInputClickSpy.callCount, 1); + expect(onInputClickSpy).toHaveBeenCalledTimes(1); }); it("should set monthSelectedIn to 0 if monthsShown prop changes", () => { const datePicker = mount(); datePicker.setState({ monthSelectedIn: 1 }, () => { - assert.equal(datePicker.state("monthSelectedIn"), 1); + expect(datePicker.state("monthSelectedIn")).toEqual(1); datePicker.setProps({ monthsShown: 1 }, () => { - assert.equal(datePicker.props().monthsShown, 1); + expect(datePicker.props().monthsShown).toEqual(1); setTimeout(() => { // Give setState in componentDidUpdate time to run - assert.equal(datePicker.state("monthSelectedIn"), 0); + expect(datePicker.state("monthSelectedIn")).toEqual(0); }, 100); }); }); @@ -1485,54 +1459,54 @@ describe("DatePicker", () => { it("should disable non-jumping if prop focusSelectedMonth is true", () => { var datePickerInline = TestUtils.renderIntoDocument( - + , ); var dayButtonInline = TestUtils.scryRenderedDOMComponentsWithClass( datePickerInline, - "react-datepicker__day" + "react-datepicker__day", )[40]; TestUtils.Simulate.click(dayButtonInline); - assert.equal(datePickerInline.state.monthSelectedIn, undefined); + expect(datePickerInline.state.monthSelectedIn).toEqual(undefined); }); it("should show the popper arrow when showPopperArrow is true", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; TestUtils.Simulate.click(ReactDOM.findDOMNode(dateInput)); const arrow = TestUtils.scryRenderedDOMComponentsWithClass( datePicker.calendar, - "react-datepicker__triangle" + "react-datepicker__triangle", ); - expect(arrow).to.not.be.empty; + expect(Object.keys(arrow)).not.toHaveLength(0); }); it("should not show the popper arrow when showPopperArrow is false", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; TestUtils.Simulate.click(ReactDOM.findDOMNode(dateInput)); const arrow = TestUtils.scryRenderedDOMComponentsWithClass( datePicker.calendar, - "react-datepicker__triangle" + "react-datepicker__triangle", ); - expect(arrow).to.be.empty; + expect(Object.keys(arrow)).toHaveLength(0); }); it("should pass chooseDayAriaLabelPrefix prop to the correct child component", () => { const chooseDayAriaLabelPrefix = "My choose-day-prefix"; const datePicker = mount( - + , ); expect( - datePicker.find(Day).first().prop("ariaLabelPrefixWhenEnabled") - ).to.equal(chooseDayAriaLabelPrefix); + datePicker.find(Day).first().prop("ariaLabelPrefixWhenEnabled"), + ).toBe(chooseDayAriaLabelPrefix); }); it("should pass disabledDayAriaLabelPrefix prop to the correct child component", () => { @@ -1541,11 +1515,11 @@ describe("DatePicker", () => { + />, ); expect( - datePicker.find(Day).first().prop("ariaLabelPrefixWhenDisabled") - ).to.equal(disabledDayAriaLabelPrefix); + datePicker.find(Day).first().prop("ariaLabelPrefixWhenDisabled"), + ).toBe(disabledDayAriaLabelPrefix); }); it("should pass weekAriaLabelPrefix prop to the correct child component", () => { @@ -1555,11 +1529,11 @@ describe("DatePicker", () => { inline showWeekNumbers weekAriaLabelPrefix={weekAriaLabelPrefix} - /> + />, + ); + expect(datePicker.find(WeekNumber).first().prop("ariaLabelPrefix")).toBe( + weekAriaLabelPrefix, ); - expect( - datePicker.find(WeekNumber).first().prop("ariaLabelPrefix") - ).to.equal(weekAriaLabelPrefix); }); it("should pass monthAriaLabelPrefix prop to the correct child component", () => { @@ -1569,10 +1543,10 @@ describe("DatePicker", () => { inline showWeekNumbers monthAriaLabelPrefix={monthAriaLabelPrefix} - /> + />, ); - expect(datePicker.find(Month).first().prop("ariaLabelPrefix")).to.equal( - monthAriaLabelPrefix + expect(datePicker.find(Month).first().prop("ariaLabelPrefix")).toBe( + monthAriaLabelPrefix, ); }); @@ -1580,9 +1554,9 @@ describe("DatePicker", () => { var datePicker = TestUtils.renderIntoDocument(); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.state.open).to.be.true; + expect(datePicker.state.open).toBe(true); datePicker.onScroll({ target: document }); - expect(datePicker.state.open).to.be.false; + expect(datePicker.state.open).toBe(false); }); it("should not close the calendar after scrolling", () => { @@ -1590,28 +1564,28 @@ describe("DatePicker", () => { var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); datePicker.onScroll({ target: "something" }); - expect(datePicker.state.open).to.be.true; + expect(datePicker.state.open).toBe(true); }); it("should close the calendar after scrolling", () => { var datePicker = TestUtils.renderIntoDocument( - true} /> + true} />, ); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.state.open).to.be.true; + expect(datePicker.state.open).toBe(true); datePicker.onScroll(); - expect(datePicker.state.open).to.be.false; + expect(datePicker.state.open).toBe(false); }); it("should not close the calendar after scrolling", () => { var datePicker = TestUtils.renderIntoDocument( - false} /> + false} />, ); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); datePicker.onScroll(); - expect(datePicker.state.open).to.be.true; + expect(datePicker.state.open).toBe(true); }); describe("selectsRange with inline", () => { @@ -1629,20 +1603,20 @@ describe("DatePicker", () => { endDate={endDate} selectsRange inline - /> + />, ); const days = TestUtils.scryRenderedComponentsWithType(datePicker, Day); const selectedDay = days.find( (d) => utils.formatDate(d.props.day, "yyyy-MM-dd") === - utils.formatDate(selected, "yyyy-MM-dd") + utils.formatDate(selected, "yyyy-MM-dd"), ); TestUtils.Simulate.click(ReactDOM.findDOMNode(selectedDay)); - expect(utils.formatDate(startDate, "yyyy-MM-dd")).to.equal( - utils.formatDate(selected, "yyyy-MM-dd") + expect(utils.formatDate(startDate, "yyyy-MM-dd")).toBe( + utils.formatDate(selected, "yyyy-MM-dd"), ); - expect(endDate).to.equal(null); + expect(endDate).toBeNull(); }); it("should change dates of range set endDate when startDate is set", () => { @@ -1660,20 +1634,20 @@ describe("DatePicker", () => { endDate={endDate} selectsRange inline - /> + />, ); const days = TestUtils.scryRenderedComponentsWithType(datePicker, Day); const selectedDay = days.find( (d) => utils.formatDate(d.props.day, "yyyy-MM-dd") === - utils.formatDate(nextDay, "yyyy-MM-dd") + utils.formatDate(nextDay, "yyyy-MM-dd"), ); TestUtils.Simulate.click(ReactDOM.findDOMNode(selectedDay)); - expect(utils.formatDate(startDate, "yyyy-MM-dd")).to.equal( - utils.formatDate(startDate, "yyyy-MM-dd") + expect(utils.formatDate(startDate, "yyyy-MM-dd")).toBe( + utils.formatDate(startDate, "yyyy-MM-dd"), ); - expect(utils.formatDate(endDate, "yyyy-MM-dd")).to.equal( - utils.formatDate(nextDay, "yyyy-MM-dd") + expect(utils.formatDate(endDate, "yyyy-MM-dd")).toBe( + utils.formatDate(nextDay, "yyyy-MM-dd"), ); }); @@ -1691,20 +1665,20 @@ describe("DatePicker", () => { endDate={endDate} selectsRange inline - /> + />, ); let days = TestUtils.scryRenderedComponentsWithType(datePicker, Day); let selectedDay = days.find( (d) => utils.formatDate(d.props.day, "yyyy-MM-dd") === - utils.formatDate(selected, "yyyy-MM-dd") + utils.formatDate(selected, "yyyy-MM-dd"), ); TestUtils.Simulate.click(ReactDOM.findDOMNode(selectedDay)); - expect(utils.formatDate(startDate, "yyyy-MM-dd")).to.equal( - utils.formatDate(selected, "yyyy-MM-dd") + expect(utils.formatDate(startDate, "yyyy-MM-dd")).toBe( + utils.formatDate(selected, "yyyy-MM-dd"), ); - expect(endDate).to.equal(null); + expect(endDate).toBeNull(); }); it("should change dates of range change startDate when endDate set before startDate", () => { @@ -1722,19 +1696,19 @@ describe("DatePicker", () => { endDate={endDate} selectsRange inline - /> + />, ); let days = TestUtils.scryRenderedComponentsWithType(datePicker, Day); const selectedDay = days.find( (d) => utils.formatDate(d.props.day, "yyyy-MM-dd") === - utils.formatDate(selectedPrevious, "yyyy-MM-dd") + utils.formatDate(selectedPrevious, "yyyy-MM-dd"), ); TestUtils.Simulate.click(ReactDOM.findDOMNode(selectedDay)); - expect(utils.formatDate(startDate, "yyyy-MM-dd")).to.equal( - utils.formatDate(selectedPrevious, "yyyy-MM-dd") + expect(utils.formatDate(startDate, "yyyy-MM-dd")).toBe( + utils.formatDate(selectedPrevious, "yyyy-MM-dd"), ); - expect(endDate).to.equal(null); + expect(endDate).toBeNull(); }); }); @@ -1743,19 +1717,19 @@ describe("DatePicker", () => { const startDate = new Date("2021-04-20 00:00:00"); const endDate = null; const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; // Click to open TestUtils.Simulate.click(ReactDOM.findDOMNode(dateInput)); - expect(datePicker.state.preSelection).to.equal(startDate); + expect(datePicker.state.preSelection).toBe(startDate); }); it("should remain open after clicking day when startDate is null", () => { const startDate = null; const endDate = null; const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; // Click to open @@ -1763,21 +1737,21 @@ describe("DatePicker", () => { const days = TestUtils.scryRenderedComponentsWithType(datePicker, Day); // Click the first Day TestUtils.Simulate.click(ReactDOM.findDOMNode(days[0])); - expect(datePicker.state.open).to.be.true; + expect(datePicker.state.open).toBe(true); }); it("should be closed after clicking day when startDate has a value (endDate is being selected)", () => { const startDate = new Date("2021-01-01 00:00:00"); const endDate = null; const datePicker = TestUtils.renderIntoDocument( - + , ); datePicker.setOpen(true); const days = TestUtils.scryRenderedComponentsWithType(datePicker, Day); const day = ReactDOM.findDOMNode(days[Math.floor(days.length / 2)]); TestUtils.Simulate.click(day); - expect(datePicker.state.open).to.be.false; + expect(datePicker.state.open).toBe(false); }); it("has clear button rendered when isClearable is true and startDate has value", () => { @@ -1790,18 +1764,18 @@ describe("DatePicker", () => { startDate={startDate} endDate={endDate} isClearable - /> + />, ); const clearButton = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__close-icon" + "react-datepicker__close-icon", ); - expect(clearButton).to.exist; + expect(clearButton).toBeDefined(); }); it("clearing calls onChange with [null, null] in first argument making it consistent with the onChange behaviour for selecting days for selectsRange", () => { - const onChangeSpy = sandbox.spy(); + const onChangeSpy = jest.fn(); const datePicker = TestUtils.renderIntoDocument( { endDate={null} onChange={onChangeSpy} isClearable - /> + />, ); datePicker.clear(); - expect(onChangeSpy.calledOnce).to.be.true; - expect(onChangeSpy.args[0][0]).to.be.an("array"); - expect(onChangeSpy.args[0][0][0]).to.be.a("null"); - expect(onChangeSpy.args[0][0][1]).to.be.a("null"); + expect(onChangeSpy).toHaveBeenCalled(); + expect(Array.isArray(onChangeSpy.mock.calls[0][0])).toBe(true); + expect(onChangeSpy.mock.calls[0][0][0]).toBeNull(); + expect(onChangeSpy.mock.calls[0][0][1]).toBeNull(); }); }); @@ -1826,46 +1800,47 @@ describe("DatePicker", () => { const twoMonths = mount(); twoMonths.find("input").simulate("click"); const months = twoMonths.find(Month); - expect(months).to.have.lengthOf(2); - expect(months.first().props().monthShowsDuplicateDaysEnd).to.be.true; - expect(months.last().props().monthShowsDuplicateDaysEnd).to.be.false; + expect(months).toHaveLength(2); + expect(months.first().props().monthShowsDuplicateDaysEnd).toBe(true); + expect(months.last().props().monthShowsDuplicateDaysEnd).toBe(false); const moreThanTwoMonths = mount(); moreThanTwoMonths.find("input").simulate("click"); const monthsMore = moreThanTwoMonths.find(Month); - expect(monthsMore).to.have.lengthOf(4); - expect(monthsMore.first().props().monthShowsDuplicateDaysEnd).to.be.true; - expect(monthsMore.get(1).props.monthShowsDuplicateDaysEnd).to.be.true; - expect(monthsMore.get(2).props.monthShowsDuplicateDaysEnd).to.be.true; - expect(monthsMore.last().props().monthShowsDuplicateDaysEnd).to.be.false; + expect(monthsMore).toHaveLength(4); + expect(monthsMore.first().props().monthShowsDuplicateDaysEnd).toBe(true); + expect(monthsMore.get(1).props.monthShowsDuplicateDaysEnd).toBe(true); + expect(monthsMore.get(2).props.monthShowsDuplicateDaysEnd).toBe(true); + expect(monthsMore.last().props().monthShowsDuplicateDaysEnd).toBe(false); }); it("should find duplicates at start on all months except first month", () => { const twoMonths = mount(); twoMonths.find("input").simulate("click"); const months = twoMonths.find(Month); - expect(months).to.have.lengthOf(2); - expect(months.first().props().monthShowsDuplicateDaysStart).to.be.false; - expect(months.last().props().monthShowsDuplicateDaysStart).to.be.true; + expect(months).toHaveLength(2); + expect(months.first().props().monthShowsDuplicateDaysStart).toBe(false); + expect(months.last().props().monthShowsDuplicateDaysStart).toBe(true); const moreThanTwoMonths = mount(); moreThanTwoMonths.find("input").simulate("click"); const monthsMore = moreThanTwoMonths.find(Month); - expect(monthsMore).to.have.lengthOf(4); - expect(monthsMore.first().props().monthShowsDuplicateDaysStart).to.be - .false; - expect(monthsMore.get(1).props.monthShowsDuplicateDaysStart).to.be.true; - expect(monthsMore.get(2).props.monthShowsDuplicateDaysStart).to.be.true; - expect(monthsMore.last().props().monthShowsDuplicateDaysStart).to.be.true; + expect(monthsMore).toHaveLength(4); + expect(monthsMore.first().props().monthShowsDuplicateDaysStart).toBe( + false, + ); + expect(monthsMore.get(1).props.monthShowsDuplicateDaysStart).toBe(true); + expect(monthsMore.get(2).props.monthShowsDuplicateDaysStart).toBe(true); + expect(monthsMore.last().props().monthShowsDuplicateDaysStart).toBe(true); }); it("should not find duplicates when single month displayed", () => { const datepicker = mount(); datepicker.find("input").simulate("click"); const months = datepicker.find(Month); - expect(months).to.have.lengthOf(1); - expect(months.first().props().monthShowsDuplicateDaysStart).to.be.false; - expect(months.first().props().monthShowsDuplicateDaysEnd).to.be.false; + expect(months).toHaveLength(1); + expect(months.first().props().monthShowsDuplicateDaysStart).toBe(false); + expect(months.first().props().monthShowsDuplicateDaysEnd).toBe(false); }); }); @@ -1878,13 +1853,13 @@ describe("DatePicker", () => { selected={utils.newDate("2020-11-15")} dateFormat={dateFormat} inline - /> + />, ); TestUtils.Simulate.keyDown( getSelectedDayNode(datePickerInline), - getKey("ArrowRight") + getKey("ArrowRight"), ); - expect(datePickerInline.state.shouldFocusDayInline).to.be.false; + expect(datePickerInline.state.shouldFocusDayInline).toBe(false); }); it("should be set to true when changing displayed month with ArrowRight key", () => { @@ -1893,13 +1868,13 @@ describe("DatePicker", () => { selected={utils.newDate("2020-11-30")} dateFormat={dateFormat} inline - /> + />, ); TestUtils.Simulate.keyDown( getSelectedDayNode(datePickerInline), - getKey("ArrowRight") + getKey("ArrowRight"), ); - expect(datePickerInline.state.shouldFocusDayInline).to.be.true; + expect(datePickerInline.state.shouldFocusDayInline).toBe(true); }); it("should be set to true when changing displayed month with PageDown key", () => { @@ -1908,13 +1883,13 @@ describe("DatePicker", () => { selected={utils.newDate("2020-11-15")} dateFormat={dateFormat} inline - /> + />, ); TestUtils.Simulate.keyDown( getSelectedDayNode(datePickerInline), - getKey("PageDown") + getKey("PageDown"), ); - expect(datePickerInline.state.shouldFocusDayInline).to.be.true; + expect(datePickerInline.state.shouldFocusDayInline).toBe(true); }); it("should be set to true when changing displayed month with End key", () => { @@ -1923,13 +1898,13 @@ describe("DatePicker", () => { selected={utils.newDate("2020-11-15")} dateFormat={dateFormat} inline - /> + />, ); TestUtils.Simulate.keyDown( getSelectedDayNode(datePickerInline), - getKey("End") + getKey("End"), ); - expect(datePickerInline.state.shouldFocusDayInline).to.be.true; + expect(datePickerInline.state.shouldFocusDayInline).toBe(true); }); }); @@ -1939,7 +1914,7 @@ describe("DatePicker", () => { const datePicker = mount(); const dateInput = datePicker.instance().input; const dateInputWrapper = datePicker.find("input"); - sandbox.spy(dateInput, "focus"); + jest.spyOn(dateInput, "focus"); dateInputWrapper.simulate("focus"); @@ -1947,7 +1922,7 @@ describe("DatePicker", () => { .find(".react-datepicker__day-names") .childAt(0) .text(); - expect(firstDay).to.equal("Mo"); + expect(firstDay).toBe("Mo"); }); it("should show the correct start of week for US locale", () => { @@ -1956,7 +1931,7 @@ describe("DatePicker", () => { const datePicker = mount(); const dateInput = datePicker.instance().input; const dateInputWrapper = datePicker.find("input"); - sandbox.spy(dateInput, "focus"); + jest.spyOn(dateInput, "focus"); dateInputWrapper.simulate("focus"); @@ -1964,7 +1939,7 @@ describe("DatePicker", () => { .find(".react-datepicker__day-names") .childAt(0) .text(); - expect(firstDay).to.equal("Su"); + expect(firstDay).toBe("Su"); }); describe("when update the datepicker input text while props.showTimeSelectOnly is set and dateFormat has only time related format", () => { @@ -1984,16 +1959,16 @@ describe("DatePicker", () => { showTimeSelectOnly dateFormat={format} timeFormat={format} - /> + />, ); const input = ReactDOM.findDOMNode(datePicker.input); input.value = "8:22 AM"; TestUtils.Simulate.change(input); - expect(utils.isSameDay(date, selected)).to.equal(true); - expect(utils.getHours(date)).to.equal(8); - expect(utils.getMinutes(date)).to.equal(22); + expect(utils.isSameDay(date, selected)).toBe(true); + expect(utils.getHours(date)).toBe(8); + expect(utils.getMinutes(date)).toBe(22); }); }); @@ -2007,7 +1982,7 @@ describe("DatePicker", () => { dateFormat="MM/yyyy" minDate={utils.newDate("2022-12-31")} showMonthYearPicker - /> + />, ); TestUtils.Simulate.change(datePicker.input, { @@ -2015,14 +1990,14 @@ describe("DatePicker", () => { value: "11/2022", }, }); - expect(date).to.equal(null); + expect(date).toBeNull(); TestUtils.Simulate.change(datePicker.input, { target: { value: "12/2022", }, }); - expect(date.toString()).to.equal(utils.newDate("2022-12-01").toString()); + expect(date.toString()).toBe(utils.newDate("2022-12-01").toString()); }); it("should selected year when specified minDate same year", () => { @@ -2035,7 +2010,7 @@ describe("DatePicker", () => { dateFormat="yyyy" minDate={utils.newDate("2022-12-31")} showYearPicker - /> + />, ); TestUtils.Simulate.change(datePicker.input, { @@ -2043,135 +2018,126 @@ describe("DatePicker", () => { value: "2021", }, }); - expect(date).to.equal(null); + expect(date).toBeNull(); TestUtils.Simulate.change(datePicker.input, { target: { value: "2022", }, }); - expect(date.toString()).to.equal(utils.newDate("2022-01-01").toString()); + expect(date.toString()).toBe(utils.newDate("2022-01-01").toString()); }); describe("should render aria live region after date selection", () => { it("should have correct format if datepicker does not contain time", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); TestUtils.Simulate.keyDown( ReactDOM.findDOMNode(dateInput), - getKey("Enter") + getKey("Enter"), ); const ariaLiveMessage = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__aria-live" + "react-datepicker__aria-live", ).textContent; - expect(ariaLiveMessage).to.equal( + expect(ariaLiveMessage).toBe( `Selected date: ${utils.safeDateFormat(datePicker.props.selected, { dateFormat: "PPPP", locale: datePicker.props.locale, - })}` + })}`, ); }); it("should have correct format if datepicker contains time", () => { const datePicker = TestUtils.renderIntoDocument( - + , ); const dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); TestUtils.Simulate.keyDown( ReactDOM.findDOMNode(dateInput), - getKey("Enter") + getKey("Enter"), ); const ariaLiveMessage = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__aria-live" + "react-datepicker__aria-live", ).textContent; - expect(ariaLiveMessage).to.equal( + expect(ariaLiveMessage).toBe( `Selected date: ${utils.safeDateFormat(datePicker.props.selected, { dateFormat: "PPPPp", locale: datePicker.props.locale, - })}` + })}`, ); }); }); it("should not customize the className attribute if showIcon is set to false", () => { let datePicker = TestUtils.renderIntoDocument( - + , ); let showIconClass = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__input-container" + "react-datepicker__input-container", ).getAttribute("class"); - expect(showIconClass).to.equal("react-datepicker__input-container"); + expect(showIconClass).toBe("react-datepicker__input-container"); }); it("should display the Calendar icon if showIcon is set to true", () => { let datePicker = TestUtils.renderIntoDocument( - + , ); let showIconClass = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__input-container" + "react-datepicker__input-container", ).getAttribute("class"); - expect(showIconClass).to.equal( - "react-datepicker__input-container react-datepicker__view-calendar-icon" + expect(showIconClass).toBe( + "react-datepicker__input-container react-datepicker__view-calendar-icon", ); datePicker = TestUtils.renderIntoDocument( - + , ); showIconClass = TestUtils.findRenderedDOMComponentWithClass( datePicker, - "react-datepicker__calendar-icon" + "react-datepicker__calendar-icon", ).getAttribute("class"); - expect(showIconClass).to.equal("react-datepicker__calendar-icon"); + expect(showIconClass).toBe("react-datepicker__calendar-icon"); }); describe("Year picker", () => { - it("should call onYearMouseEnter and onYearMouseEnter", (done) => { - const onYearMouseEnterSpy = sandbox.spy(); - const onYearMouseLeaveSpy = sandbox.spy(); + it("should call onYearMouseEnter and onYearMouseEnter", () => { + const onYearMouseEnterSpy = jest.fn(); + const onYearMouseLeaveSpy = jest.fn(); const datePicker = mount( + />, ); const dateInputWrapper = datePicker.find("input"); dateInputWrapper.simulate("click"); const calendarWrapper = datePicker.find("Calendar"); const selectedYear = calendarWrapper.find( - ".react-datepicker__year-text--selected" + ".react-datepicker__year-text--selected", ); selectedYear.simulate("mouseenter"); selectedYear.simulate("mouseleave"); - defer(() => { - assert( - onYearMouseEnterSpy.called === true, - "should call DatePicker onYearMouseEnter" - ); - assert( - onYearMouseLeaveSpy.called === true, - "should call DatePicker onYearMouseLeave" - ); - done(); - }); + expect(onYearMouseEnterSpy).toHaveBeenCalled(); + expect(onYearMouseLeaveSpy).toHaveBeenCalled(); }); }); }); diff --git a/test/day_test.js b/test/day_test.test.js similarity index 82% rename from test/day_test.js rename to test/day_test.test.js index a178118c7..0d966a858 100644 --- a/test/day_test.js +++ b/test/day_test.test.js @@ -2,8 +2,6 @@ import React from "react"; import { es } from "date-fns/locale"; import Day from "../src/day"; import { mount, shallow } from "enzyme"; -import defer from "lodash/defer"; -import sinon from "sinon"; import { getDayOfWeekCode, newDate, @@ -25,8 +23,8 @@ describe("Day", () => { it("should render the specified day", () => { const day = newDate(); const shallowDay = renderDay(day); - expect(shallowDay.hasClass("react-datepicker__day")).to.equal(true); - expect(shallowDay.text()).to.equal(getDate(day) + ""); + expect(shallowDay.hasClass("react-datepicker__day")).toBe(true); + expect(shallowDay.text()).toBe(getDate(day) + ""); }); it("should apply the day of week class", () => { @@ -34,7 +32,7 @@ describe("Day", () => { for (var i = 0; i < 7; i++) { const className = "react-datepicker__day--" + getDayOfWeekCode(day); const shallowDay = renderDay(day); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); day = addDays(day, 1); } }); @@ -65,14 +63,14 @@ describe("Day", () => { }); it("should apply the selected class", () => { - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it('should set aria-selected attribute to "true"', () => { const ariaSelected = mount(shallowDay.getElement()) .getDOMNode() .getAttribute("aria-selected"); - expect(ariaSelected).to.equal("true"); + expect(ariaSelected).toBe("true"); }); it('should set aria-selected attribute to "true" if previous and after days selected', () => { @@ -83,7 +81,7 @@ describe("Day", () => { const ariaSelected = mount(shallowDay.getElement()) .getDOMNode() .getAttribute("aria-selected"); - expect(ariaSelected).to.equal("true"); + expect(ariaSelected).toBe("true"); }); }); @@ -95,14 +93,14 @@ describe("Day", () => { }); it("should not apply the selected class", () => { - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); it('should set aria-selected attribute to "false"', () => { const ariaSelected = mount(shallowDay.getElement()) .getDOMNode() .getAttribute("aria-selected"); - expect(ariaSelected).to.equal("false"); + expect(ariaSelected).toBe("false"); }); }); }); @@ -114,13 +112,13 @@ describe("Day", () => { const day = newDate(); const selected = addDays(day, 1); const shallowDay = renderDay(day, { selected, preSelection: day }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should not apply the keyboard-selected class when selected", () => { const day = newDate(); const shallowDay = renderDay(day, { selected: day, preSelection: day }); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); it("should not apply the keyboard-selected class when another day is pre-selected", () => { @@ -128,7 +126,7 @@ describe("Day", () => { const selected = addDays(day, 1); const preSelection = addDays(day, 2); const shallowDay = renderDay(day, { selected, preSelection }); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); it("should apply the keyboard-selected class if in inline mode", () => { @@ -139,7 +137,7 @@ describe("Day", () => { preSelection: day, inline: true, }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); }); @@ -153,7 +151,7 @@ describe("Day", () => { const highlightDates = [highlightDay1, highlightDay2]; const highlightDatesMap = getHightLightDaysMap(highlightDates); const shallowDay = renderDay(day, { highlightDates: highlightDatesMap }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should not apply the highlighted class if not in highlighted array", () => { @@ -163,7 +161,7 @@ describe("Day", () => { const highlightDates = [highlightDay1, highlightDay2]; const highlightDatesMap = getHightLightDaysMap(highlightDates); const shallowDay = renderDay(day, { highlightDates: highlightDatesMap }); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); describe("prop is an array of objects with class name as a key and array of moments as a value", () => { @@ -179,7 +177,7 @@ describe("Day", () => { const shallowDay = renderDay(day, { highlightDates: highlightDatesMap, }); - expect(shallowDay.hasClass("testClassName")).to.equal(true); + expect(shallowDay.hasClass("testClassName")).toBe(true); }); it("should not apply the highlighted class if not in highlighted array", () => { @@ -194,7 +192,7 @@ describe("Day", () => { const shallowDay = renderDay(day, { highlightDates: highlightDatesMap, }); - expect(shallowDay.hasClass("testClassName")).to.equal(false); + expect(shallowDay.hasClass("testClassName")).toBe(false); }); it("should apply the highlighted classes even if the same day in highlighted array", () => { @@ -207,9 +205,9 @@ describe("Day", () => { const shallowDay = renderDay(day, { highlightDates: highlightDatesMap, }); - expect(shallowDay.hasClass("fooClassName")).to.equal(true); - expect(shallowDay.hasClass("barClassName")).to.equal(true); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass("fooClassName")).toBe(true); + expect(shallowDay.hasClass("barClassName")).toBe(true); + expect(shallowDay.hasClass(className)).toBe(true); }); }); }); @@ -221,11 +219,11 @@ describe("Day", () => { const day = newDate(); const holidaysDates = [ { date: new Date(), holidayName: ["India's Independence Day"] }, - { date: new Date(2023, 11, 25), holidayName: ["Christmas"] } + { date: new Date(2023, 11, 25), holidayName: ["Christmas"] }, ]; const holidaysDatesMap = getHolidaysMap(holidaysDates); const shallowDay = renderDay(day, { holidays: holidaysDatesMap }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should not apply the holiday class if not in holidays array", () => { @@ -233,16 +231,16 @@ describe("Day", () => { const holidaysDates = [ { date: new Date(2023, 7, 15), - holidayName: ["India's Independence Day"] + holidayName: ["India's Independence Day"], }, { date: new Date(2023, 11, 25), - holidayName: ["Christmas"] - } + holidayName: ["Christmas"], + }, ]; const holidaysDatesMap = getHolidaysMap(holidaysDates); const shallowDay = renderDay(day, { holidays: holidaysDatesMap }); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); }); @@ -253,32 +251,32 @@ describe("Day", () => { const day = newDate(); const dayClassNameFunc = () => className; const shallowDay = renderDay(day, { dayClassName: dayClassNameFunc }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should pass rendered days date to dayClassName func", () => { const day = newDate(); const dayClassNameFunc = (date) => { - expect(date).to.equal(day); + expect(date).toBe(day); return className; }; const shallowDay = renderDay(day, { dayClassName: dayClassNameFunc }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should not add any additional className when passed dayClassName prop function returns undefined", () => { const day = newDate(); const dayClassNameFunc = () => undefined; const shallowDay = renderDay(day, { dayClassName: dayClassNameFunc }); - expect(shallowDay.hasClass(className)).to.equal(false); - expect(shallowDay.hasClass("undefined")).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); + expect(shallowDay.hasClass("undefined")).toBe(false); }); it("should not add any additional className when dayClassName prop is not passed", () => { const day = newDate(); const shallowDay = renderDay(day); - expect(shallowDay.hasClass(className)).to.equal(false); - expect(shallowDay.hasClass("undefined")).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); + expect(shallowDay.hasClass("undefined")).toBe(false); }); }); @@ -290,7 +288,7 @@ describe("Day", () => { const startDate = subDays(day, 1); const endDate = addDays(day, 1); const shallowDay = renderDay(day, { startDate, endDate }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should not apply the in-range class if not in range", () => { @@ -298,7 +296,7 @@ describe("Day", () => { const startDate = addDays(day, 1); const endDate = addDays(day, 2); const shallowDay = renderDay(day, { startDate, endDate }); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); it("should apply the in-range class if equal to start date", () => { @@ -306,7 +304,7 @@ describe("Day", () => { const startDate = newDate(day); const endDate = addDays(day, 1); const shallowDay = renderDay(day, { startDate, endDate }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should apply the in-range class if equal to end date", () => { @@ -314,21 +312,21 @@ describe("Day", () => { const startDate = subDays(day, 1); const endDate = newDate(day); const shallowDay = renderDay(day, { startDate, endDate }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should not apply the in-range class if start date missing", () => { const day = newDate(); const startDate = subDays(day, 1); const shallowDay = renderDay(day, { startDate }); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); it("should not apply the in-range class if end date missing", () => { const day = newDate(); const endDate = addDays(day, 1); const shallowDay = renderDay(day, { endDate }); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); }); @@ -359,7 +357,7 @@ describe("Day", () => { selectingDate, selectsStart: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.true; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(true); } }); @@ -373,22 +371,22 @@ describe("Day", () => { selectingDate, selectsStart: true, }); - expect(shallowStartDay.hasClass(rangeDayStartClassName)).to.be.true; + expect(shallowStartDay.hasClass(rangeDayStartClassName)).toBe(true); const shallowMidRangeDay = renderDay(midRangeDate, { endDate, selectingDate, selectsStart: true, }); - expect(shallowMidRangeDay.hasClass(rangeDayStartClassName)).to.be.false; - expect(shallowMidRangeDay.hasClass(rangeDayEndClassName)).to.be.false; + expect(shallowMidRangeDay.hasClass(rangeDayStartClassName)).toBe(false); + expect(shallowMidRangeDay.hasClass(rangeDayEndClassName)).toBe(false); const shallowEndDay = renderDay(endDate, { endDate, selectingDate, selectsStart: true, }); - expect(shallowEndDay.hasClass(rangeDayEndClassName)).to.be.true; + expect(shallowEndDay.hasClass(rangeDayEndClassName)).toBe(true); }); it("should not highlight for days after the end date", () => { @@ -400,7 +398,7 @@ describe("Day", () => { selectingDate, selectsStart: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should not highlight if there is no end date selected", () => { @@ -411,7 +409,7 @@ describe("Day", () => { selectingDate, selectsStart: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should not highlight for disabled dates when selectsDisabledDaysInRange is false (default)", () => { @@ -423,7 +421,7 @@ describe("Day", () => { selectsStart: true, excludeDates: [selectingDate], }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should highlight for disabled dates when selectsDisabledDaysInRange is true", () => { @@ -436,7 +434,7 @@ describe("Day", () => { excludeDates: [selectingDate], selectsDisabledDaysInRange: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.true; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(true); }); it("should not highlight for disabled dates within interval when selectsDisabledDaysInRange is false (default)", () => { @@ -450,7 +448,7 @@ describe("Day", () => { { start: subDays(selectingDate, 1), end: endDate }, ], }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should highlight for disabled dates within interval when selectsDisabledDaysInRange is true", () => { @@ -465,7 +463,7 @@ describe("Day", () => { ], selectsDisabledDaysInRange: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.true; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(true); }); }); @@ -482,7 +480,7 @@ describe("Day", () => { selectingDate: day, selectsEnd: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.true; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(true); } }); @@ -496,22 +494,22 @@ describe("Day", () => { selectingDate, selectsEnd: true, }); - expect(shallowStartDay.hasClass(rangeDayStartClassName)).to.be.true; + expect(shallowStartDay.hasClass(rangeDayStartClassName)).toBe(true); const shallowMidRangeDay = renderDay(midRangeDate, { startDate, selectingDate, selectsEnd: true, }); - expect(shallowMidRangeDay.hasClass(rangeDayStartClassName)).to.be.false; - expect(shallowMidRangeDay.hasClass(rangeDayEndClassName)).to.be.false; + expect(shallowMidRangeDay.hasClass(rangeDayStartClassName)).toBe(false); + expect(shallowMidRangeDay.hasClass(rangeDayEndClassName)).toBe(false); const shallowEndDay = renderDay(selectingDate, { startDate, selectingDate, selectsEnd: true, }); - expect(shallowEndDay.hasClass(rangeDayEndClassName)).to.be.true; + expect(shallowEndDay.hasClass(rangeDayEndClassName)).toBe(true); }); it("should not highlight for days before the start date", () => { @@ -522,7 +520,7 @@ describe("Day", () => { selectingDate, selectsEnd: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should not highlight if there is no start date selected", () => { @@ -533,7 +531,7 @@ describe("Day", () => { selectingDate, selectsEnd: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should not highlight for disabled dates when selectsDisabledDaysInRange is false (default)", () => { @@ -545,7 +543,7 @@ describe("Day", () => { selectsEnd: true, excludeDates: [selectingDate], }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should highlight for disabled dates when selectsDisabledDaysInRange is true", () => { @@ -558,7 +556,7 @@ describe("Day", () => { excludeDates: [selectingDate], selectsDisabledDaysInRange: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.true; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(true); }); it("should not highlight for disabled dates within interval when selectsDisabledDaysInRange is false (default)", () => { @@ -572,7 +570,7 @@ describe("Day", () => { { start: startDate, end: addDays(selectingDate, 1) }, ], }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should highlight for disabled dates within interval when selectsDisabledDaysInRange is true", () => { @@ -587,7 +585,7 @@ describe("Day", () => { ], selectsDisabledDaysInRange: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.true; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(true); }); }); @@ -602,22 +600,22 @@ describe("Day", () => { selectingDate: endDate, selectsRange: true, }); - expect(shallowStartDay.hasClass(rangeDayStartClassName)).to.be.true; + expect(shallowStartDay.hasClass(rangeDayStartClassName)).toBe(true); const shallowMidRangeDay = renderDay(midRangeDate, { startDate, selectingDate: endDate, selectsRange: true, }); - expect(shallowMidRangeDay.hasClass(rangeDayStartClassName)).to.be.false; - expect(shallowMidRangeDay.hasClass(rangeDayEndClassName)).to.be.false; + expect(shallowMidRangeDay.hasClass(rangeDayStartClassName)).toBe(false); + expect(shallowMidRangeDay.hasClass(rangeDayEndClassName)).toBe(false); const shallowEndDay = renderDay(endDate, { startDate, selectingDate: endDate, selectsRange: true, }); - expect(shallowEndDay.hasClass(rangeDayEndClassName)).to.be.true; + expect(shallowEndDay.hasClass(rangeDayEndClassName)).toBe(true); }); }); }); @@ -627,26 +625,26 @@ describe("Day", () => { it("should apply the today class if today", () => { const shallowDay = renderDay(newDate()); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should not apply the today class if not today", () => { const shallowDay = renderDay(addDays(newDate(), 1)); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); it("should apply the aria-current date attribute if today", () => { const shallowDay = renderDay(newDate()); const ariaCurrent = shallowDay.prop("aria-current"); - expect(ariaCurrent).to.equal("date"); + expect(ariaCurrent).toBe("date"); }); it("should not apply the aria-current date attribute if not today", () => { const shallowDay = renderDay(addDays(newDate(), 1)); const ariaCurrent = shallowDay.prop("aria-current"); - expect(ariaCurrent).to.be.undefined; + expect(ariaCurrent).toBeUndefined(); }); }); @@ -655,17 +653,17 @@ describe("Day", () => { it("should apply the weekend class if Saturday", () => { const shallowDay = renderDay(newDate("2015-12-19")); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should apply the weekend class if Sunday", () => { const shallowDay = renderDay(newDate("2015-12-20")); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should not apply the today class if not the weekend", () => { const shallowDay = renderDay(newDate("2015-12-21")); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); }); @@ -675,7 +673,7 @@ describe("Day", () => { it("should not apply the outside-month class if in same month", () => { const day = newDate(); const shallowDay = renderDay(day, { month: getMonth(day) }); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); it("should apply the outside-month class if not in same month", () => { @@ -687,24 +685,24 @@ describe("Day", () => { const shallowDay2 = renderDay(day2, { month: 11 }); const shallowDay3 = renderDay(day3, { month: 4 }); const shallowDay4 = renderDay(day4, { month: 2 }); - expect(shallowDay1.hasClass(className)).to.equal(true); - expect(shallowDay2.hasClass(className)).to.equal(true); - expect(shallowDay3.hasClass(className)).to.equal(true); - expect(shallowDay4.hasClass(className)).to.equal(true); + expect(shallowDay1.hasClass(className)).toBe(true); + expect(shallowDay2.hasClass(className)).toBe(true); + expect(shallowDay3.hasClass(className)).toBe(true); + expect(shallowDay4.hasClass(className)).toBe(true); }); it("should hide days outside month at end when duplicates", () => { const day = newDate("2021-03-17"); const wrapper = mount( - + , ); - expect(wrapper.text()).to.be.empty; + expect(wrapper.text()).toHaveLength(0); }); it("should show days outside month at end when not duplicates", () => { const day = newDate("2020-03-17"); const wrapper = mount(); - expect(wrapper.text()).to.equal(day.getDate().toString()); + expect(wrapper.text()).toBe(day.getDate().toString()); }); it("should hide days outside month at start when duplicates", () => { @@ -714,15 +712,15 @@ describe("Day", () => { day={day} month={getMonth(day) + 1} monthShowsDuplicateDaysStart - /> + />, ); - expect(wrapper.text()).to.be.empty; + expect(wrapper.text()).toHaveLength(0); }); it("should show days outside month at start when not duplicates", () => { const day = newDate("2020-10-05"); const wrapper = mount(); - expect(wrapper.text()).to.equal(day.getDate().toString()); + expect(wrapper.text()).toBe(day.getDate().toString()); }); it("should show days in month when duplicates at start/end", () => { @@ -733,9 +731,9 @@ describe("Day", () => { month={getMonth(day)} monthShowsDuplicateDaysStart monthShowsDuplicateDaysEnd - /> + />, ); - expect(wrapper.text()).to.equal(day.getDate().toString()); + expect(wrapper.text()).toBe(day.getDate().toString()); }); }); @@ -744,13 +742,13 @@ describe("Day", () => { it("should be enabled if date is enabled", () => { const shallowDay = renderDay(newDate()); - expect(shallowDay.hasClass(className)).to.equal(false); + expect(shallowDay.hasClass(className)).toBe(false); }); it("should be disabled if date is disabled", () => { const day = newDate(); const shallowDay = renderDay(day, { excludeDates: [day] }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should be disabled if date is within excluded interval", () => { @@ -760,13 +758,13 @@ describe("Day", () => { { start: subDays(day, 1), end: addDays(day, 1) }, ], }); - expect(shallowDay.hasClass(className)).to.equal(true); + expect(shallowDay.hasClass(className)).toBe(true); }); it("should have aria-disabled attribute with true value if date is disabled", () => { const day = newDate(); const shallowDay = renderDay(day, { excludeDates: [day] }); - expect(shallowDay.prop("aria-disabled")).to.equal(true); + expect(shallowDay.prop("aria-disabled")).toBe(true); }); it("should have aria-disabled attribute with true value if date is within excluded interval", () => { @@ -776,12 +774,12 @@ describe("Day", () => { { start: subDays(day, 1), end: addDays(day, 1) }, ], }); - expect(shallowDay.prop("aria-disabled")).to.equal(true); + expect(shallowDay.prop("aria-disabled")).toBe(true); }); it("should have aria-disabled attribute with false value if date is not disabled", () => { const shallowDay = renderDay(newDate()); - expect(shallowDay.prop("aria-disabled")).to.equal(false); + expect(shallowDay.prop("aria-disabled")).toBe(false); }); }); @@ -796,8 +794,8 @@ describe("Day", () => { ariaLabelPrefixWhenEnabled: ariaLabelPrefixWhenEnabled, }); expect( - shallowDay.html().indexOf(`aria-label="${ariaLabelPrefixWhenEnabled}`) - ).not.equal(-1); + shallowDay.html().indexOf(`aria-label="${ariaLabelPrefixWhenEnabled}`), + ).not.toBe(-1); }); it("should have the correct provided prefix if date is disabled", () => { @@ -807,8 +805,8 @@ describe("Day", () => { excludeDates: [day], }); expect( - shallowDay.html().indexOf(`aria-label="${ariaLabelPrefixWhenDisabled}`) - ).not.equal(-1); + shallowDay.html().indexOf(`aria-label="${ariaLabelPrefixWhenDisabled}`), + ).not.toBe(-1); }); it("should have the correct provided prefix if date is within excluded interval", () => { @@ -820,15 +818,15 @@ describe("Day", () => { ], }); expect( - shallowDay.html().indexOf(`aria-label="${ariaLabelPrefixWhenDisabled}`) - ).not.equal(-1); + shallowDay.html().indexOf(`aria-label="${ariaLabelPrefixWhenDisabled}`), + ).not.toBe(-1); }); it("should display date in English is locale is not provided", () => { const day = newDate("2021-05-26"); const shallowDay = renderDay(day); - expect(shallowDay.html().indexOf("Wednesday, May 26th, 2021")).not.equal( - -1 + expect(shallowDay.html().indexOf("Wednesday, May 26th, 2021")).not.toBe( + -1, ); }); @@ -839,8 +837,8 @@ describe("Day", () => { locale: "es", }); expect( - shallowDay.html().indexOf("miércoles, 26 de mayo de 2021") - ).not.equal(-1); + shallowDay.html().indexOf("miércoles, 26 de mayo de 2021"), + ).not.toBe(-1); }); }); @@ -859,16 +857,16 @@ describe("Day", () => { const day = newDate(); const dayNode = shallow(); dayNode.find(".react-datepicker__day").simulate("click"); - expect(onClickCalled).to.be.true; + expect(onClickCalled).toBe(true); }); it("should not call onClick if day is disabled", () => { const day = newDate(); const dayNode = shallow( - + , ); dayNode.find(".react-datepicker__day").simulate("click"); - expect(onClickCalled).to.be.false; + expect(onClickCalled).toBe(false); }); it("should not call onClick if day is within excluded interval", () => { @@ -880,10 +878,10 @@ describe("Day", () => { { start: subDays(day, 1), end: addDays(day, 1) }, ]} onClick={onClick} - /> + />, ); dayNode.find(".react-datepicker__day").simulate("click"); - expect(onClickCalled).to.be.false; + expect(onClickCalled).toBe(false); }); }); @@ -901,7 +899,7 @@ describe("Day", () => { it("should call onMouseEnter if day is hovered", () => { const shallowDay = renderDay(newDate(), { onMouseEnter }); shallowDay.find(".react-datepicker__day").simulate("mouseenter"); - expect(onMouseEnterCalled).to.be.true; + expect(onMouseEnterCalled).toBe(true); }); }); @@ -930,7 +928,7 @@ describe("Day", () => { selectingDate, selectsRange: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.true; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(true); } }); @@ -942,7 +940,7 @@ describe("Day", () => { selectingDate, selectsRange: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should have a class if it is a start or end date", () => { @@ -955,23 +953,23 @@ describe("Day", () => { endDate, selectsRange: true, }); - expect(shallowStartDay.hasClass(rangeDayStartClassName)).to.be.true; + expect(shallowStartDay.hasClass(rangeDayStartClassName)).toBe(true); const shallowMidRangeDay = renderDay(midRangeDate, { startDate, endDate, selectsRange: true, }); - expect(shallowMidRangeDay.hasClass(rangeDayStartClassName)).to.be.false; - expect(shallowMidRangeDay.hasClass(rangeSetDayClassName)).to.be.true; - expect(shallowMidRangeDay.hasClass(rangeDayEndClassName)).to.be.false; + expect(shallowMidRangeDay.hasClass(rangeDayStartClassName)).toBe(false); + expect(shallowMidRangeDay.hasClass(rangeSetDayClassName)).toBe(true); + expect(shallowMidRangeDay.hasClass(rangeDayEndClassName)).toBe(false); const shallowEndDay = renderDay(endDate, { startDate, endDate, selectsRange: true, }); - expect(shallowEndDay.hasClass(rangeDayEndClassName)).to.be.true; + expect(shallowEndDay.hasClass(rangeDayEndClassName)).toBe(true); }); it("should not highlight for days after the end date", () => { @@ -983,7 +981,7 @@ describe("Day", () => { selectingDate, selectsRange: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should not highlight if there is no end date selected", () => { @@ -994,7 +992,7 @@ describe("Day", () => { selectingDate, selectsRange: true, }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should not highlight for disabled (excluded) dates", () => { @@ -1006,7 +1004,7 @@ describe("Day", () => { selectsRange: true, excludeDates: [selectingDate], }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); it("should not highlight for disabled (within excluded interval) dates", () => { @@ -1018,47 +1016,35 @@ describe("Day", () => { selectsRange: true, excludeDateIntervals: [{ start: selectingDate, end: endDate }], }); - expect(shallowDay.hasClass(rangeDayClassName)).to.be.false; + expect(shallowDay.hasClass(rangeDayClassName)).toBe(false); }); }); describe("focus", () => { - let sandbox; - beforeEach(function () { - sandbox = sinon.createSandbox(); - }); afterEach(function () { - sandbox.restore(); + jest.resetAllMocks(); }); - // skipping since running this test skips a whole set of othr tests - xit("should apply focus to the preselected day", () => { + it("should apply focus to the preselected day", () => { const day = newDate(); const dayInstance = mount( - + , ).instance(); - sandbox.spy(dayInstance.dayEl.current, "focus"); + jest.spyOn(dayInstance.dayEl.current, "focus"); dayInstance.componentDidMount(); - defer(() => { - expect(dayInstance.dayEl.current.focus.calledOnce).to.equal(true); - done(); - }); + expect(dayInstance.dayEl.current.focus).toHaveBeenCalledTimes(1); }); - // skipping since running this test skips a whole set of othr tests - xit("should not apply focus to the preselected day if inline", () => { + it("should not apply focus to the preselected day if inline", () => { const day = newDate(); const dayInstance = mount( - + , ).instance(); - sandbox.spy(dayInstance.dayEl.current, "focus"); + jest.spyOn(dayInstance.dayEl.current, "focus"); dayInstance.componentDidMount(); - defer(() => { - expect(dayInstance.dayEl.current.focus.calledOnce).to.equal(false); - done(); - }); + expect(dayInstance.dayEl.current.focus).not.toHaveBeenCalledTimes(1); }); }); @@ -1070,22 +1056,22 @@ describe("Day", () => { "08.15.2023", { className: "react-datepicker__day--holidays", - holidayNames: ["India's Independence Day"] - } + holidayNames: ["India's Independence Day"], + }, ], [ "12.25.2023", { className: "react-datepicker__day--holidays", - holidayNames: ["Christmas"] - } - ] + holidayNames: ["Christmas"], + }, + ], ]); const shallowDay = renderDay(day, { holidays: holidays, }); - expect(shallowDay.html().indexOf('title="Christmas"')).not.equal(-1); + expect(shallowDay.html().indexOf('title="Christmas"')).not.toBe(-1); }); it("uses both the holiday names for a given date as the title", () => { @@ -1095,24 +1081,24 @@ describe("Day", () => { "08.15.2023", { className: "react-datepicker__day--holidays", - holidayNames: ["Holiday 1", "Holiday 2"] - } + holidayNames: ["Holiday 1", "Holiday 2"], + }, ], [ "12.25.2023", { className: "react-datepicker__day--holidays", - holidayNames: ["Christmas"] - } - ] + holidayNames: ["Christmas"], + }, + ], ]); const shallowDay = renderDay(day, { holidays: holidays, }); expect( - shallowDay.html().indexOf('title="Holiday 1, Holiday 2"') - ).not.equal(-1); + shallowDay.html().indexOf('title="Holiday 1, Holiday 2"'), + ).not.toBe(-1); }); it("should have the title as empty string if date is not from holiday list", () => { @@ -1122,22 +1108,22 @@ describe("Day", () => { "08.15.2023", { className: "react-datepicker__day--holidays", - holidayNames: ["India's Independence Day"] - } + holidayNames: ["India's Independence Day"], + }, ], [ "12.25.2023", { className: "react-datepicker__day--holidays", - holidayNames: ["Christmas"] - } - ] + holidayNames: ["Christmas"], + }, + ], ]); const shallowDay = renderDay(day, { - holidays: holidays + holidays: holidays, }); - expect(shallowDay.html().indexOf('title=""')).not.equal(-1); + expect(shallowDay.html().indexOf('title=""')).not.toBe(-1); }); }); }); diff --git a/test/exclude_time_period_test.js b/test/exclude_time_period_test.test.js similarity index 78% rename from test/exclude_time_period_test.js rename to test/exclude_time_period_test.test.js index 21aec6a7b..b891897da 100644 --- a/test/exclude_time_period_test.js +++ b/test/exclude_time_period_test.test.js @@ -4,16 +4,6 @@ import * as utils from "../src/date_utils"; import DatePicker from "../src/index.jsx"; describe("DatePicker", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - it("should only display times between minTime and maxTime", () => { var now = utils.newDate(); var datePicker = mount( @@ -23,9 +13,9 @@ describe("DatePicker", () => { onChange={() => null} minTime={utils.setTime(now, { hours: 17, minutes: 0 })} maxTime={utils.setTime(now, { hours: 18, minutes: 0 })} - /> + />, ); var times = datePicker.find("li.react-datepicker__time-list-item"); - expect(times).to.exist; + expect(times).not.toBeNull(); }); }); diff --git a/test/exclude_times_test.js b/test/exclude_times_test.test.js similarity index 72% rename from test/exclude_times_test.js rename to test/exclude_times_test.test.js index df9fe8f29..6366392cf 100644 --- a/test/exclude_times_test.js +++ b/test/exclude_times_test.test.js @@ -4,16 +4,6 @@ import { setTime, newDate } from "../src/date_utils"; import DatePicker from "../src/index.jsx"; describe("DatePicker", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - it("should disable times specified in excludeTimes props", () => { var now = newDate(); var datePicker = mount( @@ -25,9 +15,10 @@ describe("DatePicker", () => { setTime(now, { hours: 19, minutes: 30 }), setTime(now, { hours: 17, minutes: 30 }), ]} - /> + />, ); - expect(datePicker.find(".react-datepicker__time-list-item--disabled")).to - .exist; + expect( + datePicker.find(".react-datepicker__time-list-item--disabled"), + ).not.toBeNull(); }); }); diff --git a/test/filter_times_test.js b/test/filter_times_test.test.js similarity index 72% rename from test/filter_times_test.js rename to test/filter_times_test.test.js index 0420fc4fe..3fd80d3fc 100644 --- a/test/filter_times_test.js +++ b/test/filter_times_test.test.js @@ -4,23 +4,13 @@ import { getHours } from "../src/date_utils"; import TimeComponent from "../src/time"; describe("TimeComponent", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - it("should disable times matched by filterTime prop", () => { const timeComponent = mount( - getHours(time) !== 17} /> + getHours(time) !== 17} />, ); expect( - timeComponent.find(".react-datepicker__time-list-item--disabled") - ).to.have.length(2); + timeComponent.find(".react-datepicker__time-list-item--disabled"), + ).toHaveLength(2); }); }); diff --git a/test/include_times_test.js b/test/include_times_test.test.js similarity index 71% rename from test/include_times_test.js rename to test/include_times_test.test.js index b2c12957a..fd6679c43 100644 --- a/test/include_times_test.js +++ b/test/include_times_test.test.js @@ -4,16 +4,6 @@ import * as utils from "../src/date_utils"; import TimeComponent from "../src/time"; describe("TimeComponent", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - it("should only enable times specified in includeTimes props", () => { const today = utils.getStartOfDay(utils.newDate()); const timeComponent = mount( @@ -23,12 +13,12 @@ describe("TimeComponent", () => { utils.addMinutes(today, 120), utils.addMinutes(today, 150), ]} - /> + />, ); const disabledItems = timeComponent.find( - ".react-datepicker__time-list-item--disabled" + ".react-datepicker__time-list-item--disabled", ); - expect(disabledItems).to.have.length(45); + expect(disabledItems).toHaveLength(45); }); }); diff --git a/test/index.js b/test/index.js index 54775feab..7d9c7bbbb 100644 --- a/test/index.js +++ b/test/index.js @@ -1,8 +1,4 @@ import Enzyme from "enzyme"; import Adapter from "@wojtekmaj/enzyme-adapter-react-17"; -import "../src/stylesheets/datepicker.scss"; Enzyme.configure({ adapter: new Adapter() }); - -const context = require.context(".", true, /_test$/); -context.keys().forEach(context); diff --git a/test/inject_times_test.js b/test/inject_times_test.test.js similarity index 76% rename from test/inject_times_test.js rename to test/inject_times_test.test.js index 42cb4b941..06979a1ef 100644 --- a/test/inject_times_test.js +++ b/test/inject_times_test.test.js @@ -4,16 +4,6 @@ import * as utils from "../src/date_utils"; import TimeComponent from "../src/time"; describe("TimeComponent", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - it("should show times specified in injectTimes props", () => { const today = utils.getStartOfDay(utils.newDate()); const timeComponent = mount( @@ -23,13 +13,13 @@ describe("TimeComponent", () => { utils.addMinutes(today, 725), utils.addMinutes(today, 1439), ]} - /> + />, ); const injectedItems = timeComponent.find( - ".react-datepicker__time-list-item--injected" + ".react-datepicker__time-list-item--injected", ); - expect(injectedItems).to.have.length(3); + expect(injectedItems).toHaveLength(3); }); it("should not affect existing time intervals", () => { @@ -42,13 +32,13 @@ describe("TimeComponent", () => { utils.addMinutes(today, 60), utils.addMinutes(today, 1440), ]} - /> + />, ); const injectedItems = timeComponent.find( - ".react-datepicker__time-list-item--injected" + ".react-datepicker__time-list-item--injected", ); - expect(injectedItems).to.have.length(0); + expect(injectedItems).toHaveLength(0); }); it("should allow multiple injected times per interval", () => { @@ -61,13 +51,13 @@ describe("TimeComponent", () => { utils.addMinutes(today, 2), utils.addMinutes(today, 3), ]} - /> + />, ); const injectedItems = timeComponent.find( - ".react-datepicker__time-list-item--injected" + ".react-datepicker__time-list-item--injected", ); - expect(injectedItems).to.have.length(3); + expect(injectedItems).toHaveLength(3); }); it("should sort injected times automatically", () => { @@ -80,13 +70,13 @@ describe("TimeComponent", () => { utils.addMinutes(today, 1), utils.addMinutes(today, 2), ]} - /> + />, ); const injectedItems = timeComponent.find( - ".react-datepicker__time-list-item--injected" + ".react-datepicker__time-list-item--injected", ); - expect(injectedItems.map((node) => node.text())).eql([ + expect(injectedItems.map((node) => node.text())).toEqual([ "12:01 AM", "12:02 AM", "12:03 AM", diff --git a/test/month_dropdown_test.js b/test/month_dropdown_test.test.js similarity index 81% rename from test/month_dropdown_test.js rename to test/month_dropdown_test.test.js index 5112b6200..8cc1a5ac4 100644 --- a/test/month_dropdown_test.js +++ b/test/month_dropdown_test.test.js @@ -14,7 +14,6 @@ describe("MonthDropdown", () => { const mockHandleChange = function (changeInput) { handleChangeResult = changeInput; }; - let sandbox; function getMonthDropdown(overrideProps) { return mount( @@ -23,26 +22,21 @@ describe("MonthDropdown", () => { month={11} onChange={mockHandleChange} {...overrideProps} - /> + />, ); } beforeEach(() => { handleChangeResult = null; - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); }); describe("scroll mode", () => { - beforeEach(function () { + beforeEach(() => { monthDropdown = getMonthDropdown(); }); it("shows the selected month in the initial view", () => { - expect(monthDropdown.text()).to.contain("December"); + expect(monthDropdown.text()).toContain("December"); }); it("opens a list when read view is clicked", () => { @@ -50,7 +44,7 @@ describe("MonthDropdown", () => { .find(".react-datepicker__month-read-view") .simulate("click"); var optionsView = monthDropdown.find(MonthDropdownOptions); - expect(optionsView).to.exist; + expect(optionsView).not.toBeNull(); }); describe("with the selected month", () => { @@ -61,17 +55,17 @@ describe("MonthDropdown", () => { .find(".react-datepicker__month-read-view") .simulate("click"); selectedMonth = monthDropdown.find( - ".react-datepicker__month-option--selected_month" + ".react-datepicker__month-option--selected_month", ); }); it("applies the 'selected' modifier class to the selected month", () => { - expect(selectedMonth.text()).to.contain("December"); + expect(selectedMonth.text()).toContain("December"); }); it("adds aria-selected property to the selected month", () => { const ariaSelected = selectedMonth.prop("aria-selected"); - expect(ariaSelected).to.equal("true"); + expect(ariaSelected).toEqual("true"); }); }); @@ -88,12 +82,12 @@ describe("MonthDropdown", () => { }); it("does not apply the 'selected' modifier class to the selected month", () => { - expect(notSelectedMonth.text()).to.not.contain("December"); + expect(notSelectedMonth.text()).not.toContain("December"); }); it("does not add aria-selected property to the selected month", () => { const ariaSelected = notSelectedMonth.prop("aria-selected"); - expect(ariaSelected).to.be.undefined; + expect(ariaSelected).toBe(undefined); }); }); @@ -105,22 +99,22 @@ describe("MonthDropdown", () => { .find(".react-datepicker__month-option") .at(1) .simulate("click"); - expect(monthDropdown.find(MonthDropdownOptions)).to.have.length(0); + expect(monthDropdown.find(MonthDropdownOptions)).toHaveLength(0); }); it("closes the dropdown if outside is clicked", () => { const monthNames = range(0, 12).map((M) => getMonthInLocale(M)); - const onCancelSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); const monthDropdownOptionsInstance = mount( + />, ).instance(); monthDropdownOptionsInstance.handleClickOutside(); - expect(onCancelSpy.calledOnce).to.be.true; + expect(onCancelSpy).toHaveBeenCalledTimes(1); }); it("does not call the supplied onChange function when the same month is clicked", () => { @@ -131,7 +125,7 @@ describe("MonthDropdown", () => { .find(".react-datepicker__month-option") .at(11) .simulate("click"); - expect(handleChangeResult).to.be.null; + expect(handleChangeResult).toBeNull(); }); it("calls the supplied onChange function when a different month is clicked", () => { @@ -142,7 +136,7 @@ describe("MonthDropdown", () => { .find(".react-datepicker__month-option") .at(2) .simulate("click"); - expect(handleChangeResult).to.eq(2); + expect(handleChangeResult).toEqual(2); }); it("should use locale stand-alone formatting to display month names", () => { @@ -150,13 +144,13 @@ describe("MonthDropdown", () => { registerLocale("ru", ru); let dropdownDateFormat = getMonthDropdown(); - expect(dropdownDateFormat.text()).to.contain("December"); + expect(dropdownDateFormat.text()).toContain("December"); dropdownDateFormat = getMonthDropdown({ locale: "el" }); - expect(dropdownDateFormat.text()).to.contain("Δεκέμβριος"); + expect(dropdownDateFormat.text()).toContain("Δεκέμβριος"); dropdownDateFormat = getMonthDropdown({ locale: "ru" }); - expect(dropdownDateFormat.text()).to.contain("декабрь"); + expect(dropdownDateFormat.text()).toContain("декабрь"); }); }); @@ -164,16 +158,16 @@ describe("MonthDropdown", () => { it("renders a select", () => { monthDropdown = getMonthDropdown({ dropdownMode: "select" }); var select = monthDropdown.find(".react-datepicker__month-select"); - expect(select).to.have.length(1); - expect(select.prop("value")).to.eq(11); + expect(select).toHaveLength(1); + expect(select.prop("value")).toEqual(11); var options = select.find("option"); - expect(options.map((o) => o.prop("value"))).to.eql(range(0, 12)); + expect(options.map((o) => o.prop("value"))).toEqual(range(0, 12)); }); it("renders month options with default locale", () => { monthDropdown = getMonthDropdown({ dropdownMode: "select" }); var options = monthDropdown.find("option"); - expect(options.map((o) => o.text())).to.eql([ + expect(options.map((o) => o.text())).toEqual([ "January", "February", "March", @@ -195,7 +189,7 @@ describe("MonthDropdown", () => { useShortMonthInDropdown: true, }); var options = monthDropdown.find("option"); - expect(options.map((o) => o.text())).to.eql([ + expect(options.map((o) => o.text())).toEqual([ "Jan", "Feb", "Mar", @@ -218,7 +212,7 @@ describe("MonthDropdown", () => { locale: "zh-cn", }); var options = monthDropdown.find("option"); - expect(options.map((o) => o.text())).to.eql([ + expect(options.map((o) => o.text())).toEqual([ "一月", "二月", "三月", @@ -238,14 +232,14 @@ describe("MonthDropdown", () => { monthDropdown = getMonthDropdown({ dropdownMode: "select", month: 11 }); var select = monthDropdown.find(".react-datepicker__month-select"); select.simulate("change", { target: { value: 11 } }); - expect(handleChangeResult).to.not.exist; + expect(handleChangeResult).toBeFalsy(); }); it("calls the supplied onChange function when a different month is clicked", () => { monthDropdown = getMonthDropdown({ dropdownMode: "select", month: 11 }); var select = monthDropdown.find(".react-datepicker__month-select"); select.simulate("change", { target: { value: 9 } }); - expect(handleChangeResult).to.equal(9); + expect(handleChangeResult).toEqual(9); }); }); }); diff --git a/test/month_test.js b/test/month_test.test.js similarity index 82% rename from test/month_test.js rename to test/month_test.test.js index ce501f41c..c6149b8d6 100644 --- a/test/month_test.js +++ b/test/month_test.test.js @@ -13,17 +13,11 @@ describe("Month", () => { function assertDateRangeInclusive(month, start, end) { const dayCount = utils.getDaysDiff(end, start) + 1; const days = month.find(Day); - expect(days).to.have.length(dayCount); + expect(days).toHaveLength(dayCount); range(0, dayCount).forEach((offset) => { const day = days.get(offset); const expectedDay = utils.addDays(start, offset); - assert( - utils.isSameDay(day.props.day, expectedDay), - `Day ${(offset % 7) + 1} ` + - `of week ${Math.floor(offset / 7) + 1} ` + - `should be "${utils.formatDate(expectedDay, "yyyy-MM-dd")}" ` + - `but it is "${utils.formatDate(day.props.day, "yyyy-MM-dd")}"` - ); + expect(utils.isSameDay(day.props.day, expectedDay)).toBe(true); }); } @@ -31,36 +25,36 @@ describe("Month", () => { const className = "customClassName"; const monthClassNameFunc = () => className; const month = shallow( - + , ); - expect(month.hasClass(className)).to.equal(true); + expect(month.hasClass(className)).toBe(true); }); it("should have the month CSS class", () => { const month = shallow(); - expect(month.hasClass("react-datepicker__month")).to.equal(true); + expect(month.hasClass("react-datepicker__month")).toBe(true); }); it("should have the month aria-label", () => { const dateString = "2015-12"; const month = TestUtils.renderIntoDocument( - + , ); const month_dom = TestUtils.findRenderedDOMComponentWithClass( month, - "react-datepicker__month" + "react-datepicker__month", ); - expect(month_dom.getAttribute("aria-label")).to.contain(dateString); + expect(month_dom.getAttribute("aria-label")).toContain(dateString); }); it("should have an aria-label containing the provided prefix", () => { const ariaLabelPrefix = "A prefix in my native language"; const shallowMonth = shallow( - + , ); expect( - shallowMonth.html().indexOf(`aria-label="${ariaLabelPrefix}`) - ).not.equal(-1); + shallowMonth.html().indexOf(`aria-label="${ariaLabelPrefix}`), + ).not.toBe(-1); }); it("should render all days of the month and some days in neighboring months", () => { @@ -69,7 +63,7 @@ describe("Month", () => { assertDateRangeInclusive( mount(), utils.getStartOfWeek(monthStart), - utils.getEndOfWeek(utils.getEndOfMonth(monthStart)) + utils.getEndOfWeek(utils.getEndOfMonth(monthStart)), ); }); @@ -79,7 +73,7 @@ describe("Month", () => { assertDateRangeInclusive( mount(), utils.getStartOfWeek(monthStart), - utils.getEndOfWeek(utils.addWeeks(utils.addMonths(monthStart, 1), 1)) + utils.getEndOfWeek(utils.addWeeks(utils.addMonths(monthStart, 1), 1)), ); }); @@ -90,7 +84,7 @@ describe("Month", () => { assertDateRangeInclusive( mount(), calendarStart, - utils.getEndOfWeek(utils.addWeeks(calendarStart, 5)) + utils.getEndOfWeek(utils.addWeeks(calendarStart, 5)), ); }); @@ -101,7 +95,7 @@ describe("Month", () => { assertDateRangeInclusive( mount(), calendarStart, - utils.getEndOfWeek(utils.addWeeks(calendarStart, 6)) + utils.getEndOfWeek(utils.addWeeks(calendarStart, 6)), ); }); @@ -117,7 +111,7 @@ describe("Month", () => { const day = month.find(Day).at(0); day.simulate("click"); - assert(utils.isSameDay(day.prop("day"), dayClicked)); + expect(utils.isSameDay(day.prop("day"), dayClicked)).toBe(true); }); it("should call the provided onMouseLeave function", () => { @@ -128,10 +122,10 @@ describe("Month", () => { } const month = shallow( - + , ); month.simulate("mouseleave"); - expect(mouseLeaveCalled).to.be.true; + expect(mouseLeaveCalled).toBe(true); }); it("should call the provided onDayMouseEnter function", () => { @@ -142,11 +136,11 @@ describe("Month", () => { } const month = mount( - + , ); const day = month.find(Day).first(); day.simulate("mouseenter"); - assert(utils.isSameDay(day.prop("day"), dayMouseEntered)); + expect(utils.isSameDay(day.prop("day"), dayMouseEntered)).toBe(true); }); it("should use its month order in handleDayClick", () => { @@ -162,17 +156,17 @@ describe("Month", () => { day={utils.newDate()} orderInDisplay={order} onDayClick={onDayClick} - /> + />, ); const day = month.find(Day).at(0); day.simulate("click"); - expect(orderValueMatched).to.be.true; + expect(orderValueMatched).toBe(true); }); it("should have the month picker CSS class", () => { const month = shallow(); - expect(month.hasClass("react-datepicker__monthPicker")).to.equal(true); + expect(month.hasClass("react-datepicker__monthPicker")).toBe(true); }); it("should call the provided onMonthClick function", () => { @@ -184,11 +178,11 @@ describe("Month", () => { const monthStart = utils.newDate("2015-12-01"); const monthComponent = mount( - + , ); const month = monthComponent.find(".react-datepicker__month-text").at(6); month.simulate("click"); - expect(utils.getMonth(monthClicked)).to.be.equal(6); + expect(utils.getMonth(monthClicked)).toBe(6); }); it("should return disabled class if current date is out of bound of minDate and maxdate", () => { @@ -198,12 +192,10 @@ describe("Month", () => { minDate={utils.newDate("2016-02-01")} maxDate={utils.newDate()} showMonthYearPicker - /> + />, ); const month = monthComponent.find(".react-datepicker__month-text").at(0); - expect(month.hasClass("react-datepicker__month-text--disabled")).to.equal( - true - ); + expect(month.hasClass("react-datepicker__month-text--disabled")).toBe(true); }); it("should not return disabled class if current date is before minDate but same month", () => { @@ -212,12 +204,12 @@ describe("Month", () => { day={utils.newDate("2015-01-01")} minDate={utils.newDate("2015-01-10")} showMonthYearPicker - /> + />, ); const month = monthComponent.find(".react-datepicker__month-text").at(0); - expect( - month.hasClass("react-datepicker__month-text--disabled") - ).to.not.equal(true); + expect(month.hasClass("react-datepicker__month-text--disabled")).not.toBe( + true, + ); }); it("should not return disabled class if current date is after maxDate but same month", () => { @@ -226,12 +218,12 @@ describe("Month", () => { day={utils.newDate("2015-01-10")} maxDate={utils.newDate("2015-01-01")} showMonthYearPicker - /> + />, ); const month = monthComponent.find(".react-datepicker__month-text").at(0); - expect( - month.hasClass("react-datepicker__month-text--disabled") - ).to.not.equal(true); + expect(month.hasClass("react-datepicker__month-text--disabled")).not.toBe( + true, + ); }); it("should return disabled class if specified excludeDate", () => { @@ -245,15 +237,15 @@ describe("Month", () => { utils.newDate("2015-10-04"), ]} showMonthYearPicker - /> + />, ); // exclude month index const monthTexts = monthComponent.find(".react-datepicker__month-text"); [(1, 3, 6, 9)].forEach((i) => { const month = monthTexts.at(i); - expect(month.hasClass("react-datepicker__month-text--disabled")).to.equal( - true + expect(month.hasClass("react-datepicker__month-text--disabled")).toBe( + true, ); }); }); @@ -271,19 +263,19 @@ describe("Month", () => { utils.newDate("2015-06-06"), ]} showMonthYearPicker - /> + />, ); const monthTexts = monthComponent.find(".react-datepicker__month-text"); for (let i = 0; i < 6; i++) { const month = monthTexts.at(i); - expect(month.hasClass("react-datepicker__month-text--disabled")).to.equal( - false + expect(month.hasClass("react-datepicker__month-text--disabled")).toBe( + false, ); } for (let i = 6; i < 12; i++) { const month = monthTexts.at(i); - expect(month.hasClass("react-datepicker__month-text--disabled")).to.equal( - true + expect(month.hasClass("react-datepicker__month-text--disabled")).toBe( + true, ); } }); @@ -294,7 +286,7 @@ describe("Month", () => { day={utils.newDate("2015-02-01")} selected={utils.newDate("2015-02-01")} preSelection={utils.newDate("2015-02-03")} - /> + />, ); return runAxe(monthComponent.getDOMNode()); }); @@ -309,14 +301,14 @@ describe("Month", () => { selectingDate={utils.newDate("2015-02-01")} selectsStart showMonthYearPicker - /> + />, ); const months = monthComponent.find( - ".react-datepicker__month-text--in-selecting-range" + ".react-datepicker__month-text--in-selecting-range", ); - expect(months.length).to.equal(2); - expect(months.at(0).text()).to.eq("Feb"); - expect(months.at(1).text()).to.eq("Mar"); + expect(months.length).toBe(2); + expect(months.at(0).text()).toBe("Feb"); + expect(months.at(1).text()).toBe("Mar"); }); it("should add in-selecting-range class if month is between the start date and selecting date", () => { @@ -328,15 +320,15 @@ describe("Month", () => { selectingDate={utils.newDate("2015-03-01")} selectsEnd showMonthYearPicker - /> + />, ); const months = monthComponent.find( - ".react-datepicker__month-text--in-selecting-range" + ".react-datepicker__month-text--in-selecting-range", ); - expect(months.length).to.equal(2); - expect(months.at(0).text()).to.eq("Feb"); - expect(months.at(1).text()).to.eq("Mar"); + expect(months.length).toBe(2); + expect(months.at(0).text()).toBe("Feb"); + expect(months.at(1).text()).toBe("Mar"); }); it("should use pre selection date if selecting date is not defined", () => { @@ -347,15 +339,15 @@ describe("Month", () => { startDate={utils.newDate("2015-02-01")} selectsEnd showMonthYearPicker - /> + />, ); const months = monthComponent.find( - ".react-datepicker__month-text--in-selecting-range" + ".react-datepicker__month-text--in-selecting-range", ); - expect(months.length).to.equal(2); - expect(months.at(0).text()).to.eq("Feb"); - expect(months.at(1).text()).to.eq("Mar"); + expect(months.length).toBe(2); + expect(months.at(0).text()).toBe("Feb"); + expect(months.at(1).text()).toBe("Mar"); }); it("should add in-selecting-range class for one month picker if month is between the start date and selecting date", () => { @@ -367,15 +359,15 @@ describe("Month", () => { selectingDate={utils.newDate("2015-03-01")} selectsRange showMonthYearPicker - /> + />, ); const months = monthComponent.find( - ".react-datepicker__month-text--in-selecting-range" + ".react-datepicker__month-text--in-selecting-range", ); - expect(months.length).to.equal(2); - expect(months.at(0).text()).to.eq("Feb"); - expect(months.at(1).text()).to.eq("Mar"); + expect(months.length).toBe(2); + expect(months.at(0).text()).toBe("Feb"); + expect(months.at(1).text()).toBe("Mar"); }); it("should not add in-selecting-range class for one month picker if the start date is not defined", () => { @@ -386,13 +378,13 @@ describe("Month", () => { selectingDate={utils.newDate("2015-03-01")} selectsRange showMonthYearPicker - /> + />, ); const months = monthComponent.find( - ".react-datepicker__month-text--in-selecting-range" + ".react-datepicker__month-text--in-selecting-range", ); - expect(months.length).to.equal(0); + expect(months.length).toBe(0); }); it("should not add in-selecting-range class for one month picker if the end date is defined", () => { @@ -404,13 +396,13 @@ describe("Month", () => { endDate={utils.newDate("2015-03-01")} selectsRange showMonthYearPicker - /> + />, ); const months = monthComponent.find( - ".react-datepicker__month-text--in-selecting-range" + ".react-datepicker__month-text--in-selecting-range", ); - expect(months.length).to.equal(0); + expect(months.length).toBe(0); }); it("should add 'selecting-range-start' class to the start selecting month", () => { @@ -422,13 +414,13 @@ describe("Month", () => { selectingDate={utils.newDate("2015-02-01")} selectsStart showMonthYearPicker - /> + />, ); const months = monthComponent.find( - ".react-datepicker__month-text--selecting-range-start" + ".react-datepicker__month-text--selecting-range-start", ); - expect(months.length).to.equal(1); - expect(months.at(0).text()).to.eq("Feb"); + expect(months.length).toBe(1); + expect(months.at(0).text()).toBe("Feb"); }); it("should add 'selecting-range-end' class to the end selecting month", () => { @@ -441,13 +433,13 @@ describe("Month", () => { selectingDate={utils.newDate("2015-06-01")} selectsEnd showMonthYearPicker - /> + />, ); const months = monthComponent.find( - ".react-datepicker__month-text--selecting-range-end" + ".react-datepicker__month-text--selecting-range-end", ); - expect(months.length).to.equal(1); - expect(months.at(0).text()).to.eq("Jun"); + expect(months.length).toBe(1); + expect(months.at(0).text()).toBe("Jun"); }); }); @@ -461,16 +453,16 @@ describe("Month", () => { selectingDate={utils.newDate("2015-04-01")} selectsStart showQuarterYearPicker - /> + />, ); const quarters = monthComponent.find( - ".react-datepicker__quarter-text--in-selecting-range" + ".react-datepicker__quarter-text--in-selecting-range", ); - expect(quarters.length).to.equal(2); - expect(quarters.at(0).text()).to.eq("Q2"); - expect(quarters.at(1).text()).to.eq("Q3"); + expect(quarters.length).toBe(2); + expect(quarters.at(0).text()).toBe("Q2"); + expect(quarters.at(1).text()).toBe("Q3"); }); it("should add in-selecting-range class if quarter is between the start date and selecting date", () => { @@ -482,15 +474,15 @@ describe("Month", () => { selectingDate={utils.newDate("2015-07-01")} selectsEnd showQuarterYearPicker - /> + />, ); const quarters = monthComponent.find( - ".react-datepicker__quarter-text--in-selecting-range" + ".react-datepicker__quarter-text--in-selecting-range", ); - expect(quarters.length).to.equal(2); - expect(quarters.at(0).text()).to.eq("Q2"); - expect(quarters.at(1).text()).to.eq("Q3"); + expect(quarters.length).toBe(2); + expect(quarters.at(0).text()).toBe("Q2"); + expect(quarters.at(1).text()).toBe("Q3"); }); it("should use pre selection date if selecting date is not defined", () => { @@ -501,15 +493,15 @@ describe("Month", () => { startDate={utils.newDate("2015-04-01")} selectsEnd showQuarterYearPicker - /> + />, ); const quarters = monthComponent.find( - ".react-datepicker__quarter-text--in-selecting-range" + ".react-datepicker__quarter-text--in-selecting-range", ); - expect(quarters.length).to.equal(2); - expect(quarters.at(0).text()).to.eq("Q2"); - expect(quarters.at(1).text()).to.eq("Q3"); + expect(quarters.length).toBe(2); + expect(quarters.at(0).text()).toBe("Q2"); + expect(quarters.at(1).text()).toBe("Q3"); }); it("should add in-selecting-range class for one quarter picker if quarter is between the start date and selecting date", () => { @@ -521,15 +513,15 @@ describe("Month", () => { selectingDate={utils.newDate("2015-07-01")} selectsRange showQuarterYearPicker - /> + />, ); const quarters = monthComponent.find( - ".react-datepicker__quarter-text--in-selecting-range" + ".react-datepicker__quarter-text--in-selecting-range", ); - expect(quarters.length).to.equal(2); - expect(quarters.at(0).text()).to.eq("Q2"); - expect(quarters.at(1).text()).to.eq("Q3"); + expect(quarters.length).toBe(2); + expect(quarters.at(0).text()).toBe("Q2"); + expect(quarters.at(1).text()).toBe("Q3"); }); it("should not add in-selecting-range class for one quarter picker if the start date is not defined", () => { @@ -540,13 +532,13 @@ describe("Month", () => { selectingDate={utils.newDate("2015-04-01")} selectsRange showQuarterYearPicker - /> + />, ); const quarters = monthComponent.find( - ".react-datepicker__quarter-text--in-selecting-range" + ".react-datepicker__quarter-text--in-selecting-range", ); - expect(quarters.length).to.equal(0); + expect(quarters.length).toBe(0); }); it("should not add in-selecting-range class for one quarter picker if the end date is defined", () => { @@ -558,13 +550,13 @@ describe("Month", () => { endDate={utils.newDate("2015-07-01")} selectsRange showQuarterYearPicker - /> + />, ); const quarters = monthComponent.find( - ".react-datepicker__quarter-text--in-selecting-range" + ".react-datepicker__quarter-text--in-selecting-range", ); - expect(quarters.length).to.equal(0); + expect(quarters.length).toBe(0); }); }); @@ -579,19 +571,19 @@ describe("Month", () => { selected={utils.newDate("2015-02-01")} preSelection={utils.newDate("2015-03-01")} showMonthYearPicker - /> + />, ); month = monthComponent.find(".react-datepicker__month-text").at(1); }); it("should return selected class", () => { - expect(month.hasClass("react-datepicker__month-text--selected")).to.equal( - true + expect(month.hasClass("react-datepicker__month-text--selected")).toBe( + true, ); }); it('should set aria-selected attribute to "true"', () => { - expect(month.getDOMNode().getAttribute("aria-selected")).to.equal("true"); + expect(month.getDOMNode().getAttribute("aria-selected")).toBe("true"); }); it("should have no axe violations", () => @@ -607,21 +599,19 @@ describe("Month", () => { day={utils.newDate("2015-02-01")} selected={utils.newDate("2015-02-01")} showMonthYearPicker - /> + />, ); month = monthComponent.find(".react-datepicker__month-text").at(0); }); it("should not have the selected class", () => { - expect(month.hasClass("react-datepicker__month-text--selected")).to.equal( - false + expect(month.hasClass("react-datepicker__month-text--selected")).toBe( + false, ); }); it('should set aria-selected attribute to "false"', () => { - expect(month.getDOMNode().getAttribute("aria-selected")).to.equal( - "false" - ); + expect(month.getDOMNode().getAttribute("aria-selected")).toBe("false"); }); }); @@ -632,65 +622,63 @@ describe("Month", () => { startDate={utils.newDate("2015-01-01")} endDate={utils.newDate("2015-08-01")} showMonthYearPicker - /> + />, ); const month = monthComponent.find(".react-datepicker__month-text").at(2); - expect(month.hasClass("react-datepicker__month-text--in-range")).to.equal( - true - ); + expect(month.hasClass("react-datepicker__month-text--in-range")).toBe(true); }); it("should return month-text--today class if month is current year's month", () => { const date = new Date(); const monthComponent = mount( - + , ); const month = monthComponent .find(".react-datepicker__month-text--today") .at(0) .text(); - expect(month).to.equal(utils.getMonthShortInLocale(date.getMonth())); + expect(month).toBe(utils.getMonthShortInLocale(date.getMonth())); }); it("should not return month-text--today class if month is not current year's month", () => { const lastYearDate = new Date(); lastYearDate.setFullYear(lastYearDate.getFullYear() - 1); const monthComponent = mount( - + , ); const months = monthComponent.find(".react-datepicker__month-text--today"); - expect(months).to.have.length(0); + expect(months).toHaveLength(0); }); it("should include aria-current property if month is current year's month", () => { const date = new Date(); const monthComponent = mount( - + , ); const ariaCurrent = monthComponent .find(".react-datepicker__month-text--today") .prop("aria-current"); - expect(ariaCurrent).to.equal("date"); + expect(ariaCurrent).toBe("date"); }); it("should not include aria-current property if month is not current year's month", () => { const lastYearDate = new Date(); lastYearDate.setFullYear(lastYearDate.getFullYear() - 1); const monthComponent = mount( - + , ); const ariaCurrent = monthComponent .find(".react-datepicker__month-text") .at(0) .prop("aria-current"); - expect(ariaCurrent).to.be.undefined; + expect(ariaCurrent).toBeUndefined(); }); it("should have the quarter picker CSS class", () => { const month = shallow( - + , ); - expect(month.hasClass("react-datepicker__quarterPicker")).to.equal(true); + expect(month.hasClass("react-datepicker__quarterPicker")).toBe(true); }); it("should call the provided onQuarterClick function", () => { @@ -702,13 +690,13 @@ describe("Month", () => { const monthStart = utils.newDate("2015-12-01"); const monthComponent = mount( - + , ); const quarter = monthComponent .find(".react-datepicker__quarter-text") .at(3); quarter.simulate("click"); - expect(utils.getQuarter(quarterClicked)).to.be.equal(4); + expect(utils.getQuarter(quarterClicked)).toBe(4); }); it("should return disabled class if current date is out of bound of minDate and maxdate", () => { @@ -718,14 +706,14 @@ describe("Month", () => { minDate={utils.newDate("2016-02-01")} maxDate={utils.newDate()} showQuarterYearPicker - /> + />, ); const quarter = monthComponent .find(".react-datepicker__quarter-text") .at(0); - expect( - quarter.hasClass("react-datepicker__quarter-text--disabled") - ).to.equal(true); + expect(quarter.hasClass("react-datepicker__quarter-text--disabled")).toBe( + true, + ); }); describe("if quarter is selected", () => { @@ -739,21 +727,19 @@ describe("Month", () => { selected={utils.newDate("2015-02-01")} preSelection={utils.newDate("2015-05-01")} showQuarterYearPicker - /> + />, ); quarter = monthComponent.find(".react-datepicker__quarter-text").at(0); }); it("should return selected class", () => { - expect( - quarter.hasClass("react-datepicker__quarter-text--selected") - ).to.equal(true); + expect(quarter.hasClass("react-datepicker__quarter-text--selected")).toBe( + true, + ); }); it('should set aria-selected attribute to "true"', () => { - expect(quarter.getDOMNode().getAttribute("aria-selected")).to.equal( - "true" - ); + expect(quarter.getDOMNode().getAttribute("aria-selected")).toBe("true"); }); it("should have no axe violations", () => @@ -769,21 +755,19 @@ describe("Month", () => { day={utils.newDate("2015-02-01")} selected={utils.newDate("2015-02-01")} showQuarterYearPicker - /> + />, ); quarter = monthComponent.find(".react-datepicker__quarter-text").at(1); }); it("should not return selected class", () => { - expect( - quarter.hasClass("react-datepicker__quarter-text--selected") - ).to.equal(false); + expect(quarter.hasClass("react-datepicker__quarter-text--selected")).toBe( + false, + ); }); it('should set aria-selected attribute to "false"', () => { - expect(quarter.getDOMNode().getAttribute("aria-selected")).to.equal( - "false" - ); + expect(quarter.getDOMNode().getAttribute("aria-selected")).toBe("false"); }); }); @@ -794,14 +778,14 @@ describe("Month", () => { startDate={utils.newDate("2015-01-01")} endDate={utils.newDate("2015-08-01")} showQuarterYearPicker - /> + />, ); const quarter = monthComponent .find(".react-datepicker__quarter-text") .at(2); - expect( - quarter.hasClass("react-datepicker__quarter-text--in-range") - ).to.equal(true); + expect(quarter.hasClass("react-datepicker__quarter-text--in-range")).toBe( + true, + ); }); it("should enable keyboard focus on the preselected component", () => { @@ -812,10 +796,10 @@ describe("Month", () => { startDate={utils.newDate("2015-01-01")} endDate={utils.newDate("2015-08-01")} showQuarterYearPicker - /> + />, ); const quarter = monthComponent.find(".react-datepicker__quarter-1"); - expect(quarter.prop("tabIndex")).to.equal("0"); + expect(quarter.prop("tabIndex")).toBe("0"); }); it("should render full month name", () => { @@ -824,20 +808,20 @@ describe("Month", () => { day={utils.newDate("2015-12-01")} showMonthYearPicker showFullMonthYearPicker - /> + />, ); const month = monthComponent.find(".react-datepicker__month-1").at(0); - expect(month.text()).to.equal("February"); + expect(month.text()).toBe("February"); }); it("should render short month name", () => { const monthComponent = mount( - + , ); const month = monthComponent.find(".react-datepicker__month-1").at(0); - expect(month.text()).to.equal("Feb"); + expect(month.text()).toBe("Feb"); }); describe("custom renders", () => { @@ -850,10 +834,10 @@ describe("Month", () => { day={utils.newDate()} renderMonthContent={renderMonthContent} showMonthYearPicker - /> + />, ); const month = monthComponent.find(".react-datepicker__month-text").at(0); - expect(month.find("span").at(0).text()).to.equal("custom render"); + expect(month.find("span").at(0).text()).toBe("custom render"); }); it("should render custom quarter content", () => { @@ -865,12 +849,12 @@ describe("Month", () => { day={utils.newDate()} renderQuarterContent={renderQuarterContent} showQuarterYearPicker - /> + />, ); const quarter = monthComponent .find(".react-datepicker__quarter-text") .at(0); - expect(quarter.find("span").at(0).text()).to.equal("custom render"); + expect(quarter.find("span").at(0).text()).toBe("custom render"); }); }); @@ -897,8 +881,8 @@ describe("Month", () => { .find(".react-datepicker__quarter-2") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-07-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-07-01").toString(), ); }); @@ -920,17 +904,21 @@ describe("Month", () => { .find(".react-datepicker__quarter-2") .simulate("keydown", getKey("ArrowLeft")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-01-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-01-01").toString(), ); }); }); describe("Keyboard navigation", () => { - context("monthsFourColumns", () => { + describe("monthsFourColumns", () => { const renderMonth = (props) => mount( - + , ); it("should trigger setPreSelection and set March as pre-selected on arrowRight", () => { @@ -952,8 +940,8 @@ describe("Month", () => { .find(".react-datepicker__month-1") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-03-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-03-01").toString(), ); }); @@ -972,8 +960,8 @@ describe("Month", () => { .find(".react-datepicker__month-1") .simulate("keydown", getKey("ArrowLeft")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-01-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-01-01").toString(), ); }); @@ -994,8 +982,8 @@ describe("Month", () => { .find(".react-datepicker__month-7") .simulate("keydown", getKey("ArrowUp")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-04-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-04-01").toString(), ); }); @@ -1016,8 +1004,8 @@ describe("Month", () => { .find(".react-datepicker__month-7") .simulate("keydown", getKey("ArrowDown")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-12-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-12-01").toString(), ); }); @@ -1037,8 +1025,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-11") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2016-01-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2016-01-01").toString(), ); }); @@ -1058,8 +1046,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-0") .simulate("keydown", getKey("ArrowLeft")); - expect(preSelected.toString()).to.equal( - utils.newDate("2014-12-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2014-12-01").toString(), ); }); @@ -1079,8 +1067,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-1") .simulate("keydown", getKey("ArrowUp")); - expect(preSelected.toString()).to.equal( - utils.newDate("2014-10-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2014-10-01").toString(), ); }); @@ -1100,12 +1088,12 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-10") .simulate("keydown", getKey("ArrowDown")); - expect(preSelected.toString()).to.equal( - utils.newDate("2016-03-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2016-03-01").toString(), ); }); }); - context("monthsThreeColumns", () => { + describe("monthsThreeColumns", () => { const renderMonth = (props) => mount(); @@ -1128,8 +1116,8 @@ describe("Month", () => { .find(".react-datepicker__month-1") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-03-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-03-01").toString(), ); }); @@ -1148,8 +1136,8 @@ describe("Month", () => { .find(".react-datepicker__month-1") .simulate("keydown", getKey("ArrowLeft")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-01-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-01-01").toString(), ); }); @@ -1170,8 +1158,8 @@ describe("Month", () => { .find(".react-datepicker__month-7") .simulate("keydown", getKey("ArrowUp")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-05-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-05-01").toString(), ); }); @@ -1192,8 +1180,8 @@ describe("Month", () => { .find(".react-datepicker__month-7") .simulate("keydown", getKey("ArrowDown")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-11-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-11-01").toString(), ); }); @@ -1213,8 +1201,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-11") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2016-01-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2016-01-01").toString(), ); }); @@ -1234,8 +1222,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-0") .simulate("keydown", getKey("ArrowLeft")); - expect(preSelected.toString()).to.equal( - utils.newDate("2014-12-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2014-12-01").toString(), ); }); @@ -1255,8 +1243,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-1") .simulate("keydown", getKey("ArrowUp")); - expect(preSelected.toString()).to.equal( - utils.newDate("2014-11-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2014-11-01").toString(), ); }); @@ -1276,15 +1264,15 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-10") .simulate("keydown", getKey("ArrowDown")); - expect(preSelected.toString()).to.equal( - utils.newDate("2016-02-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2016-02-01").toString(), ); }); }); - context("monthsTwoColumns", () => { + describe("monthsTwoColumns", () => { const renderMonth = (props) => mount( - + , ); it("should trigger setPreSelection and set March as pre-selected on arrowRight", () => { @@ -1306,8 +1294,8 @@ describe("Month", () => { .find(".react-datepicker__month-1") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-03-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-03-01").toString(), ); }); @@ -1326,8 +1314,8 @@ describe("Month", () => { .find(".react-datepicker__month-1") .simulate("keydown", getKey("ArrowLeft")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-01-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-01-01").toString(), ); }); @@ -1348,8 +1336,8 @@ describe("Month", () => { .find(".react-datepicker__month-7") .simulate("keydown", getKey("ArrowUp")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-06-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-06-01").toString(), ); }); @@ -1370,8 +1358,8 @@ describe("Month", () => { .find(".react-datepicker__month-7") .simulate("keydown", getKey("ArrowDown")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-10-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-10-01").toString(), ); }); @@ -1391,8 +1379,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-11") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2016-01-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2016-01-01").toString(), ); }); @@ -1412,8 +1400,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-0") .simulate("keydown", getKey("ArrowLeft")); - expect(preSelected.toString()).to.equal( - utils.newDate("2014-12-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2014-12-01").toString(), ); }); @@ -1433,8 +1421,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-0") .simulate("keydown", getKey("ArrowUp")); - expect(preSelected.toString()).to.equal( - utils.newDate("2014-11-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2014-11-01").toString(), ); }); @@ -1454,8 +1442,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-10") .simulate("keydown", getKey("ArrowDown")); - expect(preSelected.toString()).to.equal( - utils.newDate("2016-01-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2016-01-01").toString(), ); }); }); @@ -1488,9 +1476,9 @@ describe("Month", () => { .find(".react-datepicker__month-2") .simulate("keydown", getKey("Enter")); - expect(preSelected).to.equal(true); - expect(selectedDate.toString()).to.equal( - utils.newDate("2015-03-01").toString() + expect(preSelected).toBe(true); + expect(selectedDate.toString()).toBe( + utils.newDate("2015-03-01").toString(), ); }); @@ -1512,8 +1500,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-7") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-08-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-08-01").toString(), ); }); @@ -1534,8 +1522,8 @@ describe("Month", () => { monthComponent .find(".react-datepicker__month-7") .simulate("keydown", getKey("ArrowRight")); - expect(preSelected.toString()).to.equal( - utils.newDate("2015-08-01").toString() + expect(preSelected.toString()).toBe( + utils.newDate("2015-08-01").toString(), ); }); @@ -1553,10 +1541,8 @@ describe("Month", () => { const disabled = monthComponent.find(".react-datepicker__month-0").at(0); - expect(enabled.prop("aria-label")).to.equal("Choose May 2015"); - expect(disabled.prop("aria-label")).to.equal( - "Not available January 2015" - ); + expect(enabled.prop("aria-label")).toBe("Choose May 2015"); + expect(disabled.prop("aria-label")).toBe("Not available January 2015"); }); it("should have custom label for month", () => { @@ -1575,9 +1561,9 @@ describe("Month", () => { const disabled = monthComponent.find(".react-datepicker__month-0").at(0); - expect(enabled.prop("aria-label")).to.equal("Select this May 2015"); - expect(disabled.prop("aria-label")).to.equal( - `Can't select this January 2015` + expect(enabled.prop("aria-label")).toBe("Select this May 2015"); + expect(disabled.prop("aria-label")).toBe( + `Can't select this January 2015`, ); }); }); @@ -1603,8 +1589,8 @@ describe("Month", () => { expect( monthComponent .find(".react-datepicker__month-text--selected") - .hasClass("react-datepicker__month-text--keyboard-selected") - ).to.equal(false); + .hasClass("react-datepicker__month-text--keyboard-selected"), + ).toBe(false); }); }); }); diff --git a/test/month_year_dropdown_test.js b/test/month_year_dropdown_test.test.js similarity index 82% rename from test/month_year_dropdown_test.js rename to test/month_year_dropdown_test.test.js index ab659de61..92a1a5075 100644 --- a/test/month_year_dropdown_test.js +++ b/test/month_year_dropdown_test.test.js @@ -9,7 +9,7 @@ import { formatDate, isAfter, registerLocale, -} from "../src/date_utils"; +} from "../src/date_utils.js"; import fi from "date-fns/locale/fi"; describe("MonthYearDropdown", () => { @@ -18,7 +18,6 @@ describe("MonthYearDropdown", () => { const mockHandleChange = function (changeInput) { handleChangeResult = changeInput; }; - let sandbox; function getMonthYearDropdown(overrideProps) { const dateFormatCalendar = "LLLL yyyy"; @@ -35,29 +34,24 @@ describe("MonthYearDropdown", () => { maxDate={maxDate} onChange={mockHandleChange} {...overrideProps} - /> + />, ); } beforeEach(() => { handleChangeResult = null; - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); }); describe("scroll mode", () => { let selectedDate; - beforeEach(function () { + beforeEach(() => { selectedDate = newDate("2018-01"); monthYearDropdown = getMonthYearDropdown({ date: selectedDate }); }); it("shows the selected month year in the initial view", () => { const selected_month_year_name = formatDate(selectedDate, "LLLL yyyy"); - expect(monthYearDropdown.text()).to.contain(selected_month_year_name); + expect(monthYearDropdown.text()).toContain(selected_month_year_name); }); it("opens a list when read view is clicked", () => { @@ -65,7 +59,7 @@ describe("MonthYearDropdown", () => { .find(".react-datepicker__month-year-read-view") .simulate("click"); var optionsView = monthYearDropdown.find(MonthYearDropdownOptions); - expect(optionsView).to.exist; + expect(optionsView).toBeDefined(); }); it("closes the dropdown when a month year is clicked", () => { @@ -76,28 +70,26 @@ describe("MonthYearDropdown", () => { .find(".react-datepicker__month-year-option") .at(1) .simulate("click"); - expect(monthYearDropdown.find(MonthYearDropdownOptions)).to.have.length( - 0 - ); + expect(monthYearDropdown.find(MonthYearDropdownOptions)).toHaveLength(0); }); it("closes the dropdown if outside is clicked", () => { const date = newDate(); const dateFormatCalendar = "LLLL yyyy"; - const onCancelSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); const monthYearDropdownOptionsInstance = mount( + />, ).instance(); monthYearDropdownOptionsInstance.handleClickOutside(); - expect(onCancelSpy.calledOnce).to.be.true; + expect(onCancelSpy).toHaveBeenCalledTimes(1); }); it("does not call the supplied onChange function when the same month year is clicked", () => { @@ -108,7 +100,7 @@ describe("MonthYearDropdown", () => { monthYearDropdown .find(".react-datepicker__month-year-option--selected_month-year") .simulate("click"); - expect(handleChangeResult).to.be.null; + expect(handleChangeResult).toBeNull(); }); it("adds aria-selected to selected option", () => { @@ -120,7 +112,7 @@ describe("MonthYearDropdown", () => { .find(".react-datepicker__month-year-option--selected_month-year") .prop("aria-selected"); - expect(ariaSelected).to.equal("true"); + expect(ariaSelected).toBe("true"); }); it("does not add aria-selected to non-selected option", () => { @@ -133,7 +125,7 @@ describe("MonthYearDropdown", () => { .at(0) .prop("aria-selected"); - expect(ariaSelected).to.be.undefined; + expect(ariaSelected).toBeUndefined(); }); it("calls the supplied onChange function when a different month year is clicked", () => { @@ -147,7 +139,7 @@ describe("MonthYearDropdown", () => { .find(".react-datepicker__month-year-option") .at(5) .simulate("click"); - expect(handleChangeResult.toString()).to.eq(expected_date.toString()); + expect(handleChangeResult.toString()).toBe(expected_date.toString()); }); it("should use dateFormat to display date in dropdown", () => { @@ -156,29 +148,29 @@ describe("MonthYearDropdown", () => { dateFormat: "LLLL yyyy", }); - expect(dropdownDateFormat.text()).to.eq("January 2018"); + expect(dropdownDateFormat.text()).toBe("January 2018"); dropdownDateFormat = getMonthYearDropdown({ locale: "fi" }); - expect(dropdownDateFormat.text()).to.eq("tammikuu 2018"); + expect(dropdownDateFormat.text()).toBe("tammikuu 2018"); dropdownDateFormat = getMonthYearDropdown({ locale: "fi", showMonthYearDropdown: true, }); - expect(dropdownDateFormat.text()).to.eq("tammikuu 2018"); + expect(dropdownDateFormat.text()).toBe("tammikuu 2018"); dropdownDateFormat = getMonthYearDropdown({ dateFormat: "yyyy LLL", locale: "fi", }); - expect(dropdownDateFormat.text()).to.eq("2018 tammi"); + expect(dropdownDateFormat.text()).toBe("2018 tammi"); dropdownDateFormat = getMonthYearDropdown({ dateFormat: "yyyy LLL", locale: "fi", showMonthYearDropdown: true, }); - expect(dropdownDateFormat.text()).to.eq("2018 tammi"); + expect(dropdownDateFormat.text()).toBe("2018 tammi"); }); }); @@ -198,19 +190,19 @@ describe("MonthYearDropdown", () => { monthYearDropdown = getMonthYearDropdown({ dropdownMode: "select" }); var select = monthYearDropdown.find( - ".react-datepicker__month-year-select" + ".react-datepicker__month-year-select", ); - expect(select).to.have.length(1); - expect(select.prop("value")).to.eq(expected_date.valueOf()); + expect(select).toHaveLength(1); + expect(select.prop("value")).toBe(expected_date.valueOf()); var options = select.find("option"); - expect(options.map((o) => o.prop("value"))).to.eql(expected_values); + expect(options.map((o) => o.prop("value"))).toEqual(expected_values); }); it("renders month options with default locale", () => { monthYearDropdown = getMonthYearDropdown({ dropdownMode: "select" }); var options = monthYearDropdown.find("option"); - expect(options.map((o) => o.text())).to.eql([ + expect(options.map((o) => o.text())).toEqual([ "July 2017", "August 2017", "September 2017", @@ -233,7 +225,7 @@ describe("MonthYearDropdown", () => { locale: "fi", }); var options = monthYearDropdown.find("option"); - expect(options.map((o) => o.text())).to.eql([ + expect(options.map((o) => o.text())).toEqual([ "heinäkuu 2017", "elokuu 2017", "syyskuu 2017", @@ -256,10 +248,10 @@ describe("MonthYearDropdown", () => { date: selectedMonth, }); var select = monthYearDropdown.find( - ".react-datepicker__month-year-select" + ".react-datepicker__month-year-select", ); select.simulate("change", { target: { value: selectedMonth.valueOf() } }); - expect(handleChangeResult).to.not.exist; + expect(handleChangeResult).toBeFalsy(); }); it("calls the supplied onChange function when a different month is clicked", () => { @@ -270,10 +262,10 @@ describe("MonthYearDropdown", () => { month: selectedMonth, }); var select = monthYearDropdown.find( - ".react-datepicker__month-year-select" + ".react-datepicker__month-year-select", ); select.simulate("change", { target: { value: monthToClick.valueOf() } }); - expect(handleChangeResult.valueOf()).to.equal(monthToClick.valueOf()); + expect(handleChangeResult.valueOf()).toBe(monthToClick.valueOf()); }); }); }); diff --git a/test/multi_month_test.js b/test/multi_month_test.test.js similarity index 88% rename from test/multi_month_test.js rename to test/multi_month_test.test.js index 0bfdf7361..3590e0e43 100644 --- a/test/multi_month_test.js +++ b/test/multi_month_test.test.js @@ -17,26 +17,26 @@ describe("Multi month calendar", function () { hideCalendar={() => {}} dropdownMode="scroll" {...extraProps} - /> + />, ); } it("should render multiple months if the months property is present", () => { var calendar = getCalendar({ monthsShown: 2 }); var months = calendar.find(Month); - expect(months).to.have.length(2); + expect(months).toHaveLength(2); }); it("should render dropdown only on first month", () => { var calendar = getCalendar({ monthsShown: 2, showYearDropdown: true }); var datepickers = calendar.find(YearDropdown); - expect(datepickers).to.have.length(1); + expect(datepickers).toHaveLength(1); }); it("should render previous months", () => { var calendar = getCalendar({ monthsShown: 2, showPreviousMonths: true }); var monthDate = calendar.find(Month).first().prop("day"); var previousMonth = utils.subMonths(utils.newDate(), 1); - expect(utils.isSameMonth(previousMonth, monthDate)).to.be.true; + expect(utils.isSameMonth(previousMonth, monthDate)).toBe(true); }); }); diff --git a/test/run_axe.js b/test/run_axe.js index 21065c6f3..c79a1adfe 100644 --- a/test/run_axe.js +++ b/test/run_axe.js @@ -8,7 +8,7 @@ export function runAxe(domNode) { return axe .run(domNode) .then(({ violations }) => { - assert(violations.length === 0, JSON.stringify(violations, null, 2)); + expect(violations).toHaveLength(0); }) .finally(() => wrapper.removeChild(domNode)); } diff --git a/test/show_time_test.js b/test/show_time_test.test.js similarity index 76% rename from test/show_time_test.js rename to test/show_time_test.test.js index e09728858..7ee07b5a1 100644 --- a/test/show_time_test.js +++ b/test/show_time_test.test.js @@ -1,59 +1,49 @@ import React from "react"; import { mount } from "enzyme"; import DatePicker from "../src/index.jsx"; -import TimeComponent from "../src/time"; +import TimeComponent from "../src/time.jsx"; describe("DatePicker", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - it("should show time component when showTimeSelect prop is present", () => { var datePicker = mount(); var timeComponent = datePicker.find(TimeComponent); - expect(timeComponent).to.exist; + expect(timeComponent).not.toBeNull(); }); it("should have custom time caption", () => { const timeComponent = mount(); const caption = timeComponent.find(".react-datepicker-time__header"); - expect(caption.text()).to.equal("Custom time"); + expect(caption.text()).toEqual("Custom time"); }); describe("Time Select Only", () => { let datePicker; - before(() => { + beforeEach(() => { datePicker = mount( - + , ); datePicker.find("input").simulate("click"); }); it("should not show month container when showTimeSelectOnly prop is present", () => { var elem = datePicker.find(".react-datepicker__month-container"); - expect(elem).to.have.length(0); + expect(elem).toHaveLength(0); }); it("should not show previous month button when showTimeSelectOnly prop is present", () => { var elem = datePicker.find(".react-datepicker__navigation--previous"); - expect(elem).to.have.length(0); + expect(elem).toHaveLength(0); }); it("should not show next month button when showTimeSelectOnly prop is present", () => { var elem = datePicker.find(".react-datepicker__navigation--next"); - expect(elem).to.have.length(0); + expect(elem).toHaveLength(0); }); it("should not show today button when showTimeSelectOnly prop is present", () => { var elem = datePicker.find(".react-datepicker__today-button"); - expect(elem).to.have.length(0); + expect(elem).toHaveLength(0); }); }); }); diff --git a/test/text_encoder.js b/test/text_encoder.js new file mode 100644 index 000000000..8332d4327 --- /dev/null +++ b/test/text_encoder.js @@ -0,0 +1,2 @@ +const { TextEncoder } = require("util"); +global.TextEncoder = TextEncoder; diff --git a/test/time_format_test.js b/test/time_format_test.test.js similarity index 69% rename from test/time_format_test.js rename to test/time_format_test.test.js index e7a4e612a..e9ddd36f6 100644 --- a/test/time_format_test.js +++ b/test/time_format_test.test.js @@ -7,66 +7,65 @@ import ptBR from "date-fns/locale/pt-BR"; describe("TimeComponent", () => { utils.registerLocale("pt-BR", ptBR); - let sandbox; - beforeEach(() => { - sandbox = sinon.createSandbox(); - // mock global time to June 14, 1990 13:28:12, so test results will be constant - sandbox.useFakeTimers({ - now: new Date("1990-06-14 13:28").valueOf(), - toFake: ["Date"], - }); + // sandbox = sinon.createSandbox(); + // // mock global time to June 14, 1990 13:28:12, so test results will be constant + // sandbox.useFakeTimers({ + // now: new Date("1990-06-14 13:28").valueOf(), + // toFake: ["Date"], + // }); + jest.useFakeTimers().setSystemTime(new Date("1990-06-14 13:28")); }); afterEach(() => { - sandbox.restore(); + jest.restoreAllMocks(); }); describe("Format", () => { let spy; beforeEach(() => { - spy = sandbox.spy(TimeComponent, "calcCenterPosition"); + spy = jest.spyOn(TimeComponent, "calcCenterPosition"); }); it("should forward the time format provided in timeFormat props", () => { var timeComponent = mount(); var timeListItem = timeComponent.find( - ".react-datepicker__time-list-item" + ".react-datepicker__time-list-item", ); - expect(timeListItem.at(0).text()).to.eq("00:00"); + expect(timeListItem.at(0).text()).toBe("00:00"); }); it("should format the time based on the default locale (en-US)", () => { mount(); - expect(spy.args[0][1].innerHTML).to.eq("1:00 PM"); + expect(spy.mock.calls[0][1].innerHTML).toBe("1:00 PM"); }); it("should format the time based on the pt-BR locale", () => { mount(); - expect(spy.args[0][1].innerHTML).to.eq("13:00"); + expect(spy.mock.calls[0][1].innerHTML).toBe("13:00"); }); }); describe("Initial position", () => { let spy; beforeEach(() => { - spy = sandbox.spy(TimeComponent, "calcCenterPosition"); + spy = jest.spyOn(TimeComponent, "calcCenterPosition"); }); it("should call calcCenterPosition once", () => { mount(); - expect(spy.calledOnce).to.eq(true); + expect(spy).toHaveBeenCalled(); }); it("should call calcCenterPosition with centerLi ref, closest to the current time", () => { mount(); - expect(spy.args[0][1].innerHTML).to.eq("13:00"); + expect(spy.mock.calls[0][1].innerHTML).toBe("13:00"); }); it("with five minute time interval, should call calcCenterPosition with centerLi ref, closest to the current time", () => { mount(); - expect(spy.args[0][1].innerHTML).to.eq("13:25"); + expect(spy.mock.calls[0][1].innerHTML).toBe("13:25"); }); it("should call calcCenterPosition with centerLi ref, closest to the selected time", () => { @@ -75,9 +74,9 @@ describe("TimeComponent", () => { format="HH:mm" selected={new Date("1990-06-14 08:11")} openToDate={new Date("1990-06-14 09:11")} - /> + />, ); - expect(spy.args[0][1].innerHTML).to.eq("08:00"); + expect(spy.mock.calls[0][1].innerHTML).toBe("08:00"); }); it("should call calcCenterPosition with centerLi ref, which is selected", () => { @@ -86,13 +85,13 @@ describe("TimeComponent", () => { format="HH:mm" selected={new Date("1990-06-14 08:00")} openToDate={new Date("1990-06-14 09:00")} - /> + />, ); expect( - spy.args[0][1].classList.contains( - "react-datepicker__time-list-item--selected" - ) - ).to.be.true; + spy.mock.calls[0][1].classList.contains( + "react-datepicker__time-list-item--selected", + ), + ).toBe(true); }); it("should add the aria-selected property to the selected item", () => { @@ -101,13 +100,13 @@ describe("TimeComponent", () => { format="HH:mm" selected={new Date("1990-06-14 08:00")} openToDate={new Date("1990-06-14 09:00")} - /> + />, ); var timeListItem = timeComponent.find( - ".react-datepicker__time-list-item--selected" + ".react-datepicker__time-list-item--selected", ); - expect(timeListItem.at(0).prop("aria-selected")).to.eq("true"); + expect(timeListItem.at(0).prop("aria-selected")).toBe("true"); }); it("should enable keyboard focus on the selected item", () => { @@ -116,13 +115,13 @@ describe("TimeComponent", () => { format="HH:mm" selected={new Date("1990-06-14 08:00")} openToDate={new Date("1990-06-14 09:00")} - /> + />, ); var timeListItem = timeComponent.find( - ".react-datepicker__time-list-item--selected" + ".react-datepicker__time-list-item--selected", ); - expect(timeListItem.at(0).prop("tabIndex")).to.equal("0"); + expect(timeListItem.at(0).prop("tabIndex")).toBe("0"); }); it("should not add the aria-selected property to a regular item", () => { @@ -131,13 +130,13 @@ describe("TimeComponent", () => { format="HH:mm" selected={new Date("1990-06-14 08:00")} openToDate={new Date("1990-06-14 09:00")} - /> + />, ); var timeListItem = timeComponent.find( - ".react-datepicker__time-list-item" + ".react-datepicker__time-list-item", ); - expect(timeListItem.at(0).prop("aria-selected")).to.be.undefined; + expect(timeListItem.at(0).prop("aria-selected")).toBeUndefined(); }); it("should disable keyboard focus on a regular item", () => { @@ -146,13 +145,13 @@ describe("TimeComponent", () => { format="HH:mm" selected={new Date("1990-06-14 08:00")} openToDate={new Date("1990-06-14 09:00")} - /> + />, ); var timeListItem = timeComponent.find( - ".react-datepicker__time-list-item" + ".react-datepicker__time-list-item", ); - expect(timeListItem.at(0).prop("tabIndex")).to.equal("-1"); + expect(timeListItem.at(0).prop("tabIndex")).toBe("-1"); }); it("when no selected time, should focus the time closest to the opened time", () => { @@ -160,17 +159,17 @@ describe("TimeComponent", () => { + />, ); var timeListItem = timeComponent.find( - ".react-datepicker__time-list-item" + ".react-datepicker__time-list-item", ); expect( timeListItem .findWhere((node) => node.type() && node.text() === "09:00") - .prop("tabIndex") - ).to.equal("0"); + .prop("tabIndex"), + ).toBe("0"); }); it("when no selected time, should call calcCenterPosition with centerLi ref, closest to the opened time", () => { @@ -178,9 +177,9 @@ describe("TimeComponent", () => { + />, ); - expect(spy.args[0][1].innerHTML).to.eq("09:00"); + expect(spy.mock.calls[0][1].innerHTML).toBe("09:00"); }); it("when no selected time, should call calcCenterPosition with centerLi ref, and no time should be selected", () => { @@ -188,13 +187,13 @@ describe("TimeComponent", () => { + />, ); expect( - spy.args[0][1].classList.contains( - "react-datepicker__time-list-item--selected" - ) - ).to.be.false; + spy.mock.calls[0][1].classList.contains( + "react-datepicker__time-list-item--selected", + ), + ).toBe(false); }); it("should calculate scroll for the first item of 4 (even) items list", () => { @@ -202,8 +201,8 @@ describe("TimeComponent", () => { TimeComponent.calcCenterPosition(200, { offsetTop: 0, clientHeight: 50, - }) - ).to.be.eq(-75); + }), + ).toBe(-75); }); it("should calculate scroll for the last item of 4 (even) items list", () => { @@ -211,14 +210,17 @@ describe("TimeComponent", () => { TimeComponent.calcCenterPosition(200, { offsetTop: 150, clientHeight: 50, - }) - ).to.be.eq(75); + }), + ).toBe(75); }); it("should calculate scroll for the first item of 3 (odd) items list", () => { expect( - TimeComponent.calcCenterPosition(90, { offsetTop: 0, clientHeight: 30 }) - ).to.be.eq(-30); + TimeComponent.calcCenterPosition(90, { + offsetTop: 0, + clientHeight: 30, + }), + ).toBe(-30); }); it("should calculate scroll for the last item of 3 (odd) items list", () => { @@ -226,8 +228,8 @@ describe("TimeComponent", () => { TimeComponent.calcCenterPosition(90, { offsetTop: 60, clientHeight: 30, - }) - ).to.be.eq(30); + }), + ).toBe(30); }); }); }); diff --git a/test/time_input_test.js b/test/time_input_test.test.js similarity index 55% rename from test/time_input_test.js rename to test/time_input_test.test.js index 1b706e481..ee3c73cff 100644 --- a/test/time_input_test.js +++ b/test/time_input_test.test.js @@ -1,99 +1,72 @@ import React from "react"; -import defer from "lodash/defer"; import { mount, shallow } from "enzyme"; import DatePicker from "../src/index.jsx"; -import InputTimeComponent from "../src/inputTime"; -import CustomTimeInput from "./helper_components/custom_time_input"; +import InputTimeComponent from "../src/inputTime.jsx"; +import CustomTimeInput from "./helper_components/custom_time_input.jsx"; describe("timeInput", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - afterEach(() => { - sandbox.restore(); + jest.resetAllMocks(); }); it("should show time component when showTimeSelect prop is present", () => { const datePicker = mount(); const component = datePicker.find(InputTimeComponent); - expect(component).to.exist; + expect(component).not.toBeNull(); }); it("should have custom time caption", () => { const timeComponent = mount( - + , ); const caption = timeComponent.find(".react-datepicker-time__caption"); - expect(caption.text()).to.equal("Custom time"); + expect(caption.text()).toEqual("Custom time"); }); xit("should trigger onChange event", () => { const timeComponent = shallow(); const input = timeComponent.find("input"); input.simulate("change", { target: { value: "13:00" } }); - expect(timeComponent.state("time")).to.equal("13:00"); + expect(timeComponent.state("time")).toEqual("13:00"); }); it("should trigger onChange event and set the value as last valid timeString if empty string is passed as time input value", () => { const timeComponent = shallow( - {}} /> + {}} />, ); const input = timeComponent.find("input"); input.simulate("change", { target: { value: "" } }); - expect(timeComponent.state("time")).to.equal("13:00"); + expect(timeComponent.state("time")).toEqual("13:00"); }); xit("should trigger onChange event on a custom time input without using the last valid timeString", () => { - const timeComponent = shallow( + const timeComponent = mount( } - /> + />, ); const input = timeComponent.find("CustomTimeInput"); input.simulate("change", "14:00"); - expect(timeComponent.state("time")).to.equal("14:00"); + expect(timeComponent.state("time")).toEqual("14:00"); }); - it("should pass pure Date to custom time input", (done) => { - const onTimeChangeSpy = sandbox.spy(); + xit("should pass pure Date to custom time input", () => { + const onTimeChangeSpy = jest.fn(); const timeComponent = mount( } - /> + />, ); - const input = timeComponent.find("CustomTimeInput"); + const input = timeComponent.find(CustomTimeInput); input.simulate("change", "14:00"); - defer(() => { - assert( - onTimeChangeSpy.called === true, - "should call CustomTimeInput onChange" - ); - assert( - Object.prototype.toString.call(onTimeChangeSpy.args[0][0]) === - "[object Date]", - "should pass pure date to CustomTimeInput onChange" - ); - done(); - }); - }); - - xit("should update input value if time is updated from outside", () => { - const timeComponent = mount( - + expect(onTimeChangeSpy).toHaveBeenCalledWith( + new Date(new Date().setHours(14, 0, 0, 0)), ); - - expect(timeComponent.find("input").props.value).to.equal("13:00"); - - timeComponent.setProps({ timeString: "14:00" }); - expect(timeComponent.find("input").props.value).to.equal("14:00"); }); }); diff --git a/test/timepicker_test.js b/test/timepicker_test.test.js similarity index 78% rename from test/timepicker_test.js rename to test/timepicker_test.test.js index 728776073..9a61bff07 100644 --- a/test/timepicker_test.js +++ b/test/timepicker_test.test.js @@ -2,10 +2,10 @@ import React from "react"; import DatePicker from "../src/index.jsx"; import TestUtils from "react-dom/test-utils"; import ReactDOM from "react-dom"; -import Time from "../src/time"; -import { newDate, formatDate } from "../src/date_utils"; +import Time from "../src/time.jsx"; +import { newDate, formatDate } from "../src/date_utils.js"; -import { getKey } from "./test_utils"; +import { getKey } from "./test_utils.js"; describe("TimePicker", () => { let datePicker; @@ -18,11 +18,11 @@ describe("TimePicker", () => { it("should update on input time change", () => { renderDatePicker("February 28, 2018 4:43 PM"); - expect(getInputString()).to.equal("February 28, 2018 4:43 PM"); + expect(getInputString()).toBe("February 28, 2018 4:43 PM"); setManually("February 28, 2018 4:45 PM"); - expect(formatDate(onChangeMoment, "MMMM d, yyyy p")).to.equal( - "February 28, 2018 4:45 PM" + expect(formatDate(onChangeMoment, "MMMM d, yyyy p")).toBe( + "February 28, 2018 4:45 PM", ); }); @@ -33,7 +33,7 @@ describe("TimePicker", () => { const time = TestUtils.findRenderedComponentWithType(datePicker, Time); const lis = TestUtils.scryRenderedDOMComponentsWithTag(time, "li"); TestUtils.Simulate.click(lis[1]); - expect(getInputString()).to.equal("February 28, 2018 12:30 AM"); + expect(getInputString()).toBe("February 28, 2018 12:30 AM"); }); it("should allow for injected date if input does not have focus", () => { @@ -41,19 +41,19 @@ describe("TimePicker", () => { setManually("February 28, 2018 4:45 PM"); TestUtils.Simulate.blur(datePicker.input); renderDatePicker("February 28, 2018 4:43 PM"); - expect(getInputString()).to.equal("February 28, 2018 4:43 PM"); + expect(getInputString()).toBe("February 28, 2018 4:43 PM"); }); it("should not close datepicker after time clicked when shouldCloseOnSelect is false", () => { var datePicker = TestUtils.renderIntoDocument( - + , ); var dateInput = datePicker.input; TestUtils.Simulate.focus(ReactDOM.findDOMNode(dateInput)); const time = TestUtils.findRenderedComponentWithType(datePicker, Time); const lis = TestUtils.scryRenderedDOMComponentsWithTag(time, "li"); TestUtils.Simulate.click(lis[0]); - expect(datePicker.state.open).to.be.true; + expect(datePicker.state.open).toBe(true); }); it("should show different colors for times", () => { @@ -70,22 +70,23 @@ describe("TimePicker", () => { timeClassName={handleTimeColors} open focus - /> + />, ); let redItems = TestUtils.scryRenderedDOMComponentsWithClass( timePicker, - "react-datepicker__time-list-item red" + "react-datepicker__time-list-item red", ); let greenItems = TestUtils.scryRenderedDOMComponentsWithClass( timePicker, - "react-datepicker__time-list-item green" + "react-datepicker__time-list-item green", ); - assert.isTrue( + + expect( redItems !== undefined && redItems.length === 24 && greenItems !== undefined && - greenItems.length === 24 - ); + greenItems.length === 24, + ).toBe(true); }); it("should handle 40 min time intervals", () => { @@ -93,12 +94,12 @@ describe("TimePicker", () => { timeIntervals: 40, showTimeSelect: true, }); - expect(getInputString()).to.equal("February 28, 2018 9:00 AM"); + expect(getInputString()).toBe("February 28, 2018 9:00 AM"); ReactDOM.findDOMNode(datePicker.input).focus(); setManually("February 28, 2018 9:20 AM"); - expect(getInputString()).to.equal("February 28, 2018 9:20 AM"); + expect(getInputString()).toBe("February 28, 2018 9:20 AM"); }); it("should handle 53 min time intervals", () => { @@ -106,12 +107,12 @@ describe("TimePicker", () => { timeIntervals: 53, showTimeSelect: true, }); - expect(getInputString()).to.equal("February 28, 2018 9:00 AM"); + expect(getInputString()).toBe("February 28, 2018 9:00 AM"); ReactDOM.findDOMNode(datePicker.input).focus(); setManually("February 28, 2018 9:53 AM"); - expect(getInputString()).to.equal("February 28, 2018 9:53 AM"); + expect(getInputString()).toBe("February 28, 2018 9:53 AM"); }); it("should handle 90 min time intervals", () => { @@ -119,34 +120,34 @@ describe("TimePicker", () => { timeIntervals: 90, showTimeSelect: true, }); - expect(getInputString()).to.equal("July 13, 2020 2:59 PM"); + expect(getInputString()).toBe("July 13, 2020 2:59 PM"); ReactDOM.findDOMNode(datePicker.input).focus(); setManually("July 13, 2020 3:00 PM"); - expect(getInputString()).to.equal("July 13, 2020 3:00 PM"); + expect(getInputString()).toBe("July 13, 2020 3:00 PM"); }); it("should not contain the time only classname in header by default", () => { const timePicker = TestUtils.renderIntoDocument( - + , ); const header = TestUtils.scryRenderedDOMComponentsWithClass( timePicker, - "react-datepicker__header--time--only" + "react-datepicker__header--time--only", ); - expect(header).to.have.length(0); + expect(header).toHaveLength(0); }); it("should contain the time only classname in header if enabled", () => { const timePicker = TestUtils.renderIntoDocument( - + , ); const header = TestUtils.scryRenderedDOMComponentsWithClass( timePicker, - "react-datepicker__header--time--only" + "react-datepicker__header--time--only", ); - expect(header).to.have.length(1); + expect(header).toHaveLength(1); }); it("should select time when Enter is pressed", () => { @@ -155,7 +156,7 @@ describe("TimePicker", () => { const time = TestUtils.findRenderedComponentWithType(datePicker, Time); const lis = TestUtils.scryRenderedDOMComponentsWithTag(time, "li"); TestUtils.Simulate.keyDown(lis[1], getKey("Enter")); - expect(getInputString()).to.equal("February 28, 2018 12:30 AM"); + expect(getInputString()).toBe("February 28, 2018 12:30 AM"); }); it("should select time when Space is pressed", () => { @@ -164,7 +165,7 @@ describe("TimePicker", () => { const time = TestUtils.findRenderedComponentWithType(datePicker, Time); const lis = TestUtils.scryRenderedDOMComponentsWithTag(time, "li"); TestUtils.Simulate.keyDown(lis[1], getKey(" ")); - expect(getInputString()).to.equal("February 28, 2018 12:30 AM"); + expect(getInputString()).toBe("February 28, 2018 12:30 AM"); }); it("should not select time when Escape is pressed", () => { @@ -173,11 +174,11 @@ describe("TimePicker", () => { const time = TestUtils.findRenderedComponentWithType(datePicker, Time); const lis = TestUtils.scryRenderedDOMComponentsWithTag(time, "li"); TestUtils.Simulate.keyDown(lis[1], getKey("Escape")); - expect(getInputString()).to.equal("February 28, 2018 4:43 PM"); + expect(getInputString()).toBe("February 28, 2018 4:43 PM"); }); it("should call the onKeyDown handler on key Escape press", () => { - const onKeyDownSpy = sinon.spy(); + const onKeyDownSpy = jest.fn(); renderDatePicker("February 28, 2018 4:43 PM", { onKeyDown: onKeyDownSpy, }); @@ -185,11 +186,11 @@ describe("TimePicker", () => { const time = TestUtils.findRenderedComponentWithType(datePicker, Time); const lis = TestUtils.scryRenderedDOMComponentsWithTag(time, "li"); TestUtils.Simulate.keyDown(lis[1], getKey("Escape")); - expect(onKeyDownSpy.calledOnce).to.be.true; + expect(onKeyDownSpy).toHaveBeenCalledTimes(1); }); it("should call the onKeyDown handler on key Enter press", () => { - const onKeyDownSpy = sinon.spy(); + const onKeyDownSpy = jest.fn(); renderDatePicker("February 28, 2018 4:43 PM", { onKeyDown: onKeyDownSpy, }); @@ -197,11 +198,11 @@ describe("TimePicker", () => { const time = TestUtils.findRenderedComponentWithType(datePicker, Time); const lis = TestUtils.scryRenderedDOMComponentsWithTag(time, "li"); TestUtils.Simulate.keyDown(lis[1], getKey("Enter")); - expect(onKeyDownSpy.calledOnce).to.be.true; + expect(onKeyDownSpy).toHaveBeenCalledTimes(1); }); it("should call the onKeyDown handler on key Space press", () => { - const onKeyDownSpy = sinon.spy(); + const onKeyDownSpy = jest.fn(); renderDatePicker("February 28, 2018 4:43 PM", { onKeyDown: onKeyDownSpy, }); @@ -209,7 +210,7 @@ describe("TimePicker", () => { const time = TestUtils.findRenderedComponentWithType(datePicker, Time); const lis = TestUtils.scryRenderedDOMComponentsWithTag(time, "li"); TestUtils.Simulate.keyDown(lis[1], getKey(" ")); - expect(onKeyDownSpy.calledOnce).to.be.true; + expect(onKeyDownSpy).toHaveBeenCalledTimes(1); }); function setManually(string) { @@ -235,7 +236,7 @@ describe("TimePicker", () => { showTimeSelect {...props} />, - div + div, ); } diff --git a/test/week_number_test.js b/test/week_number_test.test.js similarity index 72% rename from test/week_number_test.js rename to test/week_number_test.test.js index d2c2ffce1..1f2a0037d 100644 --- a/test/week_number_test.js +++ b/test/week_number_test.test.js @@ -1,7 +1,6 @@ import React from "react"; import WeekNumber from "../src/week_number"; import { shallow } from "enzyme"; -import sinon from "sinon"; function renderWeekNumber(weekNumber, props = {}) { return shallow(); @@ -13,29 +12,29 @@ describe("WeekNumber", () => { it("should render the specified Week Number", () => { const weekNumber = 1; shallowWeekNumber = renderWeekNumber(weekNumber); - expect( - shallowWeekNumber.hasClass("react-datepicker__week-number") - ).to.equal(true); - expect(shallowWeekNumber.text()).to.equal(weekNumber + ""); + expect(shallowWeekNumber.hasClass("react-datepicker__week-number")).toBe( + true, + ); + expect(shallowWeekNumber.text()).toBe(weekNumber + ""); }); it("should call the onClick function if it is defined", () => { - const onClick = sinon.spy(); + const onClick = jest.fn(); shallowWeekNumber = shallow( - + , ); shallowWeekNumber.instance().handleClick({}); - expect(onClick).to.have.property("callCount", 1); + expect(onClick).toHaveBeenCalledTimes(1); }); it("should have an aria-label containing the provided prefix", () => { const ariaLabelPrefix = "A prefix in my native language"; const shallowWeekNumber = shallow( - + , ); expect( - shallowWeekNumber.html().indexOf(`aria-label="${ariaLabelPrefix}`) - ).not.equal(-1); + shallowWeekNumber.html().indexOf(`aria-label="${ariaLabelPrefix}`), + ).not.toBe(-1); }); }); }); diff --git a/test/week_test.js b/test/week_test.test.js similarity index 80% rename from test/week_test.js rename to test/week_test.test.js index eeb26a856..a071c7b4b 100644 --- a/test/week_test.js +++ b/test/week_test.test.js @@ -3,13 +3,12 @@ import Week from "../src/week"; import WeekNumber from "../src/week_number"; import Day from "../src/day"; import { shallow } from "enzyme"; -import sinon from "sinon"; import * as utils from "../src/date_utils"; describe("Week", () => { it("should have the week CSS class", () => { const week = shallow(); - expect(week.hasClass("react-datepicker__week")).to.equal(true); + expect(week.hasClass("react-datepicker__week")).toBe(true); }); it("should render the days of the week", () => { @@ -17,14 +16,14 @@ describe("Week", () => { const week = shallow(); const days = week.find(Day); - expect(days.length).to.equal(7); + expect(days.length).toBe(7); days.forEach((day, offset) => { const expectedDay = utils.addDays(weekStart, offset); - assert(utils.isSameDay(day.prop("day"), expectedDay)); + expect(day.prop("day")).toEqual(expectedDay); }); const weekNumber = week.find(WeekNumber); - expect(weekNumber.length).to.equal(0); + expect(weekNumber.length).toBe(0); }); it("should render the week number", () => { @@ -32,14 +31,14 @@ describe("Week", () => { const week = shallow(); const days = week.find(Day); - expect(days.length).to.equal(7); + expect(days.length).toBe(7); days.forEach((day, offset) => { const expectedDay = utils.addDays(weekStart, offset); - assert(utils.isSameDay(day.prop("day"), expectedDay)); + expect(day.prop("day")).toEqual(expectedDay); }); const weekNumber = week.find(WeekNumber); - expect(weekNumber.length).to.equal(1); + expect(weekNumber.length).toBe(1); }); it("should call the provided onDayClick function", () => { @@ -53,7 +52,7 @@ describe("Week", () => { const week = shallow(); const day = week.find(Day).at(0); day.simulate("click"); - assert(utils.isSameDay(day.prop("day"), dayClicked)); + expect(day.prop("day")).toEqual(dayClicked); }); it("should call the provided onWeekSelect function and pass the first day of the week", () => { @@ -64,23 +63,23 @@ describe("Week", () => { } const weekStart = utils.newDate("2015-12-20"); - const setOpenSpy = sinon.spy(); + const setOpenSpy = jest.fn(); const week = shallow( + />, ); const weekNumberElement = week.find(WeekNumber); weekNumberElement.simulate("click"); - expect(utils.isEqual(firstDayReceived, weekStart)).to.be.true; + expect(utils.isEqual(firstDayReceived, weekStart)).toBe(true); }); it("should call the provided onWeekSelect function and call the setopen function", () => { const weekStart = utils.newDate("2015-12-20"); - const setOpenSpy = sinon.spy(); + const setOpenSpy = jest.fn(); const week = shallow( { shouldCloseOnSelect onWeekSelect={() => {}} setOpen={setOpenSpy} - /> + />, ); const weekNumberElement = week.find(WeekNumber); weekNumberElement.simulate("click"); - sinon.assert.calledOnce(setOpenSpy); + expect(setOpenSpy).toHaveBeenCalledTimes(1); }); it("should call the provided onWeekSelect function and not call the setopen function when 'shouldCloseOnSelect' is false", () => { const weekStart = utils.newDate("2015-12-20"); - const setOpenSpy = sinon.spy(); + const setOpenSpy = jest.fn(); + const setOnWeekSelect = jest.fn(); const week = shallow( {}} + onWeekSelect={setOnWeekSelect} setOpen={setOpenSpy} - /> + />, ); const weekNumberElement = week.find(WeekNumber); weekNumberElement.simulate("click"); - sinon.assert.notCalled(setOpenSpy); + expect(setOnWeekSelect).toHaveBeenCalledTimes(1); + expect(setOpenSpy).toHaveBeenCalledTimes(0); }); it("should call the provided onWeekSelect function and pass the week number", () => { @@ -131,11 +132,11 @@ describe("Week", () => { showWeekNumber shouldCloseOnSelect={false} onWeekSelect={onWeekClick} - /> + />, ); const weekNumberElement = week.find(WeekNumber); weekNumberElement.simulate("click"); - expect(weekNumberReceived).to.equal(realWeekNumber); + expect(weekNumberReceived).toBe(realWeekNumber); }); it("should set the week number with the provided formatWeekNumber function", () => { @@ -152,12 +153,12 @@ describe("Week", () => { day={weekStart} showWeekNumber formatWeekNumber={weekNumberFormatter} - /> + />, ); const weekNumberElement = week.find(WeekNumber); - expect(utils.isEqual(firstDayReceived, weekStart)).to.be.true; - expect(weekNumberElement.prop("weekNumber")).to.equal(9); + expect(utils.isEqual(firstDayReceived, weekStart)).toBe(true); + expect(weekNumberElement.prop("weekNumber")).toBe(9); }); it("should call the provided onDayMouseEnter function", () => { @@ -169,10 +170,10 @@ describe("Week", () => { const weekStart = utils.newDate(); const week = shallow( - + , ); const day = week.find(Day).first(); day.simulate("mouseenter"); - assert(utils.isSameDay(day.prop("day"), dayMouseEntered)); + expect(day.prop("day")).toEqual(dayMouseEntered); }); }); diff --git a/test/year_dropdown_options_test.js b/test/year_dropdown_options_test.test.js similarity index 69% rename from test/year_dropdown_options_test.js rename to test/year_dropdown_options_test.test.js index 448e8a6b3..242c477bd 100644 --- a/test/year_dropdown_options_test.js +++ b/test/year_dropdown_options_test.test.js @@ -1,57 +1,54 @@ import React from "react"; import YearDropdownOptions from "../src/year_dropdown_options.jsx"; import { mount, shallow } from "enzyme"; -import * as utils from "../src/date_utils"; +import * as utils from "../src/date_utils.js"; describe("YearDropdownOptions", () => { let yearDropdown, handleChangeResult; const mockHandleChange = function (changeInput) { handleChangeResult = changeInput; }; - let sandbox, onCancelSpy; + let onCancelSpy; beforeEach(() => { - sandbox = sinon.createSandbox(); - onCancelSpy = sandbox.spy(); + onCancelSpy = jest.fn(); yearDropdown = mount( + />, ); }); - afterEach(() => { - sandbox.restore(); - }); - it("shows the available years in the initial view", () => { const yearDropdownNode = yearDropdown.find("div"); const textContents = yearDropdownNode .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents).to.have.members([ - "", - "2020", - "2019", - "2018", - "2017", - "2016", - "✓2015", - "2014", - "2013", - "2012", - "2011", - "2010", - "", - ]); + expect(textContents).toEqual( + expect.arrayContaining([ + "", + "2020", + "2019", + "2018", + "2017", + "2016", + "✓2015", + "2014", + "2013", + "2012", + "2011", + "2010", + "", + ]), + ); }); it("generate 10 years, 5 below and 5 above the selected one, if prop scrollableYearDropdown is false", () => { const yearsListLength = yearDropdown.state().yearsList.length; - expect(yearsListLength).to.equal(11); + expect(yearsListLength).toBe(11); }); it("increments the available years when the 'upcoming years' button is clicked", () => { @@ -63,21 +60,23 @@ describe("YearDropdownOptions", () => { .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents).to.have.members([ - "", - "2021", - "2020", - "2019", - "2018", - "2017", - "2016", - "✓2015", - "2014", - "2013", - "2012", - "2011", - "", - ]); + expect(textContents).toEqual( + expect.arrayContaining([ + "", + "2021", + "2020", + "2019", + "2018", + "2017", + "2016", + "✓2015", + "2014", + "2013", + "2012", + "2011", + "", + ]), + ); }); it("decrements the available years when the 'previous years' button is clicked", () => { @@ -89,21 +88,23 @@ describe("YearDropdownOptions", () => { .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents).to.have.members([ - "", - "2019", - "2018", - "2017", - "2016", - "✓2015", - "2014", - "2013", - "2012", - "2011", - "2010", - "2009", - "", - ]); + expect(textContents).toEqual( + expect.arrayContaining([ + "", + "2019", + "2018", + "2017", + "2016", + "✓2015", + "2014", + "2013", + "2012", + "2011", + "2010", + "2009", + "", + ]), + ); }); it("calls the supplied onChange function when a year is clicked", () => { @@ -111,13 +112,13 @@ describe("YearDropdownOptions", () => { .find(".react-datepicker__year-option") .filterWhere((e) => e.text().includes("2015")) .simulate("click"); - expect(handleChangeResult).to.equal(2015); + expect(handleChangeResult).toBe(2015); }); it("calls the supplied onCancel function on handleClickOutside", () => { const instance = yearDropdown.instance(); instance.handleClickOutside(); - expect(onCancelSpy.calledOnce).to.be.true; + expect(onCancelSpy).toBeCalled(); }); describe("selected", () => { @@ -132,16 +133,16 @@ describe("YearDropdownOptions", () => { let selectedYearOption; beforeEach(() => { selectedYearOption = yearOptions.filterWhere((o) => - o.hasClass(className) + o.hasClass(className), ); }); it("should apply the selected class", () => { - expect(selectedYearOption.hasClass(className)).to.equal(true); + expect(selectedYearOption.hasClass(className)).toBe(true); }); it("should add aria-selected property with the value of true", () => { const ariaSelected = selectedYearOption.prop("aria-selected"); - expect(ariaSelected).to.equal("true"); + expect(ariaSelected).toBe("true"); }); }); @@ -153,51 +154,41 @@ describe("YearDropdownOptions", () => { .at(0); }); it("should not apply the selected class", () => { - expect(selectedYearOption.hasClass(className)).to.equal(false); + expect(selectedYearOption.hasClass(className)).toBe(false); }); it("should not add aria-selected property with the value of true", () => { const ariaSelected = selectedYearOption.prop("aria-selected"); - expect(ariaSelected).to.be.undefined; + expect(ariaSelected).toBeUndefined(); }); }); }); }); describe("YearDropdownOptions with scrollable dropwdown", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - it("should show upcoming and previous links and generate 10 years if prop scrollableYearDropdown is true", () => { - const onCancelSpy = sandbox.spy(); - const onChangeSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); + const onChangeSpy = jest.fn(); const yearDropdown = shallow( + />, ); - expect(yearDropdown.state().yearsList.length).to.equal(21); + expect(yearDropdown.state().yearsList.length).toBe(21); expect( - yearDropdown.find(".react-datepicker__navigation--years-upcoming").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-upcoming").length, + ).toBe(1); expect( - yearDropdown.find(".react-datepicker__navigation--years-previous").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-previous").length, + ).toBe(1); }); it("should generate years between minDate and maxDate if prop scrollableYearDropdown is true", () => { - const onCancelSpy = sandbox.spy(); - const onChangeSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); + const onChangeSpy = jest.fn(); const minDate = utils.newDate(); const maxDate = utils.addYears(utils.newDate(), 1); const yearDropdown = shallow( @@ -208,16 +199,16 @@ describe("YearDropdownOptions with scrollable dropwdown", () => { year={utils.getYear(utils.newDate())} minDate={minDate} maxDate={maxDate} - /> + />, ); - expect(yearDropdown.state().yearsList.length).to.equal(2); - expect(yearDropdown.state().yearsList).to.contain(utils.getYear(minDate)); - expect(yearDropdown.state().yearsList).to.contain(utils.getYear(maxDate)); + expect(yearDropdown.state().yearsList.length).toBe(2); + expect(yearDropdown.state().yearsList).toContain(utils.getYear(minDate)); + expect(yearDropdown.state().yearsList).toContain(utils.getYear(maxDate)); }); it("should hide arrows to add years, if not between minDate and maxDate", () => { - const onCancelSpy = sandbox.spy(); - const onChangeSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); + const onChangeSpy = jest.fn(); const minDate = utils.newDate(); const maxDate = utils.addYears(utils.newDate(), 1); const yearDropdown = mount( @@ -228,20 +219,20 @@ describe("YearDropdownOptions with scrollable dropwdown", () => { year={utils.getYear(utils.newDate())} minDate={minDate} maxDate={maxDate} - /> + />, ); expect( - yearDropdown.find(".react-datepicker__navigation--years-upcoming").length - ).to.equal(0); + yearDropdown.find(".react-datepicker__navigation--years-upcoming").length, + ).toBe(0); expect( - yearDropdown.find(".react-datepicker__navigation--years-previous").length - ).to.equal(0); + yearDropdown.find(".react-datepicker__navigation--years-previous").length, + ).toBe(0); }); it("should show arrows to add years, if actual years list contains years between minDate and maxDate", () => { - const onCancelSpy = sandbox.spy(); - const onChangeSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); + const onChangeSpy = jest.fn(); const minDate = utils.subYears(utils.newDate(), 11); const maxDate = utils.addYears(utils.newDate(), 11); const yearDropdown = mount( @@ -252,24 +243,26 @@ describe("YearDropdownOptions with scrollable dropwdown", () => { year={utils.getYear(utils.newDate())} minDate={minDate} maxDate={maxDate} - /> + />, ); expect( - yearDropdown.find(".react-datepicker__navigation--years-previous").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-previous").length, + ).toBe(1); expect( - yearDropdown.find(".react-datepicker__navigation--years-upcoming").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-upcoming").length, + ).toBe(1); let textContents = yearDropdown .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents.find((year) => year === utils.getYear(minDate))).to.be - .undefined; - expect(textContents.find((year) => year === utils.getYear(maxDate))).to.be - .undefined; + expect( + textContents.find((year) => year === utils.getYear(minDate)), + ).toBeUndefined(); + expect( + textContents.find((year) => year === utils.getYear(maxDate)), + ).toBeUndefined(); yearDropdown .find(".react-datepicker__navigation--years-previous") @@ -278,12 +271,13 @@ describe("YearDropdownOptions with scrollable dropwdown", () => { .find(".react-datepicker__year-option") .map((node) => node.text()); const x = textContents.find((year) => year === utils.getYear(minDate)); - expect(x).to.be.undefined; - expect(textContents.find((year) => year === utils.getYear(maxDate))).to.be - .undefined; + expect(x).toBeUndefined(); expect( - yearDropdown.find(".react-datepicker__navigation--years-previous").length - ).to.equal(0); + textContents.find((year) => year === utils.getYear(maxDate)), + ).toBeUndefined(); + expect( + yearDropdown.find(".react-datepicker__navigation--years-previous").length, + ).toBe(0); yearDropdown .find(".react-datepicker__navigation--years-upcoming") @@ -291,15 +285,17 @@ describe("YearDropdownOptions with scrollable dropwdown", () => { textContents = yearDropdown .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents.find((year) => year === utils.getYear(minDate))).to.be - .undefined; - expect(textContents.find((year) => year === utils.getYear(maxDate))).to.be - .undefined; + expect( + textContents.find((year) => year === utils.getYear(minDate)), + ).toBeUndefined(); + expect( + textContents.find((year) => year === utils.getYear(maxDate)), + ).toBeUndefined(); }); it("should show arrows to add previous years, if actual years list does not contain minDate year, if only minDate is provided", () => { - const onCancelSpy = sandbox.spy(); - const onChangeSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); + const onChangeSpy = jest.fn(); const minDate = utils.subYears(utils.newDate(), 11); const yearDropdown = mount( { scrollableYearDropdown year={utils.getYear(utils.newDate())} minDate={minDate} - /> + />, ); expect( - yearDropdown.find(".react-datepicker__navigation--years-previous").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-previous").length, + ).toBe(1); expect( - yearDropdown.find(".react-datepicker__navigation--years-upcoming").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-upcoming").length, + ).toBe(1); let textContents = yearDropdown .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents.find((year) => year === utils.getYear(minDate))).to.be - .undefined; + expect( + textContents.find((year) => year === utils.getYear(minDate)), + ).toBeUndefined(); yearDropdown .find(".react-datepicker__navigation--years-previous") @@ -332,19 +329,20 @@ describe("YearDropdownOptions with scrollable dropwdown", () => { textContents = yearDropdown .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents.find((year) => year === utils.getYear(minDate))).to.be - .undefined; expect( - yearDropdown.find(".react-datepicker__navigation--years-upcoming").length - ).to.equal(1); + textContents.find((year) => year === utils.getYear(minDate)), + ).toBeUndefined(); + expect( + yearDropdown.find(".react-datepicker__navigation--years-upcoming").length, + ).toBe(1); expect( - yearDropdown.find(".react-datepicker__navigation--years-previous").length - ).to.equal(0); + yearDropdown.find(".react-datepicker__navigation--years-previous").length, + ).toBe(0); }); it("should show arrows to add upcoming years, if actual years list does not contain maxDate year, if only maxDate is provided", () => { - const onCancelSpy = sandbox.spy(); - const onChangeSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); + const onChangeSpy = jest.fn(); const maxDate = utils.addYears(utils.newDate(), 11); const yearDropdown = mount( { scrollableYearDropdown year={utils.getYear(utils.newDate())} maxDate={maxDate} - /> + />, ); expect( - yearDropdown.find(".react-datepicker__navigation--years-previous").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-previous").length, + ).toBe(1); expect( - yearDropdown.find(".react-datepicker__navigation--years-upcoming").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-upcoming").length, + ).toBe(1); let textContents = yearDropdown .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents.find((year) => year === utils.getYear(maxDate))).to.be - .undefined; + expect( + textContents.find((year) => year === utils.getYear(maxDate)), + ).toBeUndefined(); yearDropdown .find(".react-datepicker__navigation--years-upcoming") @@ -378,19 +377,20 @@ describe("YearDropdownOptions with scrollable dropwdown", () => { .find(".react-datepicker__year-option") .map((node) => node.text()); - expect(textContents.find((year) => year === utils.getYear(maxDate))).to.be - .undefined; expect( - yearDropdown.find(".react-datepicker__navigation--years-upcoming").length - ).to.equal(0); + textContents.find((year) => year === utils.getYear(maxDate)), + ).toBeUndefined(); + expect( + yearDropdown.find(".react-datepicker__navigation--years-upcoming").length, + ).toBe(0); expect( - yearDropdown.find(".react-datepicker__navigation--years-previous").length - ).to.equal(1); + yearDropdown.find(".react-datepicker__navigation--years-previous").length, + ).toBe(1); }); it("should generate 25 years (25 above, 25 below selected) if prop yearDropdownItemNumber is set to 25", () => { - const onCancelSpy = sandbox.spy(); - const onChangeSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); + const onChangeSpy = jest.fn(); const yearDropdown = shallow( { scrollableYearDropdown year={2015} yearDropdownItemNumber={25} - /> + />, ); - expect(yearDropdown.state().yearsList.length).to.equal(51); + expect(yearDropdown.state().yearsList.length).toBe(51); }); it("should scroll year dropdown to the middle on open", () => { - const onCancelSpy = sandbox.spy(); - const onChangeSpy = sandbox.spy(); + const onCancelSpy = jest.fn(); + const onChangeSpy = jest.fn(); const yearDropdownInstance = mount( { scrollableYearDropdown year={2015} yearDropdownItemNumber={25} - /> + />, ).instance(); yearDropdownInstance.dropdownRef.current = { @@ -421,6 +421,6 @@ describe("YearDropdownOptions with scrollable dropwdown", () => { clientHeight: 400, }; yearDropdownInstance.componentDidMount(); - expect(yearDropdownInstance.dropdownRef.current.scrollTop).to.equal(200); + expect(yearDropdownInstance.dropdownRef.current.scrollTop).toBe(200); }); }); diff --git a/test/year_dropdown_test.js b/test/year_dropdown_test.test.js similarity index 78% rename from test/year_dropdown_test.js rename to test/year_dropdown_test.test.js index 9bf672c78..4759296e1 100644 --- a/test/year_dropdown_test.js +++ b/test/year_dropdown_test.test.js @@ -3,7 +3,7 @@ import range from "lodash/range"; import YearDropdown from "../src/year_dropdown.jsx"; import YearDropdownOptions from "../src/year_dropdown_options.jsx"; import { mount } from "enzyme"; -import { newDate } from "../src/date_utils"; +import { newDate } from "../src/date_utils.js"; describe("YearDropdown", () => { var yearDropdown; @@ -20,7 +20,7 @@ describe("YearDropdown", () => { year={2015} onChange={onChangeMock} {...overrideProps} - /> + />, ); } @@ -34,18 +34,18 @@ describe("YearDropdown", () => { }); it("shows the selected year in the initial view", () => { - expect(yearDropdown.text()).to.contain("2015"); + expect(yearDropdown.text()).toMatch("2015"); }); it("starts with the year options list hidden", () => { var optionsView = yearDropdown.find(YearDropdownOptions); - expect(optionsView).to.have.length(0); + expect(optionsView).toHaveLength(0); }); it("opens a list when read view is clicked", () => { yearDropdown.find(".react-datepicker__year-read-view").simulate("click"); var optionsView = yearDropdown.find(YearDropdownOptions); - expect(optionsView).to.exist; + expect(optionsView).not.toBeNull(); }); it("closes the dropdown when a year is clicked", () => { @@ -54,7 +54,7 @@ describe("YearDropdown", () => { .find(".react-datepicker__year-option") .at(1) .simulate("click"); - expect(yearDropdown.find(YearDropdownOptions)).to.have.length(0); + expect(yearDropdown.find(YearDropdownOptions)).toHaveLength(0); }); it("does not call the supplied onChange function when the same year is clicked", () => { @@ -63,7 +63,7 @@ describe("YearDropdown", () => { .find(".react-datepicker__year-option") .at(6) .simulate("click"); - expect(lastOnChangeValue).to.be.null; + expect(lastOnChangeValue).toBeNull(); }); it("calls the supplied onChange function when a different year is clicked", () => { @@ -72,7 +72,7 @@ describe("YearDropdown", () => { .find(".react-datepicker__year-option") .at(7) .simulate("click"); - expect(lastOnChangeValue).to.eq(2014); + expect(lastOnChangeValue).toEqual(2014); }); }); @@ -80,12 +80,12 @@ describe("YearDropdown", () => { it("renders a select with default year range options", () => { yearDropdown = getYearDropdown({ dropdownMode: "select" }); const select = yearDropdown.find(".react-datepicker__year-select"); - expect(select).to.have.length(1); - expect(select.prop("value")).to.eq(2015); + expect(select).toHaveLength(1); + expect(select.prop("value")).toBe(2015); const options = select.find("option"); - expect(options.map((o) => o.text())).to.eql( - range(1900, 2101).map((n) => `${n}`) + expect(options.map((o) => o.text())).toEqual( + range(1900, 2101).map((n) => `${n}`), ); }); @@ -96,12 +96,12 @@ describe("YearDropdown", () => { maxDate: newDate("2016-01-01"), }); const select = yearDropdown.find(".react-datepicker__year-select"); - expect(select).to.have.length(1); - expect(select.prop("value")).to.eq(2015); + expect(select).toHaveLength(1); + expect(select.prop("value")).toEqual(2015); const options = select.find("option"); - expect(options.map((o) => o.text())).to.eql( - range(1988, 2017).map((n) => `${n}`) + expect(options.map((o) => o.text())).toEqual( + range(1988, 2017).map((n) => `${n}`), ); }); @@ -109,21 +109,19 @@ describe("YearDropdown", () => { yearDropdown = getYearDropdown({ dropdownMode: "select" }); const select = yearDropdown.find(".react-datepicker__year-select"); select.simulate("click", { target: { value: 2015 } }); - expect(lastOnChangeValue).to.be.null; + expect(lastOnChangeValue).toBeNull(); }); it("calls the supplied onChange function when a different year is clicked", () => { yearDropdown = getYearDropdown({ dropdownMode: "select" }); const select = yearDropdown.find(".react-datepicker__year-select"); select.simulate("change", { target: { value: 2014 } }); - expect(lastOnChangeValue).to.eq(2014); + expect(lastOnChangeValue).toEqual(2014); }); it("calls the supplied onChange function when a different year is clicked", () => { - let sandbox; - sandbox = sinon.createSandbox(); - var onSelectSpy = sandbox.spy(); - var setOpenSpy = sandbox.spy(); + var onSelectSpy = jest.fn(); + var setOpenSpy = jest.fn(); yearDropdown = getYearDropdown({ dropdownMode: "select", onSelect: onSelectSpy, @@ -133,8 +131,8 @@ describe("YearDropdown", () => { const select = yearDropdown.find(".react-datepicker__year-select"); select.simulate("change", { target: { value: 2014 } }); - expect(onSelectSpy.calledOnce); - expect(setOpenSpy.calledOnce); + expect(onSelectSpy).toBeCalledTimes(1); + expect(setOpenSpy).toBeCalledTimes(1); }); }); }); diff --git a/test/year_picker_test.js b/test/year_picker_test.test.js similarity index 74% rename from test/year_picker_test.js rename to test/year_picker_test.test.js index 65323780e..c29bfb05e 100644 --- a/test/year_picker_test.js +++ b/test/year_picker_test.test.js @@ -1,54 +1,44 @@ import React from "react"; import { mount } from "enzyme"; import DatePicker from "../src/index.jsx"; -import Year from "../src/year"; +import Year from "../src/year.jsx"; import TestUtils from "react-dom/test-utils"; import ReactDOM from "react-dom"; -import * as utils from "../src/date_utils"; -import Calendar from "../src/calendar"; +import * as utils from "../src/date_utils.js"; +import Calendar from "../src/calendar.jsx"; describe("YearPicker", () => { - let sandbox; - - beforeEach(() => { - sandbox = sinon.createSandbox(); - }); - - afterEach(() => { - sandbox.restore(); - }); - it("should show year picker component when showYearPicker prop is present", () => { const datePicker = mount(); const component = datePicker.find(Year); - expect(component).to.exist; + expect(component).toBeDefined(); }); it("should show year picker component with default year item number", () => { const yearComponent = mount(); const yearItems = yearComponent.find(".react-datepicker__year-text"); - expect(yearItems.length).to.be.eq(utils.DEFAULT_YEAR_ITEM_NUMBER); + expect(yearItems.length).toBe(utils.DEFAULT_YEAR_ITEM_NUMBER); }); it("should show year picker component with specific year item number", () => { const yearItemNumber = 9; const yearComponent = mount( - + , ); const yearItems = yearComponent.find(".react-datepicker__year-text"); - expect(yearItems.length).to.be.eq(yearItemNumber); + expect(yearItems.length).toBe(yearItemNumber); }); it("should change the year when clicked on any option in the picker", () => { - const onYearChangeSpy = sinon.spy(); + const onYearChangeSpy = jest.fn(); const yearComponent = mount( - + , ); const firstYearDiv = yearComponent .find(".react-datepicker__year-text") .at(1); firstYearDiv.simulate("click"); - expect(onYearChangeSpy.called).to.be.true; + expect(onYearChangeSpy).toHaveBeenCalled(); }); it("should has selected class when element of array equal of choosen year", () => { @@ -58,7 +48,7 @@ describe("YearPicker", () => { .find(".react-datepicker__year-text--selected") .at(0) .text(); - expect(year).to.equal(utils.getYear(date).toString()); + expect(year).toBe(utils.getYear(date).toString()); }); it("should have current year class when element of array equal of current year", () => { @@ -68,7 +58,7 @@ describe("YearPicker", () => { .find(".react-datepicker__year-text--today") .at(0) .text(); - expect(year).to.equal(utils.getYear(date).toString()); + expect(year).toBe(utils.getYear(date).toString()); }); it("should have aria-current date when element of array equal to current year", () => { @@ -77,7 +67,7 @@ describe("YearPicker", () => { const ariaCurrent = yearComponent .find(".react-datepicker__year-text--today") .prop("aria-current"); - expect(ariaCurrent).to.equal("date"); + expect(ariaCurrent).toBe("date"); }); it("should not have aria-current date when element of array does not equal current year", () => { @@ -87,7 +77,7 @@ describe("YearPicker", () => { .find(".react-datepicker__year-text") .at(0) .prop("aria-current"); - expect(ariaCurrent).to.be.undefined; + expect(ariaCurrent).toBeUndefined(); }); it("should return disabled class if current date is out of bound of minDate and maxdate", () => { @@ -96,55 +86,53 @@ describe("YearPicker", () => { date={utils.newDate("2020-01-01")} minDate={utils.newDate("2018-01-01")} maxDate={utils.newDate("2025-01-01")} - /> + />, ); const year = yearComponent.find(".react-datepicker__year-text").at(0); - expect(year.hasClass("react-datepicker__year-text--disabled")).to.equal( - true - ); + expect(year.hasClass("react-datepicker__year-text--disabled")).toBe(true); }); it("should not return disabled class if current date is before minDate but same year", () => { const date = utils.newDate("2023-01-01"); const yearComponent = mount( - + , ); const yearTexts = yearComponent.find(".react-datepicker__year-text"); const firstYear = utils.getYearsPeriod( date, - utils.DEFAULT_YEAR_ITEM_NUMBER + utils.DEFAULT_YEAR_ITEM_NUMBER, ).startPeriod; expect( yearTexts .at(2023 - firstYear) - .hasClass("react-datepicker__year-text--disabled") - ).to.equal(false); + .hasClass("react-datepicker__year-text--disabled"), + ).toBe(false); }); it("should not return disabled class if current date is after maxDate but same year", () => { const date = utils.newDate("2023-12-31"); const yearComponent = mount( - + , ); const yearTexts = yearComponent.find(".react-datepicker__year-text"); const firstYear = utils.getYearsPeriod( date, - utils.DEFAULT_YEAR_ITEM_NUMBER + utils.DEFAULT_YEAR_ITEM_NUMBER, ).startPeriod; expect( yearTexts .at(2023 - firstYear) - .hasClass("react-datepicker__year-text--disabled") - ).to.equal(false); + .hasClass("react-datepicker__year-text--disabled"), + ).toBe(false); }); it("should return disabled class if specified excludeDate", () => { const date = utils.newDate("2023-12-31"); const firstYear = utils.getYearsPeriod( date, - utils.DEFAULT_YEAR_ITEM_NUMBER + utils.DEFAULT_YEAR_ITEM_NUMBER, ).startPeriod; const excludeDates = []; @@ -153,16 +141,14 @@ describe("YearPicker", () => { } const yearComponent = mount( - + , ); const yearTexts = yearComponent.find(".react-datepicker__year-text"); for (let i = 0; i <= 2023 - firstYear; i++) { const year = yearTexts.at(i); - expect(year.hasClass("react-datepicker__year-text--disabled")).to.equal( - true - ); + expect(year.hasClass("react-datepicker__year-text--disabled")).toBe(true); } }); @@ -170,7 +156,7 @@ describe("YearPicker", () => { const date = utils.newDate("2023-12-31"); const firstYear = utils.getYearsPeriod( date, - utils.DEFAULT_YEAR_ITEM_NUMBER + utils.DEFAULT_YEAR_ITEM_NUMBER, ).startPeriod; const includeDates = []; @@ -178,7 +164,7 @@ describe("YearPicker", () => { includeDates.push(utils.newDate(`${year}-01-01`)); } const yearComponent = mount( - + , ); const yearTexts = yearComponent.find(".react-datepicker__year-text"); @@ -186,15 +172,13 @@ describe("YearPicker", () => { const pos = 2023 - firstYear; for (let i = 0; i <= pos; i++) { const year = yearTexts.at(i); - expect(year.hasClass("react-datepicker__year-text--disabled")).to.equal( - false + expect(year.hasClass("react-datepicker__year-text--disabled")).toBe( + false, ); } for (let i = pos + 1; i < 12; i++) { const year = yearTexts.at(i); - expect(year.hasClass("react-datepicker__year-text--disabled")).to.equal( - true - ); + expect(year.hasClass("react-datepicker__year-text--disabled")).toBe(true); } }); @@ -203,10 +187,10 @@ describe("YearPicker", () => { return custom render; } const yearComponent = mount( - + , ); const year = yearComponent.find(".react-datepicker__year-text").at(0); - expect(year.find("span").at(0).text()).to.equal("custom render"); + expect(year.find("span").at(0).text()).toBe("custom render"); }); describe("range", () => { @@ -216,32 +200,32 @@ describe("YearPicker", () => { date={utils.newDate("2009-01-01")} startDate={utils.newDate("2009-01-01")} endDate={utils.newDate("2012-01-01")} - /> + />, ); const inRangeYears = yearComponent.find( - ".react-datepicker__year-text--in-range" + ".react-datepicker__year-text--in-range", ); - expect(inRangeYears.length).to.equal(4); - expect(inRangeYears.at(0).text()).to.eq("2009"); - expect(inRangeYears.at(1).text()).to.eq("2010"); - expect(inRangeYears.at(2).text()).to.eq("2011"); - expect(inRangeYears.at(3).text()).to.eq("2012"); + expect(inRangeYears.length).toBe(4); + expect(inRangeYears.at(0).text()).toBe("2009"); + expect(inRangeYears.at(1).text()).toBe("2010"); + expect(inRangeYears.at(2).text()).toBe("2011"); + expect(inRangeYears.at(3).text()).toBe("2012"); const rangeStartYear = yearComponent.find( - ".react-datepicker__year-text--range-start" + ".react-datepicker__year-text--range-start", ); - expect(rangeStartYear.length).to.equal(1); - expect(rangeStartYear.at(0).text()).to.eq("2009"); + expect(rangeStartYear.length).toBe(1); + expect(rangeStartYear.at(0).text()).toBe("2009"); const rangeEndYear = yearComponent.find( - ".react-datepicker__year-text--range-end" + ".react-datepicker__year-text--range-end", ); - expect(rangeEndYear.length).to.equal(1); - expect(rangeEndYear.at(0).text()).to.eq("2012"); + expect(rangeEndYear.length).toBe(1); + expect(rangeEndYear.at(0).text()).toBe("2012"); }); it("should not add range classes when start date is not defined", () => { @@ -249,22 +233,22 @@ describe("YearPicker", () => { + />, ); const inRangeYears = yearComponent.find( - ".react-datepicker__year-text--in-range" + ".react-datepicker__year-text--in-range", ); const rangeStartYear = yearComponent.find( - ".react-datepicker__year-text--range-start" + ".react-datepicker__year-text--range-start", ); const rangeEndYear = yearComponent.find( - ".react-datepicker__year-text--range-end" + ".react-datepicker__year-text--range-end", ); - expect(inRangeYears.length).to.equal(0); - expect(rangeEndYear.length).to.equal(0); - expect(rangeStartYear.length).to.equal(0); + expect(inRangeYears.length).toBe(0); + expect(rangeEndYear.length).toBe(0); + expect(rangeStartYear.length).toBe(0); }); it("should not add range classes when end date is not defined", () => { @@ -272,22 +256,22 @@ describe("YearPicker", () => { + />, ); const inRangeYears = yearComponent.find( - ".react-datepicker__year-text--in-range" + ".react-datepicker__year-text--in-range", ); const rangeStartYear = yearComponent.find( - ".react-datepicker__year-text--range-start" + ".react-datepicker__year-text--range-start", ); const rangeEndYear = yearComponent.find( - ".react-datepicker__year-text--range-end" + ".react-datepicker__year-text--range-end", ); - expect(inRangeYears.length).to.equal(0); - expect(rangeEndYear.length).to.equal(0); - expect(rangeStartYear.length).to.equal(0); + expect(inRangeYears.length).toBe(0); + expect(rangeEndYear.length).toBe(0); + expect(rangeStartYear.length).toBe(0); }); describe("selecting", () => { @@ -299,16 +283,16 @@ describe("YearPicker", () => { endDate={utils.newDate("2016-01-01")} selectingDate={utils.newDate("2015-01-01")} selectsStart - /> + />, ); const years = yearComponent.find( - ".react-datepicker__year-text--in-selecting-range" + ".react-datepicker__year-text--in-selecting-range", ); - expect(years.length).to.equal(2); - expect(years.at(0).text()).to.eq("2015"); - expect(years.at(1).text()).to.eq("2016"); + expect(years.length).toBe(2); + expect(years.at(0).text()).toBe("2015"); + expect(years.at(1).text()).toBe("2016"); }); it("should add in-selecting-range class if year is between the start date and selecting date", () => { @@ -319,16 +303,16 @@ describe("YearPicker", () => { startDate={utils.newDate("2010-01-01")} selectingDate={utils.newDate("2011-01-01")} selectsEnd - /> + />, ); const years = yearComponent.find( - ".react-datepicker__year-text--in-selecting-range" + ".react-datepicker__year-text--in-selecting-range", ); - expect(years.length).to.equal(2); - expect(years.at(0).text()).to.eq("2010"); - expect(years.at(1).text()).to.eq("2011"); + expect(years.length).toBe(2); + expect(years.at(0).text()).toBe("2010"); + expect(years.at(1).text()).toBe("2011"); }); it("should use pre selection date if selecting date is not defined", () => { @@ -338,16 +322,16 @@ describe("YearPicker", () => { date={utils.newDate("2015-01-01")} startDate={utils.newDate("2010-01-01")} selectsEnd - /> + />, ); const years = yearComponent.find( - ".react-datepicker__year-text--in-selecting-range" + ".react-datepicker__year-text--in-selecting-range", ); - expect(years.length).to.equal(2); - expect(years.at(0).text()).to.eq("2010"); - expect(years.at(1).text()).to.eq("2011"); + expect(years.length).toBe(2); + expect(years.at(0).text()).toBe("2010"); + expect(years.at(1).text()).toBe("2011"); }); it("should add in-selecting-range class for one year picker if year is between the start date and selecting date", () => { @@ -358,15 +342,15 @@ describe("YearPicker", () => { startDate={utils.newDate("2010-02-01")} selectingDate={utils.newDate("2011-01-01")} selectsRange - /> + />, ); const years = yearComponent.find( - ".react-datepicker__year-text--in-selecting-range" + ".react-datepicker__year-text--in-selecting-range", ); - expect(years.length).to.equal(2); - expect(years.at(0).text()).to.eq("2010"); - expect(years.at(1).text()).to.eq("2011"); + expect(years.length).toBe(2); + expect(years.at(0).text()).toBe("2010"); + expect(years.at(1).text()).toBe("2011"); }); it("should not add in-selecting-range class for one year picker if the start date is not defined", () => { @@ -376,13 +360,13 @@ describe("YearPicker", () => { date={utils.newDate("2015-01-01")} selectingDate={utils.newDate("2014-01-01")} selectsRange - /> + />, ); const years = yearComponent.find( - ".react-datepicker__year-text--in-selecting-range" + ".react-datepicker__year-text--in-selecting-range", ); - expect(years.length).to.equal(0); + expect(years.length).toBe(0); }); it("should not add in-selecting-range class for one year picker if the end date is defined", () => { @@ -393,13 +377,13 @@ describe("YearPicker", () => { selectingDate={utils.newDate("2014-01-01")} endDate={utils.newDate("2013-01-01")} selectsRange - /> + />, ); const years = yearComponent.find( - ".react-datepicker__month-text--in-selecting-range" + ".react-datepicker__month-text--in-selecting-range", ); - expect(years.length).to.equal(0); + expect(years.length).toBe(0); }); it("should add 'selecting-range-start' class to the start selecting year", () => { @@ -410,13 +394,13 @@ describe("YearPicker", () => { endDate={utils.newDate("2015-01-01")} selectingDate={utils.newDate("2012-01-01")} selectsStart - /> + />, ); const years = yearComponent.find( - ".react-datepicker__year-text--selecting-range-start" + ".react-datepicker__year-text--selecting-range-start", ); - expect(years.length).to.equal(1); - expect(years.at(0).text()).to.eq("2012"); + expect(years.length).toBe(1); + expect(years.at(0).text()).toBe("2012"); }); it("should add 'selecting-range-end' class to the end selecting year", () => { @@ -428,13 +412,13 @@ describe("YearPicker", () => { endDate={utils.newDate("2015-01-01")} selectingDate={utils.newDate("2014-01-01")} selectsEnd - /> + />, ); const years = yearComponent.find( - ".react-datepicker__year-text--selecting-range-end" + ".react-datepicker__year-text--selecting-range-end", ); - expect(years.length).to.equal(1); - expect(years.at(0).text()).to.eq("2014"); + expect(years.length).toBe(1); + expect(years.at(0).text()).toBe("2014"); }); }); }); @@ -445,7 +429,7 @@ describe("YearPicker", () => { it("should set the date to the selected year of the previous period when previous button clicked", () => { let date; const expectedDate = utils.getStartOfYear( - utils.setYear(utils.newDate(), 2008) + utils.setYear(utils.newDate(), 2008), ); const datePicker = TestUtils.renderIntoDocument( { onChange={(d) => { date = d; }} - /> + />, ); TestUtils.Simulate.focus(ReactDOM.findDOMNode(datePicker.input)); const calendar = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Calendar + Calendar, )[0]; const year = TestUtils.scryRenderedComponentsWithType( datePicker, - Year + Year, )[0]; const previousButton = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__navigation--previous" + "react-datepicker__navigation--previous", ); TestUtils.Simulate.click(previousButton); const allPreselectedYears = TestUtils.scryRenderedDOMComponentsWithClass( year, - className + className, ); - expect(utils.formatDate(date, "dd.MM.yyyy")).to.equal( - utils.formatDate(expectedDate, "dd.MM.yyyy") + expect(utils.formatDate(date, "dd.MM.yyyy")).toBe( + utils.formatDate(expectedDate, "dd.MM.yyyy"), ); - expect(allPreselectedYears.length).to.equal(1); + expect(allPreselectedYears.length).toBe(1); }); it("should set the date to the selected year of the next period when next button clicked", () => { let date; const expectedDate = utils.getStartOfYear( - utils.setYear(utils.newDate(), 2032) + utils.setYear(utils.newDate(), 2032), ); const datePicker = TestUtils.renderIntoDocument( { onChange={(d) => { date = d; }} - /> + />, ); TestUtils.Simulate.focus(ReactDOM.findDOMNode(datePicker.input)); const calendar = TestUtils.scryRenderedComponentsWithType( datePicker.calendar, - Calendar + Calendar, )[0]; const year = TestUtils.scryRenderedComponentsWithType( datePicker, - Year + Year, )[0]; const previousButton = TestUtils.findRenderedDOMComponentWithClass( calendar, - "react-datepicker__navigation--next" + "react-datepicker__navigation--next", ); TestUtils.Simulate.click(previousButton); const allPreselectedYears = TestUtils.scryRenderedDOMComponentsWithClass( year, - className + className, ); - expect(utils.formatDate(date, "dd.MM.yyyy")).to.equal( - utils.formatDate(expectedDate, "dd.MM.yyyy") + expect(utils.formatDate(date, "dd.MM.yyyy")).toBe( + utils.formatDate(expectedDate, "dd.MM.yyyy"), ); - expect(allPreselectedYears.length).to.equal(1); + expect(allPreselectedYears.length).toBe(1); }); }); @@ -542,7 +526,7 @@ describe("YearPicker", () => { onDayClick={onDayClick} yearItemNumber={12} {...props} - /> + />, ); const simulateLeft = (target) => @@ -563,55 +547,55 @@ describe("YearPicker", () => { const target = TestUtils.findRenderedDOMComponentWithClass( yearPicker, - "react-datepicker__year-text--selected" + "react-datepicker__year-text--selected", ); simulateLeft(target); - expect(utils.getYear(preSelected)).to.equal(2020); + expect(utils.getYear(preSelected)).toBe(2020); }); it("should preSelect and set 2022 on left arrow press", () => { const yearPicker = getPicker("2021-01-01"); const target = TestUtils.findRenderedDOMComponentWithClass( yearPicker, - "react-datepicker__year-text--selected" + "react-datepicker__year-text--selected", ); simulateRight(target); - expect(utils.getYear(preSelected)).to.equal(2022); + expect(utils.getYear(preSelected)).toBe(2022); }); it("should paginate from 2017 to 2016", () => { const yearPicker = getPicker("2017-01-01"); const target = TestUtils.findRenderedDOMComponentWithClass( yearPicker, - "react-datepicker__year-text--selected" + "react-datepicker__year-text--selected", ); simulateLeft(target); - expect(utils.getYear(preSelected)).to.equal(2016); + expect(utils.getYear(preSelected)).toBe(2016); }); it("should paginate from 2028 to 2029", () => { const yearPicker = getPicker("2028-01-01"); const target = TestUtils.findRenderedDOMComponentWithClass( yearPicker, - "react-datepicker__year-text--selected" + "react-datepicker__year-text--selected", ); simulateRight(target); - expect(utils.getYear(preSelected)).to.equal(2029); + expect(utils.getYear(preSelected)).toBe(2029); }); it("should select 2021 when Enter key is pressed", () => { const yearPicker = getPicker("2021-01-01"); const target = TestUtils.findRenderedDOMComponentWithClass( yearPicker, - "react-datepicker__year-text--selected" + "react-datepicker__year-text--selected", ); TestUtils.Simulate.keyDown(target, { key: "Enter", code: 13, which: 13 }); - expect(utils.getYear(selectedDay)).to.equal(2021); + expect(utils.getYear(selectedDay)).toBe(2021); }); it("should disable keyboard navigation", () => { const yearPicker = getPicker("2021-01-01", { @@ -620,11 +604,11 @@ describe("YearPicker", () => { const target = TestUtils.findRenderedDOMComponentWithClass( yearPicker, - "react-datepicker__year-text--selected" + "react-datepicker__year-text--selected", ); simulateRight(target); - expect(utils.getYear(preSelected)).to.equal(2021); + expect(utils.getYear(preSelected)).toBe(2021); }); }); }); diff --git a/yarn.lock b/yarn.lock index 37265ae16..8c348a0bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,11 +23,40 @@ "@babel/highlight" "^7.22.10" chalk "^2.4.2" +"@babel/code-frame@^7.12.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9": version "7.22.9" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== +"@babel/core@^7.11.6": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.11.tgz#8033acaa2aa24c3f814edaaa057f3ce0ba559c24" + integrity sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-compilation-targets" "^7.22.10" + "@babel/helper-module-transforms" "^7.22.9" + "@babel/helpers" "^7.22.11" + "@babel/parser" "^7.22.11" + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.11" + "@babel/types" "^7.22.11" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/core@^7.12.3", "@babel/core@^7.22.8", "@babel/core@^7.7.5": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.10.tgz#aad442c7bcd1582252cb4576747ace35bc122f35" @@ -58,7 +87,7 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.1" -"@babel/generator@^7.12.11", "@babel/generator@^7.22.10": +"@babel/generator@^7.12.11", "@babel/generator@^7.22.10", "@babel/generator@^7.7.2": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722" integrity sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A== @@ -108,6 +137,21 @@ "@babel/helper-split-export-declaration" "^7.22.6" "@nicolo-ribaudo/semver-v6" "^6.3.3" +"@babel/helper-create-class-features-plugin@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.11.tgz#4078686740459eeb4af3494a273ac09148dfb213" + integrity sha512-y1grdYL4WzmUDBRGK0pDbIoFd7UZKoDurDzWEoNMYoj1EL+foGRQNyPWDcC+YyegN5y1DUsFFmzjGijB3nSVAQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-function-name" "^7.22.5" + "@babel/helper-member-expression-to-functions" "^7.22.5" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + semver "^6.3.1" + "@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.5": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.6.tgz#87afd63012688ad792de430ceb3b6dc28e4e7a40" @@ -216,6 +260,15 @@ "@babel/traverse" "^7.22.5" "@babel/types" "^7.22.5" +"@babel/helper-replace-supers@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.9.tgz#cbdc27d6d8d18cd22c81ae4293765a5d9afd0779" + integrity sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg== + dependencies: + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-member-expression-to-functions" "^7.22.5" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-simple-access@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" @@ -280,6 +333,15 @@ "@babel/traverse" "^7.22.10" "@babel/types" "^7.22.10" +"@babel/helpers@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.11.tgz#b02f5d5f2d7abc21ab59eeed80de410ba70b056a" + integrity sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg== + dependencies: + "@babel/template" "^7.22.5" + "@babel/traverse" "^7.22.11" + "@babel/types" "^7.22.11" + "@babel/highlight@^7.22.10": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" @@ -289,6 +351,20 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.22.13": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.13.tgz#9cda839e5d3be9ca9e8c26b6dd69e7548f0cbf16" + integrity sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ== + dependencies: + "@babel/helper-validator-identifier" "^7.22.5" + chalk "^2.4.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.22.11": + version "7.22.14" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.14.tgz#c7de58e8de106e88efca42ce17f0033209dfd245" + integrity sha512-1KucTHgOvaw/LzCVrEOAyXkr9rQlp0A1HiHRYnSUE9dmb8PvPW7o5sscg+5169r54n3vGlbx6GevTE/Iw/P3AQ== + "@babel/parser@^7.14.7", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55" @@ -381,7 +457,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.12.13": +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -423,7 +506,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-syntax-import-meta@^7.10.4": +"@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== @@ -437,14 +520,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.22.5": +"@babel/plugin-syntax-jsx@^7.22.5", "@babel/plugin-syntax-jsx@^7.7.2": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== @@ -458,7 +541,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4": +"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== @@ -493,13 +576,20 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-top-level-await@^7.14.5": +"@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz#aac8d383b062c5072c647a31ef990c1d0af90272" + integrity sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-unicode-sets-regex@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" @@ -525,6 +615,16 @@ "@babel/helper-remap-async-to-generator" "^7.22.9" "@babel/plugin-syntax-async-generators" "^7.8.4" +"@babel/plugin-transform-async-generator-functions@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.11.tgz#dbe3b1ff5a52e2e5edc4b19a60d325a675ed2649" + integrity sha512-0pAlmeRJn6wU84zzZsEOx1JV1Jf8fqO9ok7wofIJwUnplYo247dcd24P+cMJht7ts9xkzdtB0EPHmOb7F+KzXw== + dependencies: + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.9" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-transform-async-to-generator@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz#c7a85f44e46f8952f6d27fe57c2ed3cc084c3775" @@ -556,6 +656,15 @@ "@babel/helper-create-class-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-class-static-block@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz#dc8cc6e498f55692ac6b4b89e56d87cec766c974" + integrity sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.22.11" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-transform-class-static-block@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz#3e40c46f048403472d6f4183116d5e46b1bff5ba" @@ -610,6 +719,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-dynamic-import@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz#2c7722d2a5c01839eaf31518c6ff96d408e447aa" + integrity sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-transform-dynamic-import@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz#d6908a8916a810468c4edff73b5b75bda6ad393e" @@ -626,6 +743,14 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-export-namespace-from@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz#b3c84c8f19880b6c7440108f8929caf6056db26c" + integrity sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-transform-export-namespace-from@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz#57c41cb1d0613d22f548fddd8b288eedb9973a5b" @@ -650,6 +775,14 @@ "@babel/helper-function-name" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-json-strings@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz#689a34e1eed1928a40954e37f74509f48af67835" + integrity sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-transform-json-strings@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz#14b64352fdf7e1f737eed68de1a1468bd2a77ec0" @@ -665,6 +798,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-logical-assignment-operators@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz#24c522a61688bde045b7d9bc3c2597a4d948fc9c" + integrity sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-transform-logical-assignment-operators@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz#66ae5f068fd5a9a5dc570df16f56c2a8462a9d6c" @@ -688,6 +829,15 @@ "@babel/helper-module-transforms" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-modules-commonjs@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.11.tgz#d7991d3abad199c03b68ee66a64f216c47ffdfae" + integrity sha512-o2+bg7GDS60cJMgz9jWqRUsWkMzLCxp+jFDeDUT5sjRlAxcJWZ2ylNdI7QQ2+CH5hWu7OnN+Cv3htt7AkSf96g== + dependencies: + "@babel/helper-module-transforms" "^7.22.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-simple-access" "^7.22.5" + "@babel/plugin-transform-modules-commonjs@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz#7d9875908d19b8c0536085af7b053fd5bd651bfa" @@ -697,6 +847,16 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" +"@babel/plugin-transform-modules-systemjs@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.11.tgz#3386be5875d316493b517207e8f1931d93154bb1" + integrity sha512-rIqHmHoMEOhI3VkVf5jQ15l539KrwhzqcBO6wdCNWPWc/JWt9ILNYNUssbRpeq0qWns8svuw8LnMNCvWBIJ8wA== + dependencies: + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-module-transforms" "^7.22.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.5" + "@babel/plugin-transform-modules-systemjs@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz#18c31410b5e579a0092638f95c896c2a98a5d496" @@ -730,6 +890,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-nullish-coalescing-operator@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz#debef6c8ba795f5ac67cd861a81b744c5d38d9fc" + integrity sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-transform-nullish-coalescing-operator@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz#f8872c65776e0b552e0849d7596cddd416c3e381" @@ -738,6 +906,14 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" +"@babel/plugin-transform-numeric-separator@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz#498d77dc45a6c6db74bb829c02a01c1d719cbfbd" + integrity sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-transform-numeric-separator@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz#57226a2ed9e512b9b446517ab6fa2d17abb83f58" @@ -746,6 +922,17 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-numeric-separator" "^7.10.4" +"@babel/plugin-transform-object-rest-spread@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.11.tgz#dbbb06ce783cd994a8f430d8cefa553e9b42ca62" + integrity sha512-nX8cPFa6+UmbepISvlf5jhQyaC7ASs/7UxHmMkuJ/k5xSHvDPPaibMo+v3TXwU/Pjqhep/nFNpd3zn4YR59pnw== + dependencies: + "@babel/compat-data" "^7.22.9" + "@babel/helper-compilation-targets" "^7.22.10" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.22.5" + "@babel/plugin-transform-object-rest-spread@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz#9686dc3447df4753b0b2a2fae7e8bc33cdc1f2e1" @@ -765,6 +952,14 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-replace-supers" "^7.22.5" +"@babel/plugin-transform-optional-catch-binding@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz#461cc4f578a127bb055527b3e77404cad38c08e0" + integrity sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-transform-optional-catch-binding@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz#842080be3076703be0eaf32ead6ac8174edee333" @@ -782,6 +977,15 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/plugin-syntax-optional-chaining" "^7.8.3" +"@babel/plugin-transform-optional-chaining@^7.22.12": + version "7.22.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.12.tgz#d7ebf6a88cd2f4d307b0e000ab630acd8124b333" + integrity sha512-7XXCVqZtyFWqjDsYDY4T45w4mlx1rf7aOgkc/Ww76xkgBiOlmjPkx36PBLHa1k1rwWvVgYMPsbuVnIamx2ZQJw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-transform-parameters@^7.20.7", "@babel/plugin-transform-parameters@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz#c3542dd3c39b42c8069936e48717a8d179d63a18" @@ -797,6 +1001,16 @@ "@babel/helper-create-class-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" +"@babel/plugin-transform-private-property-in-object@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz#ad45c4fc440e9cb84c718ed0906d96cf40f9a4e1" + integrity sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.22.11" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-transform-private-property-in-object@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz#07a77f28cbb251546a43d175a1dda4cf3ef83e32" @@ -948,7 +1162,93 @@ "@babel/helper-create-regexp-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/preset-env@^7.22.7", "@babel/preset-env@^7.9.0": +"@babel/preset-env@^7.22.10": + version "7.22.14" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.14.tgz#1cbb468d899f64fa71c53446f13b7ff8c0005cc1" + integrity sha512-daodMIoVo+ol/g+//c/AH+szBkFj4STQUikvBijRGL72Ph+w+AMTSh55DUETe8KJlPlDT1k/mp7NBfOuiWmoig== + dependencies: + "@babel/compat-data" "^7.22.9" + "@babel/helper-compilation-targets" "^7.22.10" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-option" "^7.22.5" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.22.5" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.22.5" + "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-import-assertions" "^7.22.5" + "@babel/plugin-syntax-import-attributes" "^7.22.5" + "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.22.5" + "@babel/plugin-transform-async-generator-functions" "^7.22.11" + "@babel/plugin-transform-async-to-generator" "^7.22.5" + "@babel/plugin-transform-block-scoped-functions" "^7.22.5" + "@babel/plugin-transform-block-scoping" "^7.22.10" + "@babel/plugin-transform-class-properties" "^7.22.5" + "@babel/plugin-transform-class-static-block" "^7.22.11" + "@babel/plugin-transform-classes" "^7.22.6" + "@babel/plugin-transform-computed-properties" "^7.22.5" + "@babel/plugin-transform-destructuring" "^7.22.10" + "@babel/plugin-transform-dotall-regex" "^7.22.5" + "@babel/plugin-transform-duplicate-keys" "^7.22.5" + "@babel/plugin-transform-dynamic-import" "^7.22.11" + "@babel/plugin-transform-exponentiation-operator" "^7.22.5" + "@babel/plugin-transform-export-namespace-from" "^7.22.11" + "@babel/plugin-transform-for-of" "^7.22.5" + "@babel/plugin-transform-function-name" "^7.22.5" + "@babel/plugin-transform-json-strings" "^7.22.11" + "@babel/plugin-transform-literals" "^7.22.5" + "@babel/plugin-transform-logical-assignment-operators" "^7.22.11" + "@babel/plugin-transform-member-expression-literals" "^7.22.5" + "@babel/plugin-transform-modules-amd" "^7.22.5" + "@babel/plugin-transform-modules-commonjs" "^7.22.11" + "@babel/plugin-transform-modules-systemjs" "^7.22.11" + "@babel/plugin-transform-modules-umd" "^7.22.5" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" + "@babel/plugin-transform-new-target" "^7.22.5" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.22.11" + "@babel/plugin-transform-numeric-separator" "^7.22.11" + "@babel/plugin-transform-object-rest-spread" "^7.22.11" + "@babel/plugin-transform-object-super" "^7.22.5" + "@babel/plugin-transform-optional-catch-binding" "^7.22.11" + "@babel/plugin-transform-optional-chaining" "^7.22.12" + "@babel/plugin-transform-parameters" "^7.22.5" + "@babel/plugin-transform-private-methods" "^7.22.5" + "@babel/plugin-transform-private-property-in-object" "^7.22.11" + "@babel/plugin-transform-property-literals" "^7.22.5" + "@babel/plugin-transform-regenerator" "^7.22.10" + "@babel/plugin-transform-reserved-words" "^7.22.5" + "@babel/plugin-transform-shorthand-properties" "^7.22.5" + "@babel/plugin-transform-spread" "^7.22.5" + "@babel/plugin-transform-sticky-regex" "^7.22.5" + "@babel/plugin-transform-template-literals" "^7.22.5" + "@babel/plugin-transform-typeof-symbol" "^7.22.5" + "@babel/plugin-transform-unicode-escapes" "^7.22.10" + "@babel/plugin-transform-unicode-property-regex" "^7.22.5" + "@babel/plugin-transform-unicode-regex" "^7.22.5" + "@babel/plugin-transform-unicode-sets-regex" "^7.22.5" + "@babel/preset-modules" "0.1.6-no-external-plugins" + "@babel/types" "^7.22.11" + babel-plugin-polyfill-corejs2 "^0.4.5" + babel-plugin-polyfill-corejs3 "^0.8.3" + babel-plugin-polyfill-regenerator "^0.5.2" + core-js-compat "^3.31.0" + semver "^6.3.1" + +"@babel/preset-env@^7.9.0": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.10.tgz#3263b9fe2c8823d191d28e61eac60a79f9ce8a0f" integrity sha512-riHpLb1drNkpLlocmSyEg4oYJIQFeXAK/d7rI6mbD0XsvoTOOweXDmQPG/ErxsEhWk3rl3Q/3F6RFQlVFS8m0A== @@ -1060,6 +1360,13 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== +"@babel/runtime@^7.12.5": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.11.tgz#7a9ba3bbe406ad6f9e8dd4da2ece453eb23a77a4" + integrity sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/runtime@^7.13.8", "@babel/runtime@^7.21.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438" @@ -1067,7 +1374,7 @@ dependencies: regenerator-runtime "^0.13.11" -"@babel/template@^7.22.5": +"@babel/template@^7.22.5", "@babel/template@^7.3.3": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== @@ -1092,6 +1399,31 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.11.tgz#71ebb3af7a05ff97280b83f05f8865ac94b2027c" + integrity sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ== + dependencies: + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-function-name" "^7.22.5" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.22.11" + "@babel/types" "^7.22.11" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.11", "@babel/types@^7.3.3": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.11.tgz#0e65a6a1d4d9cbaa892b2213f6159485fe632ea2" + integrity sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.5" + to-fast-properties "^2.0.0" + "@babel/types@^7.2.0", "@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.4.4": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03" @@ -1106,11 +1438,6 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@colors/colors@1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" - integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== - "@csstools/css-parser-algorithms@^2.3.0": version "2.3.0" resolved "https://registry.yarnpkg.com/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.0.tgz#0cc3a656dc2d638370ecf6f98358973bfbd00141" @@ -1199,11 +1526,214 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + "@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== +"@jest/console@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.6.4.tgz#a7e2d84516301f986bba0dd55af9d5fe37f46527" + integrity sha512-wNK6gC0Ha9QeEPSkeJedQuTQqxZYnDPuDcDhVuVatRvMkL4D0VTvFVZj+Yuh6caG2aOfzkUZ36KtCmLNtR02hw== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^29.6.3" + jest-util "^29.6.3" + slash "^3.0.0" + +"@jest/core@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.6.4.tgz#265ebee05ec1ff3567757e7a327155c8d6bdb126" + integrity sha512-U/vq5ccNTSVgYH7mHnodHmCffGWHJnz/E1BEWlLuK5pM4FZmGfBn/nrJGLjUsSmyx3otCeqc1T31F4y08AMDLg== + dependencies: + "@jest/console" "^29.6.4" + "@jest/reporters" "^29.6.4" + "@jest/test-result" "^29.6.4" + "@jest/transform" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + ci-info "^3.2.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^29.6.3" + jest-config "^29.6.4" + jest-haste-map "^29.6.4" + jest-message-util "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.6.4" + jest-resolve-dependencies "^29.6.4" + jest-runner "^29.6.4" + jest-runtime "^29.6.4" + jest-snapshot "^29.6.4" + jest-util "^29.6.3" + jest-validate "^29.6.3" + jest-watcher "^29.6.4" + micromatch "^4.0.4" + pretty-format "^29.6.3" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.6.4.tgz#78ec2c9f8c8829a37616934ff4fea0c028c79f4f" + integrity sha512-sQ0SULEjA1XUTHmkBRl7A1dyITM9yb1yb3ZNKPX3KlTd6IG7mWUe3e2yfExtC2Zz1Q+mMckOLHmL/qLiuQJrBQ== + dependencies: + "@jest/fake-timers" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.6.3" + +"@jest/expect-utils@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.6.4.tgz#17c7dfe6cec106441f218b0aff4b295f98346679" + integrity sha512-FEhkJhqtvBwgSpiTrocquJCdXPsyvNKcl/n7A3u7X4pVoF4bswm11c9d4AV+kfq2Gpv/mM8x7E7DsRvH+djkrg== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.6.4.tgz#1d6ae17dc68d906776198389427ab7ce6179dba6" + integrity sha512-Warhsa7d23+3X5bLbrbYvaehcgX5TLYhI03JKoedTiI8uJU4IhqYBWF7OSSgUyz4IgLpUYPkK0AehA5/fRclAA== + dependencies: + expect "^29.6.4" + jest-snapshot "^29.6.4" + +"@jest/fake-timers@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.6.4.tgz#45a27f093c43d5d989362a3e7a8c70c83188b4f6" + integrity sha512-6UkCwzoBK60edXIIWb0/KWkuj7R7Qq91vVInOe3De6DSpaEiqjKcJw4F7XUet24Wupahj9J6PlR09JqJ5ySDHw== + dependencies: + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" + "@types/node" "*" + jest-message-util "^29.6.3" + jest-mock "^29.6.3" + jest-util "^29.6.3" + +"@jest/globals@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.6.4.tgz#4f04f58731b062b44ef23036b79bdb31f40c7f63" + integrity sha512-wVIn5bdtjlChhXAzVXavcY/3PEjf4VqM174BM3eGL5kMxLiZD5CLnbmkEyA1Dwh9q8XjP6E8RwjBsY/iCWrWsA== + dependencies: + "@jest/environment" "^29.6.4" + "@jest/expect" "^29.6.4" + "@jest/types" "^29.6.3" + jest-mock "^29.6.3" + +"@jest/reporters@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.6.4.tgz#9d6350c8a2761ece91f7946e97ab0dabc06deab7" + integrity sha512-sxUjWxm7QdchdrD3NfWKrL8FBsortZeibSJv4XLjESOOjSUOkjQcb0ZHJwfhEGIvBvTluTzfG2yZWZhkrXJu8g== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^29.6.4" + "@jest/test-result" "^29.6.4" + "@jest/transform" "^29.6.4" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + "@types/node" "*" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^6.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-message-util "^29.6.3" + jest-util "^29.6.3" + jest-worker "^29.6.4" + slash "^3.0.0" + string-length "^4.0.1" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== + dependencies: + "@jridgewell/trace-mapping" "^0.3.18" + callsites "^3.0.0" + graceful-fs "^4.2.9" + +"@jest/test-result@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.6.4.tgz#adf5c79f6e1fb7405ad13d67d9e2b6ff54b54c6b" + integrity sha512-uQ1C0AUEN90/dsyEirgMLlouROgSY+Wc/JanVVk0OiUKa5UFh7sJpMEM3aoUBAz2BRNvUJ8j3d294WFuRxSyOQ== + dependencies: + "@jest/console" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.6.4.tgz#86aef66aaa22b181307ed06c26c82802fb836d7b" + integrity sha512-E84M6LbpcRq3fT4ckfKs9ryVanwkaIB0Ws9bw3/yP4seRLg/VaCZ/LgW0MCq5wwk4/iP/qnilD41aj2fsw2RMg== + dependencies: + "@jest/test-result" "^29.6.4" + graceful-fs "^4.2.9" + jest-haste-map "^29.6.4" + slash "^3.0.0" + +"@jest/transform@^29.6.4": + version "29.6.4" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.6.4.tgz#a6bc799ef597c5d85b2e65a11fd96b6b239bab5a" + integrity sha512-8thgRSiXUqtr/pPGY/OsyHuMjGyhVnWrFAwoxmIemlBuiMyU1WFs0tXoNxzcr4A4uErs/ABre76SGmrr5ab/AA== + dependencies: + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.6.4" + jest-regex-util "^29.6.3" + jest-util "^29.6.3" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.2" + +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== + dependencies: + "@jest/schemas" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.3" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" @@ -1218,6 +1748,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" @@ -1236,7 +1771,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== @@ -1249,6 +1784,14 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@jridgewell/trace-mapping@^0.3.18": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@leichtgewicht/ip-codec@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" @@ -1362,12 +1905,10 @@ "@sigstore/protobuf-specs" "^0.1.0" tuf-js "^1.1.7" -"@sinonjs/commons@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" - integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg== - dependencies: - type-detect "4.0.8" +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== "@sinonjs/commons@^3.0.0": version "3.0.0" @@ -1376,31 +1917,35 @@ dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^10.0.2", "@sinonjs/fake-timers@^10.3.0": +"@sinonjs/fake-timers@^10.0.2": version "10.3.0" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: "@sinonjs/commons" "^3.0.0" -"@sinonjs/samsam@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.0.tgz#0d488c91efb3fa1442e26abea81759dfc8b5ac60" - integrity sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew== +"@testing-library/dom@^9.0.0": + version "9.3.1" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.3.1.tgz#8094f560e9389fb973fe957af41bf766937a9ee9" + integrity sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w== dependencies: - "@sinonjs/commons" "^2.0.0" - lodash.get "^4.4.2" - type-detect "^4.0.8" - -"@sinonjs/text-encoding@^0.7.1": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918" - integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ== + "@babel/code-frame" "^7.10.4" + "@babel/runtime" "^7.12.5" + "@types/aria-query" "^5.0.1" + aria-query "5.1.3" + chalk "^4.1.0" + dom-accessibility-api "^0.5.9" + lz-string "^1.5.0" + pretty-format "^27.0.2" -"@socket.io/component-emitter@~3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" - integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== +"@testing-library/react@^14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.0.0.tgz#59030392a6792450b9ab8e67aea5f3cc18d6347c" + integrity sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg== + dependencies: + "@babel/runtime" "^7.12.5" + "@testing-library/dom" "^9.0.0" + "@types/react-dom" "^18.0.0" "@tootallnate/once@1": version "1.1.2" @@ -1425,6 +1970,44 @@ "@tufjs/canonical-json" "1.0.0" minimatch "^9.0.0" +"@types/aria-query@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc" + integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q== + +"@types/babel__core@^7.1.14": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.1.tgz#916ecea274b0c776fec721e333e55762d3a9614b" + integrity sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" + integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" + integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.1.tgz#dd6f1d2411ae677dcb2db008c962598be31d6acf" + integrity sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg== + dependencies: + "@babel/types" "^7.20.7" + "@types/body-parser@*": version "1.19.2" resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" @@ -1455,18 +2038,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.13" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94" - integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== - dependencies: - "@types/node" "*" - "@types/eslint-scope@^3.7.3": version "3.7.4" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" @@ -1508,6 +2079,13 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/graceful-fs@^4.1.3": + version "4.1.6" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" + integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== + dependencies: + "@types/node" "*" + "@types/http-errors@*": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.1.tgz#20172f9578b225f6c7da63446f56d4ce108d5a65" @@ -1520,11 +2098,42 @@ dependencies: "@types/node" "*" -"@types/istanbul-lib-coverage@^2.0.1": +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== +"@types/istanbul-lib-report@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" + integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" + integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@^29.5.4": + version "29.5.4" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.4.tgz#9d0a16edaa009a71e6a71a999acd582514dab566" + integrity sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A== + dependencies: + expect "^29.0.0" + pretty-format "^29.0.0" + +"@types/jsdom@^20.0.0": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808" + integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ== + dependencies: + "@types/node" "*" + "@types/tough-cookie" "*" + parse5 "^7.0.0" + "@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.12" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" @@ -1550,7 +2159,7 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== -"@types/node@*", "@types/node@>=10.0.0": +"@types/node@*": version "20.4.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.1.tgz#a6033a8718653c50ac4962977e14d0f984d9527d" integrity sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg== @@ -1560,6 +2169,11 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== +"@types/prop-types@*": + version "15.7.5" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" + integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== + "@types/qs@*": version "6.9.7" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" @@ -1570,6 +2184,22 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== +"@types/react-dom@^18.0.0": + version "18.2.7" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.7.tgz#67222a08c0a6ae0a0da33c3532348277c70abb63" + integrity sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA== + dependencies: + "@types/react" "*" + +"@types/react@*": + version "18.2.21" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.21.tgz#774c37fd01b522d0b91aed04811b58e4e0514ed9" + integrity sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/resolve@0.0.8": version "0.0.8" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" @@ -1582,6 +2212,11 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== +"@types/scheduler@*": + version "0.16.3" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" + integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== + "@types/send@*": version "0.17.1" resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301" @@ -1613,6 +2248,16 @@ dependencies: "@types/node" "*" +"@types/stack-utils@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" + integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== + +"@types/tough-cookie@*": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" + integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw== + "@types/ws@^8.5.5": version "8.5.5" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.5.tgz#af587964aa06682702ee6dcbc7be41a80e4b28eb" @@ -1620,6 +2265,18 @@ dependencies: "@types/node" "*" +"@types/yargs-parser@*": + version "21.0.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" + integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== + +"@types/yargs@^17.0.8": + version "17.0.24" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902" + integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw== + dependencies: + "@types/yargs-parser" "*" + "@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": version "1.11.6" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" @@ -1788,6 +2445,11 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + abbrev@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -1801,6 +2463,14 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" +acorn-globals@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" + integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== + dependencies: + acorn "^8.1.0" + acorn-walk "^8.0.2" + acorn-import-assertions@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" @@ -1811,7 +2481,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: +acorn-walk@^8.0.2: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.1.0, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: version "8.10.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== @@ -1896,10 +2571,12 @@ ansi-align@^3.0.0: dependencies: string-width "^4.1.0" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" ansi-escapes@^5.0.0: version "5.0.0" @@ -1918,11 +2595,6 @@ ansi-regex@^2.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== -ansi-regex@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" - integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== - ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -1952,12 +2624,17 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + ansi-styles@^6.0.0, ansi-styles@^6.1.0: version "6.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== -anymatch@~3.1.2: +anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -1995,6 +2672,13 @@ argv@0.0.2: resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" integrity sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw== +aria-query@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" + integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== + dependencies: + deep-equal "^2.0.5" + array-buffer-byte-length@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" @@ -2099,11 +2783,6 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - ast-types@^0.14.2: version "0.14.2" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" @@ -2116,6 +2795,11 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -2149,6 +2833,19 @@ babel-generator@^6.18.0: source-map "^0.5.7" trim-right "^1.0.1" +babel-jest@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.6.4.tgz#98dbc45d1c93319c82a8ab4a478b670655dd2585" + integrity sha512-meLj23UlSLddj6PC+YTOFRgDAtjnZom8w/ACsrx0gtPtv5cJZk0A5Unk5bV4wixD7XaPCN1fQvpww8czkZURmw== + dependencies: + "@jest/transform" "^29.6.4" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^29.6.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" + babel-loader@^9.1.3: version "9.1.3" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-9.1.3.tgz#3d0e01b4e69760cc694ee306fe16d358aa1c6f9a" @@ -2164,6 +2861,27 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.1.14" + "@types/babel__traverse" "^7.0.6" + babel-plugin-polyfill-corejs2@^0.4.4, babel-plugin-polyfill-corejs2@^0.4.5: version "0.4.5" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.5.tgz#8097b4cb4af5b64a1d11332b6fb72ef5e64a054c" @@ -2222,6 +2940,32 @@ babel-preset-airbnb@^5.0.0: "@babel/preset-react" "^7.9.4" babel-plugin-transform-react-remove-prop-types "^0.4.24" +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.8.3" + "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== + dependencies: + babel-plugin-jest-hoist "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -2281,11 +3025,6 @@ balanced-match@^2.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-2.0.0.tgz#dc70f920d78db8b858535795867bf48f820633d9" integrity sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA== -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== - batch@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" @@ -2319,24 +3058,6 @@ body-parser@1.20.1: type-is "~1.6.18" unpipe "1.0.0" -body-parser@^1.19.0: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - bonjour-service@^1.0.11: version "1.1.1" resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.1.1.tgz#960948fa0e0153f5d26743ab15baf8e33752c135" @@ -2395,11 +3116,6 @@ brotli-size@4.0.0: dependencies: duplexer "0.1.1" -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== - browserslist@^4.14.5, browserslist@^4.21.9: version "4.21.9" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635" @@ -2410,6 +3126,20 @@ browserslist@^4.14.5, browserslist@^4.21.9: node-releases "^2.0.12" update-browserslist-db "^1.0.11" +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -2496,7 +3226,12 @@ camelcase-keys@^7.0.0: quick-lru "^5.1.1" type-fest "^1.2.1" -camelcase@^6.0.0, camelcase@^6.2.0, camelcase@^6.3.0: +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.2.0, camelcase@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -2506,19 +3241,6 @@ caniuse-lite@^1.0.30001503: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz#418aefeed9d024cd3129bfae0ccc782d4cb8f12b" integrity sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA== -chai@^4.2.0: - version "4.3.7" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" - integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^4.1.2" - get-func-name "^2.0.0" - loupe "^2.3.1" - pathval "^1.1.1" - type-detect "^4.0.5" - chalk@5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" @@ -2535,7 +3257,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2552,10 +3274,10 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -check-error@^1.0.2: +char-regex@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== cheerio-select@^2.1.0: version "2.1.0" @@ -2582,7 +3304,7 @@ cheerio@^1.0.0-rc.3: parse5 "^7.0.0" parse5-htmlparser2-tree-adapter "^7.0.0" -chokidar@3.5.3, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1, chokidar@^3.5.3: +"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -2607,6 +3329,16 @@ chrome-trace-event@^1.0.2: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== +ci-info@^3.2.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" + integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== + +cjs-module-lexer@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== + classnames@^2.2.6: version "2.3.2" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924" @@ -2646,6 +3378,15 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -2671,6 +3412,11 @@ codecov@^3.5.0: teeny-request "7.1.1" urlgrey "1.0.0" +collect-v8-coverage@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -2715,6 +3461,13 @@ colors@1.4.0: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + commander@11.0.0: version "11.0.0" resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" @@ -2765,16 +3518,6 @@ connect-history-api-fallback@^2.0.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== -connect@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" - integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== - dependencies: - debug "2.6.9" - finalhandler "1.1.2" - parseurl "~1.3.3" - utils-merge "1.0.1" - console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -2787,7 +3530,7 @@ content-disposition@0.5.4: dependencies: safe-buffer "5.2.1" -content-type@~1.0.4, content-type@~1.0.5: +content-type@~1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== @@ -2797,6 +3540,11 @@ convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -2807,11 +3555,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== - core-js-compat@^3.31.0: version "3.31.1" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.31.1.tgz#5084ad1a46858df50ff89ace152441a63ba7aae0" @@ -2834,14 +3577,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@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" @@ -2904,15 +3639,41 @@ css-what@^6.1.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +cssom@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" + integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + +csstype@^3.0.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" + integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== -custom-event@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" - integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== +data-urls@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" + integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== + dependencies: + abab "^2.0.6" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" date-fns@^2.30.0: version "2.30.0" @@ -2921,11 +3682,6 @@ date-fns@^2.30.0: dependencies: "@babel/runtime" "^7.21.0" -date-format@^4.0.14: - version "4.0.14" - resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" - integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== - debug@2.6.9, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -2933,7 +3689,7 @@ debug@2.6.9, debug@^2.6.8: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, 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== @@ -2960,28 +3716,55 @@ decamelize@^1.1.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - decamelize@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-5.0.1.tgz#db11a92e58c741ef339fb0a2868d8a06a9a7b1e9" integrity sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA== -deep-eql@^4.1.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" - integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== +decimal.js@^10.4.2: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + +dedent@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" + integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== + +deep-equal@^2.0.5: + version "2.2.2" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.2.tgz#9b2635da569a13ba8e1cc159c2f744071b115daa" + integrity sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA== dependencies: - type-detect "^4.0.0" + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + es-get-iterator "^1.1.3" + get-intrinsic "^1.2.1" + is-arguments "^1.1.1" + is-array-buffer "^3.0.2" + is-date-object "^1.0.5" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + isarray "^2.0.5" + object-is "^1.1.5" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.0" + side-channel "^1.0.4" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.1" + which-typed-array "^1.1.9" deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" @@ -3002,6 +3785,11 @@ define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" @@ -3029,25 +3817,20 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + detect-node@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== -di@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" - integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -diff@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" - integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== dir-glob@^3.0.1: version "3.0.1" @@ -3087,15 +3870,10 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-serialize@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" - integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== - dependencies: - custom-event "~1.0.0" - ent "~2.2.0" - extend "^3.0.0" - void-elements "^2.0.0" +dom-accessibility-api@^0.5.9: + version "0.5.16" + resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" + integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== dom-serializer@^2.0.0: version "2.0.0" @@ -3116,6 +3894,13 @@ domelementtype@^2.3.0: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== +domexception@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" + integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== + dependencies: + webidl-conversions "^7.0.0" + domhandler@^5.0.2, domhandler@^5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" @@ -3157,6 +3942,11 @@ electron-to-chromium@^1.4.431: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.455.tgz#81fe4353ac970eb971c07088c8da8b7f6280ddc9" integrity sha512-8tgdX0Odl24LtmLwxotpJCVjIndN559AvaOtd67u+2mo+IDsgsTF580NB+uuDCqsHw8yFg53l5+imFV9Fw3cbA== +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -3184,27 +3974,6 @@ encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -engine.io-parser@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.1.0.tgz#d593d6372d7f79212df48f807b8cace1ea1cb1b8" - integrity sha512-enySgNiK5tyZFynt3z7iqBR+Bto9EVVVvDFuTT0ioHCGbzirZVGDGiQjZzEp8hWl6hd5FSVytJGuScX1C1C35w== - -engine.io@~6.5.0: - version "6.5.1" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.1.tgz#59725f8593ccc891abb47f1efcdc52a089525a56" - integrity sha512-mGqhI+D7YxS9KJMppR6Iuo37Ed3abhU8NdfgSvJSDUafQutrN+sPTncJYTyM9+tkhSmWodKtVYGPPHyXJEwEQA== - 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.1.0" - ws "~8.11.0" - enhanced-resolve@^5.15.0: version "5.15.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" @@ -3213,11 +3982,6 @@ enhanced-resolve@^5.15.0: graceful-fs "^4.2.4" tapable "^2.2.0" -ent@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== - entities@^4.2.0, entities@^4.4.0: version "4.5.0" resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" @@ -3371,6 +4135,21 @@ es-array-method-boxes-properly@^1.0.0: resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-get-iterator@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" + integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" + is-arguments "^1.1.1" + is-map "^2.0.2" + is-set "^2.0.2" + is-string "^1.0.7" + isarray "^2.0.5" + stop-iteration-iterator "^1.0.0" + es-module-lexer@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f" @@ -3411,16 +4190,32 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - 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 sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + eslint-import-resolver-node@^0.3.7: version "0.3.7" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" @@ -3608,7 +4403,7 @@ espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" -esprima@^4.0.0: +esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -3706,6 +4501,22 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^29.0.0, expect@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.6.4.tgz#a6e6f66d4613717859b2fe3da98a739437b6f4b8" + integrity sha512-F2W2UyQ8XYyftHT57dtfg8Ue3X5qLgm2sSug0ivvLRH/VKNRL/pDxg/TH7zVzbQB0tu80clNFy6LU7OS/VSEKA== + dependencies: + "@jest/expect-utils" "^29.6.4" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.6.4" + jest-message-util "^29.6.3" + jest-util "^29.6.3" + exponential-backoff@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" @@ -3748,11 +4559,6 @@ express@^4.17.1, express@^4.17.3: utils-merge "1.0.1" vary "~1.1.2" -extend@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - 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" @@ -3774,7 +4580,7 @@ fast-glob@^3.2.9, fast-glob@^3.3.0: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@^2.0.0: +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== @@ -3810,6 +4616,13 @@ faye-websocket@^0.11.3: dependencies: websocket-driver ">=0.5.1" +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -3829,19 +4642,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - finalhandler@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" @@ -3863,15 +4663,7 @@ find-cache-dir@^4.0.0: common-path-prefix "^3.0.0" pkg-dir "^7.0.0" -find-up@5.0.0, find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-up@^4.0.0: +find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -3879,6 +4671,14 @@ find-up@^4.0.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-up@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" @@ -3895,12 +4695,7 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -flatted@^3.1.0, flatted@^3.2.7: +flatted@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== @@ -3933,6 +4728,15 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -3943,15 +4747,6 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -3976,6 +4771,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@^2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" @@ -4025,11 +4825,6 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== - get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" @@ -4040,6 +4835,11 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-proto "^1.0.1" has-symbols "^1.0.3" +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + 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" @@ -4072,18 +4872,6 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^10.2.2: version "10.3.3" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.3.tgz#8360a4ffdd6ed90df84aa8d52f21f452e86a123b" @@ -4095,7 +4883,7 @@ glob@^10.2.2: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" -glob@^7.1.3, glob@^7.1.4, glob@^7.1.7: +glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -4179,7 +4967,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -4264,11 +5052,6 @@ has@^1.0.0, has@^1.0.3: dependencies: function-bind "^1.1.1" -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - highlight.js@^11.0.1: version "11.8.0" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.8.0.tgz#966518ea83257bae2e7c9a48596231856555bb65" @@ -4306,6 +5089,13 @@ html-element-map@^1.2.0: 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" + integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== + dependencies: + whatwg-encoding "^2.0.0" + html-entities@^2.1.0, html-entities@^2.3.2: version "2.4.0" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.4.0.tgz#edd0cee70402584c8c76cc2c0556db09d1f45061" @@ -4405,7 +5195,7 @@ http-proxy@^1.18.1: follow-redirects "^1.0.0" requires-port "^1.0.0" -https-proxy-agent@^5.0.0: +https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== @@ -4442,7 +5232,7 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: +iconv-lite@0.6.3, iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -4537,7 +5327,7 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -internal-slot@^1.0.3, internal-slot@^1.0.5: +internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== @@ -4573,6 +5363,14 @@ ipaddr.js@^2.0.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.1.0.tgz#2119bc447ff8c257753b196fc5f1ce08a4cdf39f" integrity sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ== +is-arguments@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" @@ -4621,7 +5419,7 @@ is-core-module@^2.11.0, is-core-module@^2.12.0, is-core-module@^2.13.0, is-core- dependencies: has "^1.0.3" -is-date-object@^1.0.1: +is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== @@ -4653,6 +5451,11 @@ is-fullwidth-code-point@^4.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -4665,6 +5468,11 @@ is-lambda@^1.0.1: resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== +is-map@^2.0.1, is-map@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" + integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== + is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" @@ -4697,11 +5505,6 @@ is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - is-plain-obj@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" @@ -4719,6 +5522,11 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + is-reference@^1.1.2: version "1.2.1" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" @@ -4734,6 +5542,11 @@ is-regex@^1.0.5, is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-set@^2.0.1, is-set@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" + integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== + is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -4781,10 +5594,10 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.0" -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-weakmap@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" + integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== is-weakref@^1.0.2: version "1.0.2" @@ -4793,6 +5606,14 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-weakset@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" + integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" @@ -4800,11 +5621,6 @@ 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 sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== - isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -4815,11 +5631,6 @@ isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== -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" @@ -4863,7 +5674,7 @@ istanbul-lib-instrument@^1.7.3: istanbul-lib-coverage "^1.2.1" semver "^5.3.0" -istanbul-lib-instrument@^5.1.0: +istanbul-lib-instrument@^5.0.4: version "5.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== @@ -4874,6 +5685,17 @@ istanbul-lib-instrument@^5.1.0: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" +istanbul-lib-instrument@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.0.tgz#7a8af094cbfff1d5bb280f62ce043695ae8dd5b8" + integrity sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + istanbul-lib-report@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" @@ -4883,7 +5705,7 @@ istanbul-lib-report@^3.0.0: make-dir "^3.0.0" supports-color "^7.1.0" -istanbul-lib-source-maps@^4.0.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" integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== @@ -4892,7 +5714,15 @@ istanbul-lib-source-maps@^4.0.1: istanbul-lib-coverage "^3.0.0" source-map "^0.6.1" -istanbul-reports@^3.0.5, istanbul-reports@^3.1.4: +istanbul-reports@^3.1.3: + version "3.1.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" + integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +istanbul-reports@^3.1.4: version "3.1.5" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae" integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== @@ -4905,9 +5735,362 @@ jackspeak@^2.0.3: resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.2.1.tgz#655e8cf025d872c9c03d3eb63e8f0c024fef16a6" integrity sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw== dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + +jest-changed-files@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.6.3.tgz#97cfdc93f74fb8af2a1acb0b78f836f1fb40c449" + integrity sha512-G5wDnElqLa4/c66ma5PG9eRjE342lIbF6SUnTJi26C3J28Fv2TVY2rOyKB9YGbSA5ogwevgmxc4j4aVjrEK6Yg== + dependencies: + execa "^5.0.0" + jest-util "^29.6.3" + p-limit "^3.1.0" + +jest-circus@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.6.4.tgz#f074c8d795e0cc0f2ebf0705086b1be6a9a8722f" + integrity sha512-YXNrRyntVUgDfZbjXWBMPslX1mQ8MrSG0oM/Y06j9EYubODIyHWP8hMUbjbZ19M3M+zamqEur7O80HODwACoJw== + dependencies: + "@jest/environment" "^29.6.4" + "@jest/expect" "^29.6.4" + "@jest/test-result" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^1.0.0" + is-generator-fn "^2.0.0" + jest-each "^29.6.3" + jest-matcher-utils "^29.6.4" + jest-message-util "^29.6.3" + jest-runtime "^29.6.4" + jest-snapshot "^29.6.4" + jest-util "^29.6.3" + p-limit "^3.1.0" + pretty-format "^29.6.3" + pure-rand "^6.0.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-cli@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.6.4.tgz#ad52f2dfa1b0291de7ec7f8d7c81ac435521ede0" + integrity sha512-+uMCQ7oizMmh8ZwRfZzKIEszFY9ksjjEQnTEMTaL7fYiL3Kw4XhqT9bYh+A4DQKUb67hZn2KbtEnDuHvcgK4pQ== + dependencies: + "@jest/core" "^29.6.4" + "@jest/test-result" "^29.6.4" + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + import-local "^3.0.2" + jest-config "^29.6.4" + jest-util "^29.6.3" + jest-validate "^29.6.3" + prompts "^2.0.1" + yargs "^17.3.1" + +jest-config@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.6.4.tgz#eff958ee41d4e1ee7a6106d02b74ad9fc427d79e" + integrity sha512-JWohr3i9m2cVpBumQFv2akMEnFEPVOh+9L2xIBJhJ0zOaci2ZXuKJj0tgMKQCBZAKA09H049IR4HVS/43Qb19A== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.6.4" + "@jest/types" "^29.6.3" + babel-jest "^29.6.4" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-circus "^29.6.4" + jest-environment-node "^29.6.4" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.6.4" + jest-runner "^29.6.4" + jest-util "^29.6.3" + jest-validate "^29.6.3" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^29.6.3" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.6.4.tgz#85aaa6c92a79ae8cd9a54ebae8d5b6d9a513314a" + integrity sha512-9F48UxR9e4XOEZvoUXEHSWY4qC4zERJaOfrbBg9JpbJOO43R1vN76REt/aMGZoY6GD5g84nnJiBIVlscegefpw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.6.3" + +jest-docblock@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.6.3.tgz#293dca5188846c9f7c0c2b1bb33e5b11f21645f2" + integrity sha512-2+H+GOTQBEm2+qFSQ7Ma+BvyV+waiIFxmZF5LdpBsAEjWX8QYjSCa4FrkIYtbfXUJJJnFCYrOtt6TZ+IAiTjBQ== + dependencies: + detect-newline "^3.0.0" + +jest-each@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.6.3.tgz#1956f14f5f0cb8ae0b2e7cabc10bb03ec817c142" + integrity sha512-KoXfJ42k8cqbkfshW7sSHcdfnv5agDdHCPA87ZBdmHP+zJstTJc0ttQaJ/x7zK6noAL76hOuTIJ6ZkQRS5dcyg== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + jest-get-type "^29.6.3" + jest-util "^29.6.3" + pretty-format "^29.6.3" + +jest-environment-jsdom@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.6.4.tgz#0daf44454041f9e1ef7fa82eb1bd43426a82eb1c" + integrity sha512-K6wfgUJ16DoMs02JYFid9lOsqfpoVtyJxpRlnTxUHzvZWBnnh2VNGRB9EC1Cro96TQdq5TtSjb3qUjNaJP9IyA== + dependencies: + "@jest/environment" "^29.6.4" + "@jest/fake-timers" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/jsdom" "^20.0.0" + "@types/node" "*" + jest-mock "^29.6.3" + jest-util "^29.6.3" + jsdom "^20.0.0" + +jest-environment-node@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.6.4.tgz#4ce311549afd815d3cafb49e60a1e4b25f06d29f" + integrity sha512-i7SbpH2dEIFGNmxGCpSc2w9cA4qVD+wfvg2ZnfQ7XVrKL0NA5uDVBIiGH8SR4F0dKEv/0qI5r+aDomDf04DpEQ== + dependencies: + "@jest/environment" "^29.6.4" + "@jest/fake-timers" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.6.3" + jest-util "^29.6.3" + +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + +jest-haste-map@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.6.4.tgz#97143ce833829157ea7025204b08f9ace609b96a" + integrity sha512-12Ad+VNTDHxKf7k+M65sviyynRoZYuL1/GTuhEVb8RYsNSNln71nANRb/faSyWvx0j+gHcivChXHIoMJrGYjog== + dependencies: + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^29.6.3" + jest-util "^29.6.3" + jest-worker "^29.6.4" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + +jest-leak-detector@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.6.3.tgz#b9661bc3aec8874e59aff361fa0c6d7cd507ea01" + integrity sha512-0kfbESIHXYdhAdpLsW7xdwmYhLf1BRu4AA118/OxFm0Ho1b2RcTmO4oF6aAMaxpxdxnJ3zve2rgwzNBD4Zbm7Q== + dependencies: + jest-get-type "^29.6.3" + pretty-format "^29.6.3" + +jest-matcher-utils@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.6.4.tgz#327db7ababea49455df3b23e5d6109fe0c709d24" + integrity sha512-KSzwyzGvK4HcfnserYqJHYi7sZVqdREJ9DMPAKVbS98JsIAvumihaNUbjrWw0St7p9IY7A9UskCW5MYlGmBQFQ== + dependencies: + chalk "^4.0.0" + jest-diff "^29.6.4" + jest-get-type "^29.6.3" + pretty-format "^29.6.3" + +jest-message-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.6.3.tgz#bce16050d86801b165f20cfde34dc01d3cf85fbf" + integrity sha512-FtzaEEHzjDpQp51HX4UMkPZjy46ati4T5pEMyM6Ik48ztu4T9LQplZ6OsimHx7EuM9dfEh5HJa6D3trEftu3dA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^29.6.3" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^29.6.3" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.6.3.tgz#433f3fd528c8ec5a76860177484940628bdf5e0a" + integrity sha512-Z7Gs/mOyTSR4yPsaZ72a/MtuK6RnC3JYqWONe48oLaoEcYwEDxqvbXz85G4SJrm2Z5Ar9zp6MiHF4AlFlRM4Pg== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-util "^29.6.3" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + +jest-resolve-dependencies@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.4.tgz#20156b33c7eacbb6bb77aeba4bed0eab4a3f8734" + integrity sha512-7+6eAmr1ZBF3vOAJVsfLj1QdqeXG+WYhidfLHBRZqGN24MFRIiKG20ItpLw2qRAsW/D2ZUUmCNf6irUr/v6KHA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.6.4" + +jest-resolve@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.6.4.tgz#e34cb06f2178b429c38455d98d1a07572ac9faa3" + integrity sha512-fPRq+0vcxsuGlG0O3gyoqGTAxasagOxEuyoxHeyxaZbc9QNek0AmJWSkhjlMG+mTsj+8knc/mWb3fXlRNVih7Q== + dependencies: + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.6.4" + jest-pnp-resolver "^1.2.2" + jest-util "^29.6.3" + jest-validate "^29.6.3" + resolve "^1.20.0" + resolve.exports "^2.0.0" + slash "^3.0.0" + +jest-runner@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.6.4.tgz#b3b8ccb85970fde0fae40c73ee11eb75adccfacf" + integrity sha512-SDaLrMmtVlQYDuG0iSPYLycG8P9jLI+fRm8AF/xPKhYDB2g6xDWjXBrR5M8gEWsK6KVFlebpZ4QsrxdyIX1Jaw== + dependencies: + "@jest/console" "^29.6.4" + "@jest/environment" "^29.6.4" + "@jest/test-result" "^29.6.4" + "@jest/transform" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.13.1" + graceful-fs "^4.2.9" + jest-docblock "^29.6.3" + jest-environment-node "^29.6.4" + jest-haste-map "^29.6.4" + jest-leak-detector "^29.6.3" + jest-message-util "^29.6.3" + jest-resolve "^29.6.4" + jest-runtime "^29.6.4" + jest-util "^29.6.3" + jest-watcher "^29.6.4" + jest-worker "^29.6.4" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.6.4.tgz#b0bc495c9b6b12a0a7042ac34ca9bb85f8cd0ded" + integrity sha512-s/QxMBLvmwLdchKEjcLfwzP7h+jsHvNEtxGP5P+Fl1FMaJX2jMiIqe4rJw4tFprzCwuSvVUo9bn0uj4gNRXsbA== + dependencies: + "@jest/environment" "^29.6.4" + "@jest/fake-timers" "^29.6.4" + "@jest/globals" "^29.6.4" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.6.4" + "@jest/transform" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^29.6.4" + jest-message-util "^29.6.3" + jest-mock "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.6.4" + jest-snapshot "^29.6.4" + jest-util "^29.6.3" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-snapshot@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.6.4.tgz#9833eb6b66ff1541c7fd8ceaa42d541f407b4876" + integrity sha512-VC1N8ED7+4uboUKGIDsbvNAZb6LakgIPgAF4RSpF13dN6YaMokfRqO+BaqK4zIh6X3JffgwbzuGqDEjHm/MrvA== + dependencies: + "@babel/core" "^7.11.6" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.6.4" + "@jest/transform" "^29.6.4" + "@jest/types" "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^29.6.4" + graceful-fs "^4.2.9" + jest-diff "^29.6.4" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.6.4" + jest-message-util "^29.6.3" + jest-util "^29.6.3" + natural-compare "^1.4.0" + pretty-format "^29.6.3" + semver "^7.5.3" + +jest-util@^29.0.0, jest-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.6.3.tgz#e15c3eac8716440d1ed076f09bc63ace1aebca63" + integrity sha512-QUjna/xSy4B32fzcKTSz1w7YYzgiHrjjJjevdRf61HYk998R5vVMMNmrHESYZVDS5DSWs+1srPLPKxXPkeSDOA== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.6.3.tgz#a75fca774cfb1c5758c70d035d30a1f9c2784b4d" + integrity sha512-e7KWZcAIX+2W1o3cHfnqpGajdCs1jSM3DkXjGeLSNmCazv1EeI1ggTeK5wdZhF+7N+g44JI2Od3veojoaumlfg== + dependencies: + "@jest/types" "^29.6.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^29.6.3" + leven "^3.1.0" + pretty-format "^29.6.3" + +jest-watcher@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.6.4.tgz#633eb515ae284aa67fd6831f1c9d1b534cf0e0ba" + integrity sha512-oqUWvx6+On04ShsT00Ir9T4/FvBeEh2M9PTubgITPxDa739p4hoQweWPRGyYeaojgT0xTpZKF0Y/rSY1UgMxvQ== + dependencies: + "@jest/test-result" "^29.6.4" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.13.1" + jest-util "^29.6.3" + string-length "^4.0.1" jest-worker@^24.0.0: version "24.9.0" @@ -4935,6 +6118,26 @@ jest-worker@^27.4.5: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.6.4.tgz#f34279f4afc33c872b470d4af21b281ac616abd3" + integrity sha512-6dpvFV4WjcWbDVGgHTWo/aupl8/LbBx2NSKfiwqf79xC/yeJjKHT1+StcKy/2KTmW16hE68ccKVOtXf+WZGz7Q== + dependencies: + "@types/node" "*" + jest-util "^29.6.3" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jest@^29.6.4: + version "29.6.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.6.4.tgz#7c48e67a445ba264b778253b5d78d4ebc9d0a622" + integrity sha512-tEFhVQFF/bzoYV1YuGyzLPZ6vlPrdfvDmmAxudA1dLEuiztqg2Rkx20vkKY32xiDROcD2KXlgZ7Cu8RPeEHRKw== + dependencies: + "@jest/core" "^29.6.4" + "@jest/types" "^29.6.3" + import-local "^3.0.2" + jest-cli "^29.6.4" + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4945,7 +6148,7 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg== -js-yaml@3.14.1: +js-yaml@3.14.1, js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -4953,13 +6156,45 @@ js-yaml@3.14.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@4.1.0, js-yaml@^4.1.0: +js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" +jsdom@^20.0.0: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" + integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== + dependencies: + abab "^2.0.6" + acorn "^8.8.1" + acorn-globals "^7.0.0" + cssom "^0.5.0" + cssstyle "^2.3.0" + data-urls "^3.0.2" + decimal.js "^10.4.2" + domexception "^4.0.0" + escodegen "^2.0.0" + form-data "^4.0.0" + html-encoding-sniffer "^3.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.1" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.2" + parse5 "^7.1.1" + saxes "^6.0.0" + symbol-tree "^3.2.4" + tough-cookie "^4.1.2" + w3c-xmlserializer "^4.0.0" + webidl-conversions "^7.0.0" + whatwg-encoding "^2.0.0" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" + ws "^8.11.0" + 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" @@ -5012,18 +6247,11 @@ json5@^1.0.1, json5@^1.0.2: dependencies: minimist "^1.2.0" -json5@^2.2.2: +json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== - optionalDependencies: - graceful-fs "^4.1.6" - jsonparse@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -5039,108 +6267,16 @@ jsonparse@^1.3.1: object.assign "^4.1.4" object.values "^1.1.6" -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-chai@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/karma-chai/-/karma-chai-0.1.0.tgz#bee5ad40400517811ae34bb945f762909108b79a" - integrity sha512-mqKCkHwzPMhgTYca10S90aCEX9+HjVjjrBFAsw36Zj7BlQNbokXXCAe6Ji04VUMsxcY5RLP7YphpfO06XOubdg== - -karma-coverage@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/karma-coverage/-/karma-coverage-2.2.1.tgz#e1cc074f93ace9dc4fb7e7aeca7135879c2e358c" - integrity sha512-yj7hbequkQP2qOSb20GuNSIyE//PgJWHwC2IydLE6XRtsnaflv+/OSGNssPjobYUlhVVagy99TQpqUt3vAUG7A== - dependencies: - istanbul-lib-coverage "^3.2.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.1" - istanbul-reports "^3.0.5" - 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-mocha-reporter@^2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz#15120095e8ed819186e47a0b012f3cd741895560" - integrity sha512-Hr6nhkIp0GIJJrvzY8JFeHpQZNseuIakGac4bpw8K1+5F0tLb6l7uvXRa8mt2Z+NVwYgCct4QAfp2R2QP6o00w== - dependencies: - chalk "^2.1.0" - log-symbols "^2.1.0" - strip-ansi "^4.0.0" - -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-sinon@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/karma-sinon/-/karma-sinon-1.0.5.tgz#4e3443f2830fdecff624d3747163f1217daa2a9a" - integrity sha512-wrkyAxJmJbn75Dqy17L/8aILJWFm7znd1CE8gkyxTBFnjMSOe2XTJ3P30T8SkxWZHmoHX0SCaUJTDBEoXs25Og== - -karma-sourcemap-loader@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.4.0.tgz#b01d73f8f688f533bcc8f5d273d43458e13b5488" - integrity sha512-xCRL3/pmhAYF3I6qOrcn0uhbQevitc2DERMPH82FMnG+4WReoGcGFZb1pURf2a5apyrOHRdvD+O6K7NljqKHyA== - dependencies: - graceful-fs "^4.2.10" - -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.4.2: - version "6.4.2" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.2.tgz#a983f874cee6f35990c4b2dcc3d274653714de8e" - integrity sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ== - 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" - kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + known-css-properties@^0.27.0: version "0.27.0" resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.27.0.tgz#82a9358dda5fe7f7bd12b5e7142c0a205393c0c5" @@ -5154,6 +6290,11 @@ launch-editor@^2.6.0: picocolors "^1.0.0" shell-quote "^1.7.3" +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -5250,16 +6391,16 @@ lodash.flattendeep@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== - lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -5270,26 +6411,11 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.6.1: +lodash@^4.17.4, lodash@^4.6.1: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -log-symbols@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== - dependencies: - chalk "^2.0.1" - log-update@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/log-update/-/log-update-5.0.1.tgz#9e928bf70cb183c1f0c9e91d9e6b7115d597ce09" @@ -5301,17 +6427,6 @@ log-update@^5.0.1: strip-ansi "^7.0.1" wrap-ansi "^8.0.1" -log4js@^6.4.1: - version "6.9.1" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.9.1.tgz#aba5a3ff4e7872ae34f8b4c533706753709e38b6" - integrity sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g== - dependencies: - date-format "^4.0.14" - debug "^4.3.4" - flatted "^3.2.7" - rfdc "^1.3.0" - streamroller "^3.1.5" - 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" @@ -5319,13 +6434,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -loupe@^2.3.1: - version "2.3.6" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" - integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== - dependencies: - get-func-name "^2.0.0" - lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -5350,6 +6458,11 @@ lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.0.tgz#b9e2a6a72a129d81ab317202d93c7691df727e61" integrity sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw== +lz-string@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" + integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== + magic-string@^0.25.2: version "0.25.9" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" @@ -5364,6 +6477,11 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.0.3, make-fetch-happen@^11.1.1: version "11.1.1" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz#85ceb98079584a9523d4bf71d32996e7e208549f" @@ -5385,6 +6503,13 @@ make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.0.3, socks-proxy-agent "^7.0.0" ssri "^10.0.0" +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + map-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" @@ -5468,7 +6593,7 @@ mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -5480,11 +6605,6 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.5.2: - version "2.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" - integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -5512,13 +6632,6 @@ minimalistic-assert@^1.0.0: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -5542,7 +6655,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -5619,45 +6732,11 @@ minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" -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== - dependencies: - minimist "^1.2.6" - mkdirp@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mocha@^10.0.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" - integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - nanoid "3.3.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - moo@^0.5.0: version "0.5.2" resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.2.tgz#f9fe82473bc7c184b0d32e2215d3f6e67278733c" @@ -5686,11 +6765,6 @@ multicast-dns@^7.2.5: dns-packet "^5.2.2" thunky "^1.0.2" -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - nanoid@^3.3.6: version "3.3.6" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" @@ -5721,17 +6795,6 @@ neo-async@^2.6.1, neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -nise@^5.1.4: - version "5.1.4" - resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.4.tgz#491ce7e7307d4ec546f5a659b2efe94a18b4bbc0" - integrity sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg== - dependencies: - "@sinonjs/commons" "^2.0.0" - "@sinonjs/fake-timers" "^10.0.2" - "@sinonjs/text-encoding" "^0.7.1" - just-extend "^4.0.2" - path-to-regexp "^1.7.0" - node-dir@^0.1.10: version "0.1.17" resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" @@ -5768,6 +6831,11 @@ node-gyp@^9.0.0: tar "^6.1.2" which "^2.0.2" +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + node-releases@^2.0.12: version "2.0.13" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" @@ -5895,7 +6963,12 @@ nth-check@^2.0.1: dependencies: boolbase "^1.0.0" -object-assign@^4, object-assign@^4.1.1: +nwsapi@^2.2.2: + version "2.2.7" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" + integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== + +object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -5985,13 +7058,6 @@ on-finished@2.4.1: dependencies: ee-first "1.1.1" -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== - dependencies: - ee-first "1.1.1" - on-headers@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" @@ -6046,7 +7112,7 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: +p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -6150,7 +7216,7 @@ parse5-htmlparser2-tree-adapter@^7.0.0: domhandler "^5.0.2" parse5 "^7.0.0" -parse5@^7.0.0: +parse5@^7.0.0, parse5@^7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== @@ -6205,23 +7271,11 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== -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@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -6232,7 +7286,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -6242,6 +7296,11 @@ pidtree@0.6.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== +pirates@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -6336,6 +7395,24 @@ prettier@^3.0.0: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.2.tgz#78fcecd6d870551aa5547437cdae39d4701dca5b" integrity sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ== +pretty-format@^27.0.2: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + +pretty-format@^29.0.0, pretty-format@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.6.3.tgz#d432bb4f1ca6f9463410c3fb25a0ba88e594ace7" + integrity sha512-ZsBgjVhFAj5KeK+nHfF1305/By3lechHQSMWCTl8iHSbfOm2TN5nHEtFc/+W7fAyUeCs2n5iow72gld4gW0xDw== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + proc-log@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" @@ -6364,6 +7441,14 @@ promise-retry@^2.0.1: err-code "^2.0.2" retry "^0.12.0" +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + prop-types@^15.7.0, 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" @@ -6381,20 +7466,25 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +psl@^1.1.33: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + punycode@^1.3.2: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== -punycode@^2.1.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -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== +pure-rand@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.2.tgz#a9c2ddcae9b68d736a8163036f088a2781c8b306" + integrity sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ== qs@6.11.0: version "6.11.0" @@ -6403,6 +7493,11 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -6455,16 +7550,6 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -raw-body@2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - react-deep-force-update@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz#3d2ae45c2c9040cbb1772be52f8ea1ade6ca2ee1" @@ -6499,7 +7584,7 @@ react-fast-compare@^3.0.1: resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz#929a97a532304ce9fee4bcae44234f1ce2c21d49" integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ== -"react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.2.0: +"react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.0.0, react-is@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== @@ -6509,7 +7594,7 @@ react-is@^16.13.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^17.0.0, react-is@^17.0.2: +react-is@^17.0.0, react-is@^17.0.1, react-is@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== @@ -6680,6 +7765,11 @@ regenerator-runtime@^0.13.11: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + regenerator-transform@^0.15.2: version "0.15.2" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz#5bbae58b522098ebdf09bca2f83838929001c7a4" @@ -6759,6 +7849,11 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== + resolve@^1.10.1, resolve@^1.11.0, resolve@^1.11.1, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.1: version "1.22.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.3.tgz#4b4055349ffb962600972da1fdc33c46a4eb3283" @@ -6810,7 +7905,7 @@ rfdc@^1.3.0: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -6978,6 +8073,13 @@ sass@1.66.1: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" +saxes@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" + integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== + dependencies: + xmlchars "^2.2.0" + scheduler@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" @@ -7041,7 +8143,7 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.8: +semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -7067,13 +8169,6 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - serialize-javascript@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" @@ -7183,17 +8278,10 @@ sigstore@^1.3.0: "@sigstore/tuf" "^1.0.1" make-fetch-happen "^11.0.1" -sinon@^15.0.3: - version "15.2.0" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-15.2.0.tgz#5e44d4bc5a9b5d993871137fd3560bebfac27565" - integrity sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw== - dependencies: - "@sinonjs/commons" "^3.0.0" - "@sinonjs/fake-timers" "^10.3.0" - "@sinonjs/samsam" "^8.0.0" - diff "^5.1.0" - nise "^5.1.4" - 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" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== slash@^3.0.0: version "3.0.0" @@ -7227,34 +8315,6 @@ smart-buffer@^4.2.0: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== -socket.io-adapter@~2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz#5de9477c9182fdc171cd8c8364b9a8894ec75d12" - integrity sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA== - dependencies: - ws "~8.11.0" - -socket.io-parser@~4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" - integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - -socket.io@^4.4.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.1.tgz#9009f31bf7be25478895145e92fbc972ad1db900" - integrity sha512-W+utHys2w//dhFjy7iQQu9sGd3eokCjGbl2r59tyLqNiJJBdIebn3GAKEXBr3osqHTObJi2die/25bCx2zsaaw== - dependencies: - accepts "~1.3.4" - base64id "~2.0.0" - cors "~2.8.5" - debug "~4.3.2" - engine.io "~6.5.0" - socket.io-adapter "~2.5.2" - socket.io-parser "~4.2.4" - sockjs@^0.3.24: version "0.3.24" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" @@ -7286,6 +8346,14 @@ socks@^2.6.2: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -7299,7 +8367,7 @@ source-map@^0.5.7: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== -source-map@^0.6.0, source-map@^0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -7370,16 +8438,30 @@ ssri@^10.0.0: dependencies: minipass "^5.0.0" +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + statuses@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -"statuses@>= 1.4.0 < 2", statuses@~1.5.0: +"statuses@>= 1.4.0 < 2": version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== +stop-iteration-iterator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" + integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== + dependencies: + internal-slot "^1.0.4" + stream-events@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5" @@ -7387,20 +8469,19 @@ stream-events@^1.0.5: dependencies: stubs "^3.0.0" -streamroller@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" - integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== - dependencies: - date-format "^4.0.14" - debug "^4.3.4" - fs-extra "^8.1.0" - string-argv@0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + "string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -7488,13 +8569,6 @@ strip-ansi@^3.0.0: dependencies: ansi-regex "^2.0.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== - dependencies: - ansi-regex "^3.0.0" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -7507,6 +8581,11 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" @@ -7531,7 +8610,7 @@ strip-indent@^4.0.0: dependencies: min-indent "^1.0.1" -strip-json-comments@3.1.1, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "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== @@ -7648,13 +8727,6 @@ stylelint@^15.10.1: table "^6.8.1" write-file-atomic "^5.0.1" -supports-color@8.1.1, supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.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" @@ -7674,13 +8746,20 @@ supports-color@^6.1.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== dependencies: has-flag "^4.0.0" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-hyperlinks@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz#c711352a5c89070779b4dad54c05a2f14b15c94b" @@ -7699,6 +8778,11 @@ svg-tags@^1.0.0: resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" integrity sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA== +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + table@^6.8.1: version "6.8.1" resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" @@ -7778,12 +8862,10 @@ thunky@^1.0.2: resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== -tmp@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== to-fast-properties@^1.0.3: version "1.0.3" @@ -7807,6 +8889,23 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +tough-cookie@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" + integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== + dependencies: + punycode "^2.1.1" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -7822,6 +8921,20 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw== +ts-jest@^29.1.1: + version "29.1.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" + integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" + lodash.memoize "4.x" + make-error "1.x" + semver "^7.5.3" + yargs-parser "^21.0.1" + tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -7853,7 +8966,7 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5, type-detect@^4.0.8: +type-detect@4.0.8: 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== @@ -7863,6 +8976,11 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + type-fest@^1.0.1, type-fest@^1.0.2, type-fest@^1.2.1, type-fest@^1.2.2: version "1.4.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" @@ -7915,11 +9033,6 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -ua-parser-js@^0.7.30: - version "0.7.35" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.35.tgz#8bda4827be4f0b1dda91699a29499575a1f1d307" - integrity sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g== - uglify-js@^3.4.9: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -7972,10 +9085,10 @@ unique-slug@^4.0.0: dependencies: imurmurhash "^0.1.4" -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" @@ -7997,6 +9110,14 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + urlgrey@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-1.0.0.tgz#72d2f904482d0b602e3c7fa599343d699bbe1017" @@ -8019,7 +9140,7 @@ uuid@^8.0.0, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-to-istanbul@^9.0.0: +v8-to-istanbul@^9.0.0, v8-to-istanbul@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265" integrity sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA== @@ -8043,15 +9164,24 @@ validate-npm-package-name@^5.0.0: dependencies: builtins "^5.0.0" -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 sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== -void-elements@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== +w3c-xmlserializer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" + integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== + dependencies: + xml-name-validator "^4.0.0" + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" warning@^4.0.2: version "4.0.3" @@ -8080,6 +9210,11 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + webpack-cli@^5.1: version "5.1.4" resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" @@ -8166,13 +9301,6 @@ webpack-hot-middleware@^2.25.4: html-entities "^2.1.0" strip-ansi "^6.0.0" -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.9.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.9.0.tgz#dc160a1c4cf512ceca515cc231669e9ddb133826" @@ -8230,6 +9358,26 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== +whatwg-encoding@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" + integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== + dependencies: + iconv-lite "0.6.3" + +whatwg-mimetype@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" + integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== + +whatwg-url@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" + integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== + dependencies: + tr46 "^3.0.0" + webidl-conversions "^7.0.0" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -8249,6 +9397,16 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-collection@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" + integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== + dependencies: + is-map "^2.0.1" + is-set "^2.0.1" + is-weakmap "^2.0.1" + is-weakset "^2.0.1" + which-typed-array@^1.1.10: version "1.1.11" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" @@ -8312,11 +9470,6 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -8340,6 +9493,14 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + write-file-atomic@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" @@ -8348,15 +9509,20 @@ write-file-atomic@^5.0.1: imurmurhash "^0.1.4" signal-exit "^4.0.1" -ws@^8.13.0: +ws@^8.11.0, ws@^8.13.0: version "8.13.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== -ws@~8.11.0: - version "8.11.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" - integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== y18n@^5.0.5: version "5.0.8" @@ -8378,27 +9544,17 @@ yaml@2.3.1: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" +yargs-parser@^21.0.1, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs@16.2.0, yargs@^16.1.1, 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== @@ -8411,6 +9567,19 @@ yargs@16.2.0, yargs@^16.1.1, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"