Skip to content

Commit

Permalink
feat: more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Jul 1, 2024
1 parent 14b4e3c commit 357cb5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/NodeParser/InterfaceAndClassNodeParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class InterfaceAndClassNodeParser implements SubNodeParser {
if (ts.isConstructorDeclaration(member)) {
const params = member.parameters.filter((param) =>
ts.isParameterPropertyDeclaration(param, param.parent),
) as ts.ParameterPropertyDeclaration[];
);
members.push(...params);
} else if (ts.isPropertySignature(member) || ts.isPropertyDeclaration(member)) {
members.push(member);
Expand Down
3 changes: 3 additions & 0 deletions test/valid-data-other.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ describe("valid-data-other", () => {
it("generic-simple", assertValidSchema("generic-simple", "*", { expose: "all" }));
it("generic-arrays", assertValidSchema("generic-arrays", "MyObject"));
it("generic-multiple", assertValidSchema("generic-multiple", "MyObject"));
it("generic-multiple", assertValidSchema("generic-multiple", "*", { expose: "all" }));
it("generic-multiargs", assertValidSchema("generic-multiargs", "MyObject"));
it("generic-anonymous", assertValidSchema("generic-anonymous", "MyObject"));
it("generic-anonymous", assertValidSchema("generic-anonymous", "*", { expose: "all" }));
it("generic-recursive", assertValidSchema("generic-recursive", "MyObject"));
it("generic-hell", assertValidSchema("generic-hell", "MyObject"));
it("generic-hell", assertValidSchema("generic-hell", "*", { expose: "all" }));
it("generic-default-conditional", assertValidSchema("generic-default-conditional", "MyObject"));
it("generic-default", assertValidSchema("generic-default", "MyObject"));
it("generic-nested", assertValidSchema("generic-nested", "MyObject"));
Expand Down

0 comments on commit 357cb5a

Please sign in to comment.