release: WRNexusJS 0.6.0
This commit is contained in:
@@ -245,3 +245,13 @@ test("expands inline if blocks around HTML", () => {
|
||||
assert.equal(formatWrn(source, options), expected);
|
||||
assert.equal(formatWrn(expected, options), expected);
|
||||
});
|
||||
|
||||
test("formats v0.6 grouped state and outputs blocks", () => {
|
||||
const source = `component Demo {\nprops { title: string open: boolean = false }\nstate { count: number = 0 loading = false }\noutputs { confirm(payload: ConfirmPayload) cancel() }\nview { <div/> }\n}`;
|
||||
const formatted = formatWrn(source, { tabSize: 2, insertSpaces: true });
|
||||
assert.match(formatted, /\n {2}state \{\n {4}count: number = 0\n {4}loading = false\n {2}\}/);
|
||||
assert.match(
|
||||
formatted,
|
||||
/\n {2}outputs \{\n {4}confirm\(payload: ConfirmPayload\)\n {4}cancel\(\)\n {2}\}/,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user