aboutsummaryrefslogtreecommitdiff
path: root/test/bundler/cli.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/bundler/cli.test.ts')
-rw-r--r--test/bundler/cli.test.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/bundler/cli.test.ts b/test/bundler/cli.test.ts
new file mode 100644
index 000000000..e2f99a9ed
--- /dev/null
+++ b/test/bundler/cli.test.ts
@@ -0,0 +1,16 @@
+import { bunEnv, bunExe } from "harness";
+import path from "path";
+import { describe, expect, test } from "bun:test";
+
+describe("bun build", () => {
+ test("warnings dont return exit code 1", () => {
+ const { stderr, exitCode } = Bun.spawnSync({
+ cmd: [bunExe(), "build", path.join(import.meta.dir, "./fixtures/jsx-warning/index.jsx")],
+ env: bunEnv,
+ });
+ expect(exitCode).toBe(0);
+ expect(stderr.toString("utf8")).toContain(
+ 'warn: "key" prop before a {...spread} is deprecated in JSX. Falling back to classic runtime.',
+ );
+ });
+});