Skip to content

Commit e6d06a7

Browse files
committed
Merge branch 'main' into v13
# Conflicts: # src/queries/__tests__/accessibility-state.test.tsx
2 parents a3e1c5a + 8390011 commit e6d06a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+535
-244
lines changed

examples/basic/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"devDependencies": {
2222
"@babel/core": "^7.24.0",
23-
"@testing-library/react-native": "^12.5.2",
23+
"@testing-library/react-native": "^12.7.1",
2424
"@types/eslint": "^8.56.10",
2525
"@types/jest": "^29.5.12",
2626
"@types/react": "~18.2.79",

examples/basic/yarn.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -2463,9 +2463,9 @@ __metadata:
24632463
languageName: node
24642464
linkType: hard
24652465

2466-
"@testing-library/react-native@npm:^12.5.2":
2467-
version: 12.5.3
2468-
resolution: "@testing-library/react-native@npm:12.5.3"
2466+
"@testing-library/react-native@npm:^12.7.1":
2467+
version: 12.7.1
2468+
resolution: "@testing-library/react-native@npm:12.7.1"
24692469
dependencies:
24702470
jest-matcher-utils: "npm:^29.7.0"
24712471
pretty-format: "npm:^29.7.0"
@@ -2478,7 +2478,7 @@ __metadata:
24782478
peerDependenciesMeta:
24792479
jest:
24802480
optional: true
2481-
checksum: 10c0/6e404bfee5677dfa54405f30e91a24fccb50cc6cf98d0e296ae4ebccb71641a1a1dcefc2ffaa9c3c05eacf2b39c99431f6099ed0227696de4ec914768aa70279
2481+
checksum: 10c0/caaa4bdf97834b307b72af05c447ce40a2ba2ff40b464050bc29535caadf81981ea2873668445e633fdb3d13efccb136ef0932d6d9f4736bc6f7f98be98088d4
24822482
languageName: node
24832483
linkType: hard
24842484

@@ -8923,7 +8923,7 @@ __metadata:
89238923
resolution: "root-workspace-0b6124@workspace:."
89248924
dependencies:
89258925
"@babel/core": "npm:^7.24.0"
8926-
"@testing-library/react-native": "npm:^12.5.2"
8926+
"@testing-library/react-native": "npm:^12.7.1"
89278927
"@types/eslint": "npm:^8.56.10"
89288928
"@types/jest": "npm:^29.5.12"
89298929
"@types/react": "npm:~18.2.79"

examples/cookbook/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"devDependencies": {
3131
"@babel/core": "^7.20.0",
3232
"@expo/metro-runtime": "~3.2.1",
33-
"@testing-library/react-native": "^12.5.2",
33+
"@testing-library/react-native": "^12.7.1",
3434
"@types/eslint": "^8.56.10",
3535
"@types/jest": "^29.5.12",
3636
"@types/react": "~18.2.45",

examples/cookbook/yarn.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -2720,9 +2720,9 @@ __metadata:
27202720
languageName: node
27212721
linkType: hard
27222722

2723-
"@testing-library/react-native@npm:^12.5.2":
2724-
version: 12.5.3
2725-
resolution: "@testing-library/react-native@npm:12.5.3"
2723+
"@testing-library/react-native@npm:^12.7.1":
2724+
version: 12.7.1
2725+
resolution: "@testing-library/react-native@npm:12.7.1"
27262726
dependencies:
27272727
jest-matcher-utils: "npm:^29.7.0"
27282728
pretty-format: "npm:^29.7.0"
@@ -2735,7 +2735,7 @@ __metadata:
27352735
peerDependenciesMeta:
27362736
jest:
27372737
optional: true
2738-
checksum: 10c0/6e404bfee5677dfa54405f30e91a24fccb50cc6cf98d0e296ae4ebccb71641a1a1dcefc2ffaa9c3c05eacf2b39c99431f6099ed0227696de4ec914768aa70279
2738+
checksum: 10c0/caaa4bdf97834b307b72af05c447ce40a2ba2ff40b464050bc29535caadf81981ea2873668445e633fdb3d13efccb136ef0932d6d9f4736bc6f7f98be98088d4
27392739
languageName: node
27402740
linkType: hard
27412741

@@ -9499,7 +9499,7 @@ __metadata:
94999499
dependencies:
95009500
"@babel/core": "npm:^7.20.0"
95019501
"@expo/metro-runtime": "npm:~3.2.1"
9502-
"@testing-library/react-native": "npm:^12.5.2"
9502+
"@testing-library/react-native": "npm:^12.7.1"
95039503
"@types/eslint": "npm:^8.56.10"
95049504
"@types/jest": "npm:^29.5.12"
95059505
"@types/react": "npm:~18.2.45"

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@testing-library/react-native",
3-
"version": "12.6.1",
3+
"version": "12.7.1",
44
"description": "Simple and complete React Native testing utilities that encourage good testing practices.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",
@@ -33,8 +33,7 @@
3333
"build:js": "babel src --out-dir build --extensions \".js,.ts,.jsx,.tsx\" --source-maps --ignore \"**/__tests__/**\"",
3434
"build:ts": "tsc --build tsconfig.release.json",
3535
"build": "yarn clean && yarn build:js && yarn build:ts && yarn copy-flowtypes",
36-
"prepublish": "yarn build",
37-
"publish": "release-it"
36+
"publish": "yarn build && release-it"
3837
},
3938
"files": [
4039
"build/",

src/__tests__/config.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ test('resetToDefaults() resets internal config to defaults', () => {
3333
hostComponentNames: {
3434
text: 'A',
3535
textInput: 'A',
36+
image: 'A',
3637
switch: 'A',
3738
scrollView: 'A',
3839
modal: 'A',
@@ -41,6 +42,7 @@ test('resetToDefaults() resets internal config to defaults', () => {
4142
expect(getConfig().hostComponentNames).toEqual({
4243
text: 'A',
4344
textInput: 'A',
45+
image: 'A',
4446
switch: 'A',
4547
scrollView: 'A',
4648
modal: 'A',

src/__tests__/host-component-names.test.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ describe('getHostComponentNames', () => {
1414
hostComponentNames: {
1515
text: 'banana',
1616
textInput: 'banana',
17+
image: 'banana',
1718
switch: 'banana',
1819
scrollView: 'banana',
1920
modal: 'banana',
@@ -23,6 +24,7 @@ describe('getHostComponentNames', () => {
2324
expect(getHostComponentNames()).toEqual({
2425
text: 'banana',
2526
textInput: 'banana',
27+
image: 'banana',
2628
switch: 'banana',
2729
scrollView: 'banana',
2830
modal: 'banana',
@@ -37,6 +39,7 @@ describe('getHostComponentNames', () => {
3739
expect(hostComponentNames).toEqual({
3840
text: 'Text',
3941
textInput: 'TextInput',
42+
image: 'Image',
4043
switch: 'RCTSwitch',
4144
scrollView: 'RCTScrollView',
4245
modal: 'Modal',
@@ -67,6 +70,7 @@ describe('configureHostComponentNamesIfNeeded', () => {
6770
expect(getConfig().hostComponentNames).toEqual({
6871
text: 'Text',
6972
textInput: 'TextInput',
73+
image: 'Image',
7074
switch: 'RCTSwitch',
7175
scrollView: 'RCTScrollView',
7276
modal: 'Modal',
@@ -78,6 +82,7 @@ describe('configureHostComponentNamesIfNeeded', () => {
7882
hostComponentNames: {
7983
text: 'banana',
8084
textInput: 'banana',
85+
image: 'banana',
8186
switch: 'banana',
8287
scrollView: 'banana',
8388
modal: 'banana',
@@ -89,13 +94,14 @@ describe('configureHostComponentNamesIfNeeded', () => {
8994
expect(getConfig().hostComponentNames).toEqual({
9095
text: 'banana',
9196
textInput: 'banana',
97+
image: 'banana',
9298
switch: 'banana',
9399
scrollView: 'banana',
94100
modal: 'banana',
95101
});
96102
});
97103

98-
test('throw an error when autodetection fails', () => {
104+
test('throw an error when auto-detection fails', () => {
99105
const mockCreate = jest.spyOn(TestRenderer, 'create') as jest.Mock;
100106
const renderer = TestRenderer.create(<View />);
101107

0 commit comments

Comments
 (0)