Skip to content

Commit 7a96522

Browse files
Merge pull request #1607 from callstack/v13
v13 (rc)
2 parents 47b2477 + 1672880 commit 7a96522

File tree

83 files changed

+1266
-2289
lines changed

Some content is hidden

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

83 files changed

+1266
-2289
lines changed

.eslintrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"extends": "@callstack",
33
"rules": {
4-
"react-native/no-raw-text": 0,
54
"no-console": 1,
6-
"react/no-multi-comp": 0,
75
// Ignore certain webpack alias because it can't be resolved
86
"import/no-unresolved": [2, { "ignore": ["^@theme", "^@docusaurus", "^@generated"] }],
7+
"react/no-multi-comp": 0,
98
"react-native/no-color-literals": "off",
109
"react-native/no-inline-styles": "off",
10+
"react-native/no-raw-text": 0,
1111
"react-native-a11y/has-valid-accessibility-descriptors": "off",
1212
"react-native-a11y/has-valid-accessibility-ignores-invert-colors": 0,
1313
"react-native-a11y/has-valid-accessibility-value": "off"

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
test:
5252
needs: [install-cache-deps]
5353
runs-on: ubuntu-latest
54-
name: Test
54+
name: Test (concurrent)
5555
steps:
5656
- name: Checkout
5757
uses: actions/checkout@v4
@@ -67,19 +67,19 @@ jobs:
6767
env:
6868
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6969

70-
test-concurrent:
70+
test-legacy:
7171
needs: [install-cache-deps]
7272
runs-on: ubuntu-latest
73-
name: Test (concurrent mode)
73+
name: Test (legacy)
7474
steps:
7575
- name: Checkout
7676
uses: actions/checkout@v4
7777

7878
- name: Setup Node.js and deps
7979
uses: ./.github/actions/setup-deps
8080

81-
- name: Test in concurrent mode
82-
run: CONCURRENT_MODE=1 yarn test:ci
81+
- name: Test in legacy mode
82+
run: CONCURRENT_MODE=0 yarn test:ci
8383

8484
test-website:
8585
runs-on: ubuntu-latest

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ This library has a `peerDependencies` listing for `react-test-renderer`. Make su
4444

4545
### Additional Jest matchers
4646

47-
You can use the built-in Jest matchers by adding the following line to your `jest-setup.ts` file (configured using [`setupFilesAfterEnv`](https://jestjs.io/docs/configuration#setupfilesafterenv-array)):
48-
49-
```ts
50-
import '@testing-library/react-native/extend-expect';
51-
```
47+
You can use the built-in Jest matchers automatically by having any import from `@testing-library/react-native` in your test.
5248

5349
## Example
5450

babel.config.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
module.exports = {
22
presets: [
3-
'@babel/preset-typescript',
4-
'@babel/preset-react',
53
[
64
'@babel/preset-env',
75
{
86
targets: {
9-
node: '14',
7+
node: '18',
108
},
11-
bugfixes: true,
9+
useBuiltIns: false,
10+
modules: 'commonjs',
1211
},
1312
],
13+
'@babel/preset-react',
14+
'@babel/preset-typescript',
15+
'@babel/preset-flow',
1416
],
17+
plugins: ['@babel/plugin-transform-strict-mode'],
1518
env: {
1619
test: {
1720
presets: ['@react-native/babel-preset'],

examples/basic/jest-setup.ts

-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
import { configure } from '@testing-library/react-native';
2-
3-
// Import built-in Jest matchers
4-
import '@testing-library/react-native/extend-expect';
5-
6-
configure({ concurrentRoot: true });

examples/basic/jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
preset: '@testing-library/react-native',
2+
preset: 'react-native',
33
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
44
setupFilesAfterEnv: ['./jest-setup.ts'],
55
};

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.8.1",
23+
"@testing-library/react-native": "^13.0.0-beta.0",
2424
"@types/eslint": "^8.56.10",
2525
"@types/jest": "^29.5.12",
2626
"@types/react": "~18.3.12",

0 commit comments

Comments
 (0)