diff --git a/src/test/behavior.c2.test.ts b/src/test/behavior.c2.test.ts index 5494e0f22..bfb222011 100644 --- a/src/test/behavior.c2.test.ts +++ b/src/test/behavior.c2.test.ts @@ -272,11 +272,10 @@ describe("Behavior Tests", () => { ["Variable class", "Stat docs", "Inst docs"], ); - equal(project.children?.map((c) => c.name), [ - "BadClass", - "CallableClass", - "VariableClass", - ]); + equal( + project.children?.map((c) => c.name), + ["BadClass", "CallableClass", "VariableClass"], + ); }); it("Handles const type parameters", () => { @@ -289,7 +288,10 @@ describe("Behavior Tests", () => { it("Handles declare global 'modules'", () => { const project = convert("declareGlobal"); - equal(project.children?.map((c) => c.name), ["DeclareGlobal"]); + equal( + project.children?.map((c) => c.name), + ["DeclareGlobal"], + ); }); it("Handles duplicate heritage clauses", () => { @@ -438,7 +440,10 @@ describe("Behavior Tests", () => { app.options.setValue("excludeCategories", ["A", "Default"]); app.options.setValue("defaultCategory", "Default"); const project = convert("excludeCategories"); - equal(project.children?.map((c) => c.name), ["c"]); + equal( + project.children?.map((c) => c.name), + ["c"], + ); }); it("Handles excludeNotDocumentedKinds", () => { @@ -515,12 +520,10 @@ describe("Behavior Tests", () => { const C = query(project, "C"); const D = query(project, "D"); - equal(project.groups?.map((g) => g.title), [ - "Variables", - "A", - "B", - "With Spaces", - ]); + equal( + project.groups?.map((g) => g.title), + ["Variables", "A", "B", "With Spaces"], + ); equal( project.groups?.map((g) => @@ -538,7 +541,10 @@ describe("Behavior Tests", () => { it("Inherits @group tag if comment is not redefined", () => { const project = convert("groupInheritance"); const cls = query(project, "Cls"); - equal(cls.groups?.map((g) => g.title), ["Constructors", "Group"]); + equal( + cls.groups?.map((g) => g.title), + ["Constructors", "Group"], + ); equal( cls.groups.map((g) => g.children), [[query(project, "Cls.constructor")], [query(project, "Cls.prop")]], @@ -549,7 +555,10 @@ describe("Behavior Tests", () => { app.options.setValue("categorizeByGroup", false); const project = convert("categoryInheritance"); const cls = query(project, "Cls"); - equal(cls.categories?.map((g) => g.title), ["Cat", "Other"]); + equal( + cls.categories?.map((g) => g.title), + ["Cat", "Other"], + ); equal( cls.categories?.map((g) => Comment.combineDisplayParts(g.description), @@ -565,12 +574,10 @@ describe("Behavior Tests", () => { it("Handles hidden accessors", () => { const project = convert("hiddenAccessor"); const test = query(project, "Test"); - equal(test.children?.map((c) => c.name), [ - "constructor", - "auto", - "x", - "y", - ]); + equal( + test.children?.map((c) => c.name), + ["constructor", "auto", "x", "y"], + ); }); it("Handles simple @inheritDoc cases", () => { @@ -941,10 +948,10 @@ describe("Behavior Tests", () => { equal(fooComments, ["No arg comment\n", "No arg comment\n"]); equal(foo.comment, undefined); - equal(foo.signatures?.map((s) => s.comment?.label), [ - "NO_ARGS", - "WITH_X", - ]); + equal( + foo.signatures?.map((s) => s.comment?.label), + ["NO_ARGS", "WITH_X"], + ); const bar = query(project, "bar"); const barComments = bar.signatures?.map((sig) => @@ -1062,7 +1069,10 @@ describe("Behavior Tests", () => { const project = convert("typeAliasInterface"); const bar = query(project, "Bar"); equal(bar.kind, ReflectionKind.Interface); - equal(bar.children?.map((c) => c.name), ["a", "b"]); + equal( + bar.children?.map((c) => c.name), + ["a", "b"], + ); const comments = [bar, bar.children[0], bar.children[1]].map((r) => Comment.combineDisplayParts(r.comment?.summary), @@ -1074,34 +1084,35 @@ describe("Behavior Tests", () => { it("Allows specifying group sort order #2251", () => { app.options.setValue("groupOrder", ["B", "Variables", "A"]); const project = convert("groupTag"); - equal(project.groups?.map((g) => g.title), [ - "B", - "Variables", - "A", - "With Spaces", - ]); + equal( + project.groups?.map((g) => g.title), + ["B", "Variables", "A", "With Spaces"], + ); }); it("Supports disabling sorting of entry points #2393", () => { app.options.setValue("sort", ["alphabetical"]); const project = convert("blockComment", "asConstEnum"); - equal(project.children?.map((c) => c.name), [ - "asConstEnum", - "blockComment", - ]); + equal( + project.children?.map((c) => c.name), + ["asConstEnum", "blockComment"], + ); app.options.setValue("sortEntryPoints", false); const project2 = convert("blockComment", "asConstEnum"); - equal(project2.children?.map((c) => c.name), [ - "blockComment", - "asConstEnum", - ]); + equal( + project2.children?.map((c) => c.name), + ["blockComment", "asConstEnum"], + ); }); it("Respects resolution-mode when resolving types", () => { app.options.setValue("excludeExternals", false); const MergedType = query(convert("resolutionMode"), "MergedType"); - equal(MergedType.children?.map((child) => child.name), ["cjs", "esm"]); + equal( + MergedType.children?.map((child) => child.name), + ["cjs", "esm"], + ); }); it("Special cases some `this` type occurrences", () => {