@pyreon/compiler 0.7.8 → 0.7.10
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 +1 -1
- package/src/tests/jsx.test.ts +7 -0
package/package.json
CHANGED
package/src/tests/jsx.test.ts
CHANGED
|
@@ -362,6 +362,13 @@ describe("JSX transform — edge cases", () => {
|
|
|
362
362
|
expect(t("<div>{items().map(x => x)}</div>")).toContain("() =>")
|
|
363
363
|
})
|
|
364
364
|
|
|
365
|
+
test("emits _bindText for method calls (runtime handles fallback)", () => {
|
|
366
|
+
// value.toLocaleString() — compiler emits _bindText, runtime falls back
|
|
367
|
+
// to renderEffect if source lacks .direct()
|
|
368
|
+
const result = t("<div><p>{value.toLocaleString()}</p></div>")
|
|
369
|
+
expect(result).toContain("_bindText(value.toLocaleString,")
|
|
370
|
+
})
|
|
371
|
+
|
|
365
372
|
test("wraps nested call in array expression", () => {
|
|
366
373
|
expect(t("<div>{[getItem()]}</div>")).toContain("() =>")
|
|
367
374
|
})
|