release: WRNexusJS 0.8.0
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { migrateV060WrnSource } from "../src/update.ts";
|
||||
import { formatCurrentWrnSource, migrateV060WrnSource } from "../src/update.ts";
|
||||
|
||||
const report = () => ({
|
||||
changedAutomatically: [],
|
||||
@@ -30,4 +30,16 @@ describe("v0.6 source migration", () => {
|
||||
expect(first).toContain("output.confirm({ ok: true })");
|
||||
expect(second).toBe(first);
|
||||
});
|
||||
|
||||
test("uses the canonical framework formatter idempotently", () => {
|
||||
const source = `page Home {
|
||||
view {
|
||||
<button type="button" class="one two three four five six seven eight nine ten eleven twelve" @click='save()'>Save</button>
|
||||
}
|
||||
}`;
|
||||
const formatted = formatCurrentWrnSource(source);
|
||||
|
||||
expect(formatted).toContain("<button\n");
|
||||
expect(formatCurrentWrnSource(formatted)).toBe(formatted);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user