mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Simple integration test for bun run
This commit is contained in:
12
Makefile
12
Makefile
@@ -501,7 +501,7 @@ mkdir-dev:
|
||||
test-install:
|
||||
cd integration/scripts && pnpm install
|
||||
|
||||
test-all: test-install test-with-hmr test-no-hmr test-create-next test-create-react
|
||||
test-all: test-install test-with-hmr test-no-hmr test-create-next test-create-react test-bun-run
|
||||
|
||||
copy-test-node-modules:
|
||||
rm -rf integration/snippets/package-json-exports/node_modules || echo "";
|
||||
@@ -518,6 +518,9 @@ test-dev-create-react:
|
||||
test-create-next:
|
||||
BUN_BIN=$(RELEASE_BUN) bash integration/apps/bun-create-next.sh
|
||||
|
||||
test-bun-run:
|
||||
cd integration/apps && BUN_BIN=$(RELEASE_BUN) bash ./bun-run-check.sh
|
||||
|
||||
test-create-react:
|
||||
BUN_BIN=$(RELEASE_BUN) bash integration/apps/bun-create-react.sh
|
||||
|
||||
@@ -536,7 +539,10 @@ test-dev-no-hmr: copy-test-node-modules
|
||||
-killall bun-debug -9;
|
||||
DISABLE_HMR="DISABLE_HMR" BUN_BIN=$(DEBUG_BUN) node integration/scripts/browser.js
|
||||
|
||||
test-dev-all: test-dev-with-hmr test-dev-no-hmr test-dev-create-next text-dev-create-react
|
||||
test-dev-bun-run:
|
||||
cd integration/apps && BUN_BIN=$(DEBUG_BUN) bash bun-run-check.sh
|
||||
|
||||
test-dev-all: test-dev-with-hmr test-dev-no-hmr test-dev-create-next text-dev-create-react test-dev-bun-run
|
||||
|
||||
test-dev: test-dev-with-hmr
|
||||
|
||||
@@ -569,8 +575,6 @@ clean: clean-bindings
|
||||
(cd src/deps/picohttp && make clean) || echo "";
|
||||
(cd src/deps/zlib && make clean) || echo "";
|
||||
|
||||
|
||||
|
||||
jsc-bindings-mac: $(OBJ_FILES)
|
||||
|
||||
|
||||
|
||||
6
integration/apps/bun-run-check-package.json
Normal file
6
integration/apps/bun-run-check-package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "check",
|
||||
"scripts": {
|
||||
"this-should-work": "echo \"✅ bun run test passed!\""
|
||||
}
|
||||
}
|
||||
15
integration/apps/bun-run-check.sh
Normal file
15
integration/apps/bun-run-check.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
killall -9 $(basename $BUN_BIN) || echo "";
|
||||
|
||||
rm -rf /tmp/bun-run-check
|
||||
mkdir -p /tmp/bun-run-check
|
||||
|
||||
|
||||
cp ./bun-run-check-package.json /tmp/bun-run-check/package.json
|
||||
cd /tmp/bun-run-check
|
||||
bun run --silent this-should-work
|
||||
exit $?
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user