diff --git a/packages/dnb-eufemia/package.json b/packages/dnb-eufemia/package.json index 3fdcfc4f10b..d15fdc11899 100644 --- a/packages/dnb-eufemia/package.json +++ b/packages/dnb-eufemia/package.json @@ -157,13 +157,13 @@ "@testing-library/react": "12.1.2", "@testing-library/react-hooks": "7.0.2", "@testing-library/user-event": "13.5.0", - "@types/jest": "28.1.1", - "@types/jest-axe": "3.5.3", + "@types/jest": "29.2.0", + "@types/jest-axe": "3.5.5", "@typescript-eslint/eslint-plugin": "5.28.0", "@typescript-eslint/parser": "5.28.0", "@wojtekmaj/enzyme-adapter-react-17": "0.6.5", "audit-ci": "5.1.2", - "babel-jest": "28.1.1", + "babel-jest": "29.2.1", "babel-plugin-optimize-clsx": "2.6.2", "babel-plugin-search-and-replace": "1.1.0", "babel-plugin-transform-react-remove-prop-types": "0.4.24", @@ -198,10 +198,10 @@ "gulp-rename": "2.0.0", "gulp-transform": "3.0.5", "history": "5.1.0", - "jest": "28.1.1", + "jest": "29.2.1", "jest-axe": "6.0.0", - "jest-environment-jsdom": "28.1.1", - "jest-environment-node": "28.1.1", + "jest-environment-jsdom": "29.2.1", + "jest-environment-node": "29.2.1", "jest-matchmedia-mock": "1.1.0", "jest-raw-loader": "1.0.1", "jest-screenshot": "0.3.5", diff --git a/packages/dnb-eufemia/scripts/prebuild/tasks/__tests__/__snapshots__/generateTypes.test.js.snap b/packages/dnb-eufemia/scripts/prebuild/tasks/__tests__/__snapshots__/generateTypes.test.js.snap index 65c9a6c5b5e..66a86cd281b 100644 --- a/packages/dnb-eufemia/scripts/prebuild/tasks/__tests__/__snapshots__/generateTypes.test.js.snap +++ b/packages/dnb-eufemia/scripts/prebuild/tasks/__tests__/__snapshots__/generateTypes.test.js.snap @@ -92,7 +92,7 @@ exports[`generateTypes has to match SecondaryComponent snapshot 1`] = ` export type ElementSecondary = string | number | boolean; /** - * NB: Do not change the docs (comments) in here. The docs are updated during build time by \\"generateTypes.js\\" and \\"fetchPropertiesFromDocs.js\\". + * NB: Do not change the docs (comments) in here. The docs are updated during build time by "generateTypes.js" and "fetchPropertiesFromDocs.js". */ export interface ElementProps extends React.HTMLProps { /** diff --git a/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/__tests__/__snapshots__/babelPluginCorrectTypes.test.js.snap b/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/__tests__/__snapshots__/babelPluginCorrectTypes.test.js.snap index 69cedd35294..d188ce494dc 100644 --- a/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/__tests__/__snapshots__/babelPluginCorrectTypes.test.js.snap +++ b/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/__tests__/__snapshots__/babelPluginCorrectTypes.test.js.snap @@ -6,7 +6,7 @@ exports[`babelPluginCorrectTypes has to match snapshot 1`] = ` * */ import React from 'react'; -import { PropTypes } from \\"react\\"; +import { PropTypes } from "react"; import SecondaryComponent, { secondaryDefaultProps, secondaryPropTypes } from './SecondaryComponent'; import ClassComponent from './ClassComponent'; export const primaryPropTypes = { diff --git a/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/__tests__/__snapshots__/babelPluginIncludeDocs.test.js.snap b/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/__tests__/__snapshots__/babelPluginIncludeDocs.test.js.snap index c0de0a6c0f2..2e917bb5e59 100644 --- a/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/__tests__/__snapshots__/babelPluginIncludeDocs.test.js.snap +++ b/packages/dnb-eufemia/scripts/prebuild/tasks/generateTypes/__tests__/__snapshots__/babelPluginIncludeDocs.test.js.snap @@ -6,7 +6,7 @@ exports[`babelPluginIncludeDocs has to match code snapshot 1`] = ` * */ import React from 'react'; -import { PropTypes } from \\"react\\"; +import { PropTypes } from "react"; import SecondaryComponent, { secondaryDefaultProps, secondaryPropTypes } from './SecondaryComponent'; import ClassComponent from './ClassComponent'; export const primaryPropTypes = { @@ -158,7 +158,7 @@ exports[`babelPluginIncludeDocs has to match code snapshot in strict mode 1`] = * */ import React from 'react'; -import { PropTypes } from \\"react\\"; +import { PropTypes } from "react"; import SecondaryComponent, { secondaryDefaultProps, secondaryPropTypes } from './SecondaryComponent'; import ClassComponent from './ClassComponent'; export const primaryPropTypes = { @@ -310,7 +310,7 @@ exports[`babelPluginIncludeDocs has to match collectProps snapshot given by onCo * */ import React from 'react'; -import { PropTypes } from \\"react\\"; +import { PropTypes } from "react"; import SecondaryComponent, { secondaryDefaultProps, secondaryPropTypes } from './SecondaryComponent'; import ClassComponent from './ClassComponent'; export const primaryPropTypes = { @@ -457,7 +457,7 @@ Element.defaultProps = { `; exports[`babelPluginIncludeDocs has to match collectProps snapshot given by onComplete 2`] = ` -Array [ +[ "boolean", "number", "spacing", @@ -485,8 +485,8 @@ Array [ `; exports[`babelPluginIncludeDocs has to match docs snapshot 1`] = ` -Array [ - Object { +[ + { "bottom": "Text \`margin-bottom\`.", "children": "Text \`spacing\` or \`children\`.", "left": "Text \`margin-left\`.", diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/Accordion.test.js.snap b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/Accordion.test.js.snap index 3880b45cbbf..d4b949b8dbc 100644 --- a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/Accordion.test.js.snap +++ b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/Accordion.test.js.snap @@ -148,7 +148,7 @@ exports[`Accordion component have to match snapshot 1`] = ` animate={false} className="dnb-accordion__content" innerRef={ - Object { + { "current": null, } } @@ -194,8 +194,8 @@ exports[`Accordion scss have to match default theme snapshot 1`] = ` background-color: var(--color-white); --border-color: var(--color-black-8); box-shadow: inset 0 0 0 0.0625rem var(--border-color); - /* iOS fix - because \\"inset\\" works not fine with border-radius */ - /* Safari fix - because \\"inset\\" works not fine with border-radius if the user zooms the page */ + /* iOS fix - because "inset" works not fine with border-radius */ + /* Safari fix - because "inset" works not fine with border-radius if the user zooms the page */ border-color: transparent; } @supports (-webkit-touch-callout: none) { .dnb-accordion__variant--outlined > .dnb-accordion__header { @@ -221,8 +221,8 @@ exports[`Accordion scss have to match default theme snapshot 1`] = ` html:not([data-whatintent='touch']) .dnb-accordion__variant--outlined > .dnb-accordion__header:focus:not([disabled]) { --border-color: var(--color-emerald-green); box-shadow: inset 0 0 0 0.125rem var(--border-color); - /* iOS fix - because \\"inset\\" works not fine with border-radius */ - /* Safari fix - because \\"inset\\" works not fine with border-radius if the user zooms the page */ + /* iOS fix - because "inset" works not fine with border-radius */ + /* Safari fix - because "inset" works not fine with border-radius if the user zooms the page */ border-color: transparent; } @supports (-webkit-touch-callout: none) { html[data-whatinput='keyboard'] .dnb-accordion__variant--outlined > .dnb-accordion__header:focus:not([disabled]), html[data-whatinput='keyboard'] @@ -304,8 +304,8 @@ html[data-whatinput='keyboard'] html[data-whatinput='keyboard'] .dnb-accordion__variant--outlined.dnb-accordion--expanded > .dnb-accordion__header:not([disabled]):not(:active):not(:hover):focus { --border-color: var(--color-emerald-green); box-shadow: inset 0 0 0 0.125rem var(--border-color); - /* iOS fix - because \\"inset\\" works not fine with border-radius */ - /* Safari fix - because \\"inset\\" works not fine with border-radius if the user zooms the page */ + /* iOS fix - because "inset" works not fine with border-radius */ + /* Safari fix - because "inset" works not fine with border-radius if the user zooms the page */ border-color: transparent; } @supports (-webkit-touch-callout: none) { html[data-whatinput='keyboard'] .dnb-accordion__variant--outlined.dnb-accordion--expanded > .dnb-accordion__header:not([disabled]):not(:active):not(:hover):focus { diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/Autocomplete.test.js.snap b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/Autocomplete.test.js.snap index 6577ba67bd0..ec556bf82c7 100644 --- a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/Autocomplete.test.js.snap +++ b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/Autocomplete.test.js.snap @@ -7,14 +7,14 @@ exports[`Autocomplete markup have to match snapshot 1`] = ` aria_live_options="aria_live_options" class="class" className="className" - custom_element={Object {}} + custom_element={{}} custom_method={[Function]} data={ - Array [ + [ "AA c", "BB cc zethx", - Object { - "content": Array [ + { + "content": [ "CC", "cc", ], @@ -62,7 +62,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = ` on_type={[Function]} open_on_focus="open_on_focus" opened={true} - options_render={Object {}} + options_render={{}} page_offset="page_offset" placeholder="placeholder" portal_class="portal_class" @@ -101,14 +101,14 @@ exports[`Autocomplete markup have to match snapshot 1`] = ` cache_hash={null} class="class" className="className" - custom_element={Object {}} + custom_element={{}} custom_method={[Function]} data={ - Array [ + [ "AA c", "BB cc zethx", - Object { - "content": Array [ + { + "content": [ "CC", "cc", ], @@ -165,7 +165,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = ` on_type={[Function]} open_on_focus="open_on_focus" opened={null} - options_render={Object {}} + options_render={{}} page_offset="page_offset" placeholder="placeholder" portal_class="portal_class" @@ -209,14 +209,14 @@ exports[`Autocomplete markup have to match snapshot 1`] = ` aria_live_options="aria_live_options" class="class" className="className" - custom_element={Object {}} + custom_element={{}} custom_method={[Function]} data={ - Array [ + [ "AA c", "BB cc zethx", - Object { - "content": Array [ + { + "content": [ "CC", "cc", ], @@ -264,7 +264,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = ` on_type={[Function]} open_on_focus="open_on_focus" opened={true} - options_render={Object {}} + options_render={{}} page_offset="page_offset" placeholder="placeholder" portal_class="portal_class" @@ -814,7 +814,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = ` } targetElement={ - Object { + { "current":