mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
24 lines
632 B
Bash
Executable File
24 lines
632 B
Bash
Executable File
#!/bin/bash -ex
|
|
# This script is used to run the demo project' tests with a bloated JS bundle.
|
|
# See the original issue for the motivation behind this: https://github.com/wix/Detox/issues/3507
|
|
|
|
OS_PLATFORM=$1
|
|
WORKING_DIR=$(pwd)
|
|
BUNDLE_FILE=app.js
|
|
BUNDLE_PATH=$WORKING_DIR/$BUNDLE_FILE
|
|
|
|
echo "Bloating the demo project bundle for $OS_PLATFORM"
|
|
|
|
# Copy the original bundle to a temporary location:
|
|
cp $BUNDLE_PATH $BUNDLE_PATH.original
|
|
|
|
# Bloat the bundle:
|
|
yarn bloat-bundle ./$BUNDLE_FILE
|
|
|
|
# Run the tests:
|
|
yarn build:$OS_PLATFORM-release
|
|
yarn test:$OS_PLATFORM-release
|
|
|
|
# Reverse the bloating:
|
|
mv $BUNDLE_PATH.original $BUNDLE_PATH
|