Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Jest): upgrade jest form v28 to v29 for faster executions #1652

Merged
merged 2 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/dnb-eufemia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLElement> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -457,7 +457,7 @@ Element.defaultProps = {
`;

exports[`babelPluginIncludeDocs has to match collectProps snapshot given by onComplete 2`] = `
Array [
[
"boolean",
"number",
"spacing",
Expand Down Expand Up @@ -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\`.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ exports[`Accordion component have to match snapshot 1`] = `
animate={false}
className="dnb-accordion__content"
innerRef={
Object {
{
"current": null,
}
}
Expand Down Expand Up @@ -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 {
Expand All @@ -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']
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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",
],
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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",
],
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -814,7 +814,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
<Tooltip
id="autocomplete-id-submit-button-tooltip"
targetElement={
Object {
{
"current": <button
aria-describedby="autocomplete-id-submit-button-tooltip"
aria-expanded="true"
Expand All @@ -841,7 +841,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
animatePosition={false}
arrow="center"
attributes={
Object {
{
"children": "submit_button_title",
"className": "dnb-tooltip",
}
Expand Down Expand Up @@ -876,7 +876,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
</button>
}
targetElement={
Object {
{
"current": <button
aria-describedby="autocomplete-id-submit-button-tooltip"
aria-expanded="true"
Expand Down Expand Up @@ -904,7 +904,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
animatePosition={false}
arrow="center"
attributes={
Object {
{
"children": "submit_button_title",
"className": "dnb-tooltip",
}
Expand Down Expand Up @@ -989,7 +989,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
animatePosition={false}
arrow="center"
attributes={
Object {
{
"children": "submit_button_title",
"className": "dnb-tooltip",
}
Expand Down Expand Up @@ -1054,7 +1054,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
onMouseMove={[Function]}
onTouchStart={[Function]}
role="tooltip"
style={Object {}}
style={{}}
>
<span
className="dnb-tooltip__arrow dnb-tooltip__arrow__arrow--center dnb-tooltip__arrow__position--top"
Expand Down Expand Up @@ -1114,7 +1114,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
on_show={null}
on_state_update={null}
opened={null}
options_render={Object {}}
options_render={{}}
portal_class="portal_class"
prepared_data={null}
prevent_close="prevent_close"
Expand Down Expand Up @@ -1165,7 +1165,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
on_show={null}
on_state_update={null}
opened={null}
options_render={Object {}}
options_render={{}}
portal_class="portal_class"
prepared_data={null}
prevent_close="prevent_close"
Expand Down Expand Up @@ -1206,13 +1206,13 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
role="listbox"
showFocusRing={false}
style={
Object {
{
"maxHeight": "1rem",
}
}
tabIndex="-1"
triangleRef={
Object {
{
"current": <li
aria-hidden="true"
class="dnb-drawer-list__triangle"
Expand All @@ -1228,7 +1228,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
id="autocomplete-id-ul"
role="listbox"
style={
Object {
{
"maxHeight": "1rem",
}
}
Expand Down Expand Up @@ -1386,20 +1386,20 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
<Suffix
className="dnb-autocomplete__suffix"
context={
Object {
{
"align_autocomplete": null,
"ariaLiveDelay": 1,
"aria_live_options": "aria_live_options",
"children": "children",
"class": "class",
"className": "className",
"custom_element": Object {},
"custom_element": {},
"custom_method": [Function],
"data": Array [
"data": [
"AA c",
"BB cc zethx",
Object {
"content": Array [
{
"content": [
"CC",
"cc",
],
Expand Down Expand Up @@ -1446,7 +1446,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",
Expand Down Expand Up @@ -1731,7 +1731,7 @@ exports[`Autocomplete scss have to match snapshot 1`] = `
.dnb-tooltip--active {
visibility: visible;
/*
because of the first \\"show\\" we also use animation
because of the first "show" we also use animation
also, use forwards because of the usage of visibility
*/
animation: show-tooltip 200ms var(--easing-default) forwards; }
Expand Down Expand Up @@ -3146,8 +3146,8 @@ legend.dnb-form-label {
.dnb-autocomplete .dnb-input__submit-button__button[disabled]:not(.dnb-button--has-text) {
--border-color: var(--color-black-55);
box-shadow: inset 0 0 0 var(--input-border-width) 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-autocomplete .dnb-input__submit-button__button[disabled]:not(.dnb-button--has-text) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ exports[`Breadcrumb scss have to match snapshot 1`] = `
.dnb-tooltip--active {
visibility: visible;
/*
because of the first \\"show\\" we also use animation
because of the first "show" we also use animation
also, use forwards because of the usage of visibility
*/
animation: show-tooltip 200ms var(--easing-default) forwards; }
Expand Down
Loading