From a3aa72d1f6b6155dff3cbac0b20c920f5b5263cd Mon Sep 17 00:00:00 2001 From: M-i-k-e-l Date: Thu, 1 Jan 2026 13:22:56 +0200 Subject: [PATCH 1/2] Fix button and update @testing-library/react-native version --- package.json | 2 +- packages/react-native-ui-lib/package.json | 2 +- .../components/button/__tests__/index.spec.js | 118 +++++++++-------- yarn.lock | 120 ++++++++++++++++-- 4 files changed, 167 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index 663622fdfa..647a2384de 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@react-native/typescript-config": "0.78.3", "@shopify/flash-list": "1.7.6", "@testing-library/react-hooks": "^8.0.1", - "@testing-library/react-native": "^11.5.1", + "@testing-library/react-native": "^13.3.3", "@topcli/spinner": "patch:@topcli/spinner@npm%3A2.1.2#./.yarn/patches/@topcli-spinner-npm-2.1.2-262b584167.patch", "@types/hoist-non-react-statics": "^3.3.7", "@types/jest": "^29.5.13", diff --git a/packages/react-native-ui-lib/package.json b/packages/react-native-ui-lib/package.json index 35dfa5d830..14923baac2 100644 --- a/packages/react-native-ui-lib/package.json +++ b/packages/react-native-ui-lib/package.json @@ -65,7 +65,7 @@ "@react-native/typescript-config": "0.78.3", "@shopify/flash-list": "1.7.6", "@testing-library/react-hooks": "^8.0.1", - "@testing-library/react-native": "^11.5.1", + "@testing-library/react-native": "^13.3.3", "@types/hoist-non-react-statics": "^3.3.7", "@types/jest": "^29.5.13", "@types/lodash": "^4.0.0", diff --git a/packages/react-native-ui-lib/src/components/button/__tests__/index.spec.js b/packages/react-native-ui-lib/src/components/button/__tests__/index.spec.js index 722978bfa2..61b6820f48 100644 --- a/packages/react-native-ui-lib/src/components/button/__tests__/index.spec.js +++ b/packages/react-native-ui-lib/src/components/button/__tests__/index.spec.js @@ -1,5 +1,5 @@ import React from 'react'; -import renderer from 'react-test-renderer'; +import {render} from '@testing-library/react-native'; import Button from '../index'; import View from '../../view'; import {Colors, ThemeManager} from '../../../style'; @@ -12,54 +12,54 @@ describe('Button', () => { }); it('should render default button', () => { - const tree = renderer.create(