@markjaquith/agency 2.32.0 → 2.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test"
|
|
2
2
|
import { testRender } from "@opentui/solid"
|
|
3
|
+
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises"
|
|
4
|
+
import { tmpdir } from "node:os"
|
|
5
|
+
import { dirname, join } from "node:path"
|
|
3
6
|
import {
|
|
4
7
|
fuzzyChoices,
|
|
5
8
|
InteractiveSelectPrompt,
|
|
@@ -8,6 +11,36 @@ import {
|
|
|
8
11
|
} from "./interactive"
|
|
9
12
|
|
|
10
13
|
describe("OpenTUI interaction", () => {
|
|
14
|
+
test("selects the Solid JSX runtime without the project preload", async () => {
|
|
15
|
+
const source = await Bun.file(
|
|
16
|
+
new URL("./interactive.tsx", import.meta.url),
|
|
17
|
+
).text()
|
|
18
|
+
const root = await mkdtemp(join(tmpdir(), "agency-interactive-jsx-"))
|
|
19
|
+
const entrypoint = join(
|
|
20
|
+
root,
|
|
21
|
+
"node_modules",
|
|
22
|
+
"@markjaquith",
|
|
23
|
+
"agency",
|
|
24
|
+
"interactive.tsx",
|
|
25
|
+
)
|
|
26
|
+
await mkdir(dirname(entrypoint), { recursive: true })
|
|
27
|
+
await writeFile(entrypoint, source)
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
const result = await Bun.build({
|
|
31
|
+
entrypoints: [entrypoint],
|
|
32
|
+
packages: "external",
|
|
33
|
+
target: "bun",
|
|
34
|
+
})
|
|
35
|
+
expect(result.success).toBeTrue()
|
|
36
|
+
const output = await result.outputs[0]!.text()
|
|
37
|
+
expect(output).toContain("@opentui/solid/jsx-dev-runtime")
|
|
38
|
+
expect(output).not.toContain("react/jsx-dev-runtime")
|
|
39
|
+
} finally {
|
|
40
|
+
await rm(root, { recursive: true, force: true })
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
|
|
11
44
|
test("uses the split-footer renderer contract", () => {
|
|
12
45
|
expect(interactiveRendererConfig).toMatchObject({
|
|
13
46
|
screenMode: "split-footer",
|