release: WRNexusJS 0.3.0
This commit is contained in:
@@ -168,3 +168,23 @@ test("update verification formats before checking and building", () => {
|
||||
test("update verification skips unavailable scripts", () => {
|
||||
expect(verificationCommands({ check: "bun run lint" })).toEqual([["run", "check"]]);
|
||||
});
|
||||
|
||||
test("0.3 WRN source normalization is conservative and idempotent", async () => {
|
||||
const { migrateWrnSource } = await import("../src/update.ts");
|
||||
const source = `component Card {
|
||||
props { eyebrow = "" title = "" description = "" align = "start" class = "" }
|
||||
view {
|
||||
<FeatureList items={items} emptyLabel="No items" />
|
||||
<button @click={save()} data-config={{ nested: true }}>Save</button>
|
||||
}
|
||||
}`;
|
||||
|
||||
const migrated = migrateWrnSource(source);
|
||||
expect(migrated).toContain("props {\n");
|
||||
expect(migrated).toContain(' eyebrow = ""');
|
||||
expect(migrated).toContain("items='{items}'");
|
||||
expect(migrated).toContain("@click='{save()}'");
|
||||
// Nested brace expressions are deliberately left untouched for manual review.
|
||||
expect(migrated).toContain("data-config={{ nested: true }}");
|
||||
expect(migrateWrnSource(migrated)).toBe(migrated);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user