Skip to content

Commit

Permalink
Merge pull request #1607 from callstack/v13
Browse files Browse the repository at this point in the history
v13 (rc)
  • Loading branch information
mdjastrzebski authored Dec 8, 2024
2 parents 47b2477 + 1672880 commit 7a96522
Show file tree
Hide file tree
Showing 83 changed files with 1,266 additions and 2,289 deletions.
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"extends": "@callstack",
"rules": {
"react-native/no-raw-text": 0,
"no-console": 1,
"react/no-multi-comp": 0,
// Ignore certain webpack alias because it can't be resolved
"import/no-unresolved": [2, { "ignore": ["^@theme", "^@docusaurus", "^@generated"] }],
"react/no-multi-comp": 0,
"react-native/no-color-literals": "off",
"react-native/no-inline-styles": "off",
"react-native/no-raw-text": 0,
"react-native-a11y/has-valid-accessibility-descriptors": "off",
"react-native-a11y/has-valid-accessibility-ignores-invert-colors": 0,
"react-native-a11y/has-valid-accessibility-value": "off"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
test:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test
name: Test (concurrent)
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -67,19 +67,19 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-concurrent:
test-legacy:
needs: [install-cache-deps]
runs-on: ubuntu-latest
name: Test (concurrent mode)
name: Test (legacy)
steps:
- name: Checkout
uses: actions/checkout@v4

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

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

test-website:
runs-on: ubuntu-latest
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ This library has a `peerDependencies` listing for `react-test-renderer`. Make su

### Additional Jest matchers

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)):

```ts
import '@testing-library/react-native/extend-expect';
```
You can use the built-in Jest matchers automatically by having any import from `@testing-library/react-native` in your test.

## Example

Expand Down
11 changes: 7 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
module.exports = {
presets: [
'@babel/preset-typescript',
'@babel/preset-react',
[
'@babel/preset-env',
{
targets: {
node: '14',
node: '18',
},
bugfixes: true,
useBuiltIns: false,
modules: 'commonjs',
},
],
'@babel/preset-react',
'@babel/preset-typescript',
'@babel/preset-flow',
],
plugins: ['@babel/plugin-transform-strict-mode'],
env: {
test: {
presets: ['@react-native/babel-preset'],
Expand Down
6 changes: 0 additions & 6 deletions examples/basic/jest-setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
import { configure } from '@testing-library/react-native';

// Import built-in Jest matchers
import '@testing-library/react-native/extend-expect';

configure({ concurrentRoot: true });
2 changes: 1 addition & 1 deletion examples/basic/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
preset: '@testing-library/react-native',
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
setupFilesAfterEnv: ['./jest-setup.ts'],
};
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@testing-library/react-native": "^12.8.1",
"@testing-library/react-native": "^13.0.0-beta.0",
"@types/eslint": "^8.56.10",
"@types/jest": "^29.5.12",
"@types/react": "~18.3.12",
Expand Down
Loading

0 comments on commit 7a96522

Please sign in to comment.