Files
react-native/packages/rn-tester-e2e/scripts/run-e2e-tests.js
T
Alex HuntandFacebook GitHub Bot f0d1d9214d Relocate RNTester E2E wrapper script under package (#42906)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42906

Makes way to relocate repo E2E testing + Verdaccio logic under `scripts/e2e/`. The contents of this script are minimal and are better located with `rn-tester-e2e`.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53516117

fbshipit-source-id: e7e50af0383788f2219da190bf921ea93a6455eb
2024-02-07 08:31:29 -08:00

17 lines
582 B
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const SUPPORTED_PLATFORMS = ['ios', 'android'];
if (process.argv.length !== 3 || !SUPPORTED_PLATFORMS.includes(process.argv[2])) {
throw new Error(`Invalid platform. Supported platforms are: ${SUPPORTED_PLATFORMS.join(', ')}`);
}
const platform = process.argv[2];
const { execSync } = require('child_process');
execSync(`E2E_DEVICE=${platform} jest --runInBand`, { stdio: 'inherit' });