Simple integration test for bun run

This commit is contained in:
Jarred Sumner
2021-10-26 19:06:45 -07:00
parent 00fb04f309
commit ff1417421b
3 changed files with 29 additions and 4 deletions

View File

@@ -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)

View File

@@ -0,0 +1,6 @@
{
"name": "check",
"scripts": {
"this-should-work": "echo \"✅ bun run test passed!\""
}
}

View 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 $?