Fix tests

This commit is contained in:
Jarred Sumner
2022-07-05 11:04:59 -07:00
parent 0d54275314
commit 70e2bda971
4 changed files with 4 additions and 4 deletions

View File

@@ -6,14 +6,13 @@ rm -rf /tmp/react-app
mkdir -p /tmp/react-app
$BUN_BIN create react /tmp/react-app
if (($?)); then
echo "bun create failed"
exit 1
fi
cd /tmp/react-app
BUN_CRASH_WITHOUT_JIT=1 $BUN_BIN --port 8087 &
BUN_CRASH_WITHOUT_JIT=1 $BUN_BIN dev --port 8087 &
sleep 0.005
curl --fail http://localhost:8087/ && curl --fail http://localhost:8087/src/index.jsx && killall -9 $(basename $BUN_BIN) && echo "✅ bun create react passed."

View File

@@ -21,7 +21,7 @@ echo $static_content >"$dir/static.txt"
echo $css_not_transpiled_content >"$dir/css_not_transpiled_content.css"
cd $dir
$BUN_BIN --port 8087 &
$BUN_BIN dev --port 8087 &
sleep 0.005
if [[ "$(curl --fail -sS http://localhost:8087/)" != "$index_content" ]]; then

View File

@@ -18,7 +18,7 @@ echo $bacon_content >"$dir/public/bacon.html"
cd $dir
$BUN_BIN --port 8087 &
$BUN_BIN dev --port 8087 &
sleep 0.005
if [ "$(curl --fail -sS http://localhost:8087/)" != "$index_content" ]; then

View File

@@ -9,6 +9,7 @@ const serverURL = process.env.TEST_SERVER_URL || "http://localhost:8080";
const USE_EXISTING_PROCESS = process.env.USE_EXISTING_PROCESS || false;
const DISABLE_HMR = !!process.env.DISABLE_HMR;
const bunFlags = [
"dev",
`--origin=${serverURL}`,
DISABLE_HMR && "--disable-hmr",
].filter(Boolean);