mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Introduce jest-e2e test for TurboModule Interop (#38206)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38206 This test will ensure that the TurboModule interop layer works in Catalyst. It will navigate to the sample legacy module screen, and ensure that all methods work. Steps: 1. Open up Catalyst 2. Navigate to the Legacy Native Module example 3. Click "Run all tests" 4. Validate that all tests match expectations. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D46917689 fbshipit-source-id: 071f9324fa3719648c1a390bde4ba00a4e687e44
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5ba8de05b5
commit
99e332e5b2
@@ -129,7 +129,9 @@ class SampleLegacyModuleExample extends React.Component<{||}, State> {
|
||||
const result = this.state.testResults[name] || {};
|
||||
return (
|
||||
<View style={styles.result}>
|
||||
<Text style={[styles.value]}>{JSON.stringify(result.value)}</Text>
|
||||
<Text testID={name + '-result'} style={[styles.value]}>
|
||||
{(JSON.stringify(result.value) || '').replaceAll('"', "'")}
|
||||
</Text>
|
||||
<Text style={[styles.type]}>{result.type}</Text>
|
||||
</View>
|
||||
);
|
||||
@@ -145,6 +147,7 @@ class SampleLegacyModuleExample extends React.Component<{||}, State> {
|
||||
<View style={styles.item}>
|
||||
<TouchableOpacity
|
||||
style={[styles.column, styles.button]}
|
||||
testID="run-all-tests"
|
||||
onPress={() =>
|
||||
Object.keys(this._tests).forEach(item => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user