mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Fix tests
This commit is contained in:
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user