diff --git a/babel.config.js b/babel.config.js index 9c4d66f5f..9d2067630 100644 --- a/babel.config.js +++ b/babel.config.js @@ -12,7 +12,6 @@ module.exports = { }, ], ], - plugins: ['@babel/plugin-proposal-class-properties'], env: { test: { // https://github.com/react-native-community/upgrade-support/issues/152 diff --git a/package.json b/package.json index d2b11be9f..1a9cd9aac 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ "devDependencies": { "@babel/cli": "^7.19.3", "@babel/core": "^7.20.2", - "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-transform-flow-strip-types": "^7.19.0", "@babel/preset-env": "^7.20.2", "@babel/preset-flow": "^7.18.6", diff --git a/src/__tests__/__snapshots__/render-debug.test.tsx.snap b/src/__tests__/__snapshots__/render-debug.test.tsx.snap index e72298ccc..088df7819 100644 --- a/src/__tests__/__snapshots__/render-debug.test.tsx.snap +++ b/src/__tests__/__snapshots__/render-debug.test.tsx.snap @@ -393,7 +393,7 @@ exports[`debug: shallow 1`] = ` value="" /> Change freshness! @@ -445,7 +445,7 @@ exports[`debug: shallow with message 1`] = ` value="" /> Change freshness! diff --git a/src/__tests__/render.test.tsx b/src/__tests__/render.test.tsx index 1546b42b9..8c7f102df 100644 --- a/src/__tests__/render.test.tsx +++ b/src/__tests__/render.test.tsx @@ -1,6 +1,6 @@ /* eslint-disable no-console */ import * as React from 'react'; -import { View, Text, TextInput, Pressable } from 'react-native'; +import { View, Text, TextInput, Pressable, FlatList } from 'react-native'; import { getConfig, resetToDefaults } from '../config'; import { render, screen, fireEvent, RenderAPI } from '..'; @@ -254,3 +254,15 @@ test('render calls detects host component names', () => { render(); expect(getConfig().hostComponentNames).not.toBeUndefined(); }); + +test('render FlatList', () => { + const screen = render( + {item}} + /> + ); + + expect(screen.getByTestId('flatList')).toBeTruthy(); +}); diff --git a/yarn.lock b/yarn.lock index c7be757de..f7c74a37f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -312,7 +312,7 @@ "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.13.0", "@babel/plugin-proposal-class-properties@^7.18.6": +"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.13.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==