mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
24 lines
778 B
TypeScript
24 lines
778 B
TypeScript
import { expect, test } from "bun:test";
|
|
import fs from "fs";
|
|
import { bunEnv, bunExe } from "harness";
|
|
import { join } from "path";
|
|
|
|
test("JSXElement with mismatched closing tags produces a syntax error", async () => {
|
|
const files = await fs.promises.readdir(import.meta.dir);
|
|
const fixtures = files.filter(file => !file.endsWith(".test.ts")).map(fixture => join(import.meta.dir, fixture));
|
|
|
|
const bakery = fixtures.map(
|
|
fixture =>
|
|
Bun.spawn({
|
|
cmd: [bunExe(), fixture],
|
|
cwd: import.meta.dir,
|
|
stdio: ["inherit", "inherit", "inherit"],
|
|
env: bunEnv,
|
|
}).exited,
|
|
);
|
|
|
|
// all subprocesses should fail.
|
|
const exited = await Promise.all(bakery);
|
|
expect(exited).toEqual(Array.from({ length: fixtures.length }, () => 1));
|
|
});
|