diff options
Diffstat (limited to 'test/apps/bun-dev-index-html.sh')
-rw-r--r-- | test/apps/bun-dev-index-html.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/apps/bun-dev-index-html.sh b/test/apps/bun-dev-index-html.sh index 77891f0c7..f34bf11a2 100644 --- a/test/apps/bun-dev-index-html.sh +++ b/test/apps/bun-dev-index-html.sh @@ -2,9 +2,9 @@ set -euo pipefail -killall -9 "$(basename "$BUN_BIN")" || echo "" +killall -9 $(basename $BUN_BIN) || echo "" -DIR=$(mktemp -d -t bun-dev-check) +dir=$(mktemp -d --suffix=bun-dev-check) index_content="<html><body>index.html</body></html>" bacon_content="<html><body>bacon.html</body></html>" @@ -14,14 +14,14 @@ css_not_transpiled_content="@import url(/index.js); @import url(/i-dont-exist.cs css_is_transpiled_import="*{background-color:red;}" css_is_transpiled="@import url(./css_is_transpiled_import.css);" -echo $index_content >"$DIR/index.html" -echo $js_content >"$DIR/index.js" -echo $bacon_content >"$DIR/bacon.html" -echo $static_content >"$DIR/static.txt" -echo $css_not_transpiled_content >"$DIR/css_not_transpiled_content.css" +echo $index_content >"$dir/index.html" +echo $js_content >"$dir/index.js" +echo $bacon_content >"$dir/bacon.html" +echo $static_content >"$dir/static.txt" +echo $css_not_transpiled_content >"$dir/css_not_transpiled_content.css" -cd "$DIR" -$BUN_BIN dev --port 8087 & +cd $dir +$BUN_BIN --port 8087 & sleep 0.005 if [[ "$(curl --fail -sS http://localhost:8087/)" != "$index_content" ]]; then @@ -65,5 +65,5 @@ if [[ "$(curl --fail -sS http://localhost:8087/bacon.html)" != "$bacon_content" exit 1 fi -killall -9 "$(basename "$BUN_BIN")" || echo "" +killall -9 $(basename $BUN_BIN) || echo "" echo "✅ bun dev index html check passed." |