From e19dd9a305c82e074cf3c5ace39b91b8a5ded915 Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Tue, 15 Apr 2025 16:38:22 +0100 Subject: [PATCH 1/5] test: create a test app for users to run --- package.json | 5 +- tests/test-app/examples/vertexai.js | 263 ++++++++++++++++++++++++++++ tests/test-app/index.js | 1 + tests/test-app/metro.config.js | 77 ++++++++ 4 files changed, 345 insertions(+), 1 deletion(-) create mode 100644 tests/test-app/examples/vertexai.js create mode 100644 tests/test-app/index.js create mode 100644 tests/test-app/metro.config.js diff --git a/package.json b/package.json index 7ae788b574..93160eb783 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,10 @@ "tests:macos:build": "cd tests && yarn build:macos", "tests:macos:pod:install": "cd tests && rm -f macos/Podfile.lock && cd macos && pod install", "tests:macos:test-cover": "cd tests && npx jet --target=macos --coverage", - "format:markdown": "prettier --write \"docs/**/*.md\"" + "format:markdown": "prettier --write \"docs/**/*.md\"", + "example:app:bundler": "cd tests && yarn react-native start --config ./test-app/metro.config.js --reset-cache", + "example:app:run:ios": "cd tests && yarn react-native run-ios", + "example:app:run:android": "cd tests && yarn react-native run-android" }, "devDependencies": { "@babel/core": "^7.26.9", diff --git a/tests/test-app/examples/vertexai.js b/tests/test-app/examples/vertexai.js new file mode 100644 index 0000000000..d8e65df109 --- /dev/null +++ b/tests/test-app/examples/vertexai.js @@ -0,0 +1,263 @@ +import React from 'react'; +import { AppRegistry, Button, View } from 'react-native'; + +import { getApp } from '@react-native-firebase/app'; +import { getVertexAI, getGenerativeModel, Schema } from '@react-native-firebase/vertexai'; + +function App() { + return ( + + +