Skip to content

Generate tests in header-parser with CTA#1282

Draft
JanKrivanek wants to merge 1 commit intomicrosoft:mainfrom
JanKrivanek:dev/jankrivanek/testgen-headerparser-cta
Draft

Generate tests in header-parser with CTA#1282
JanKrivanek wants to merge 1 commit intomicrosoft:mainfrom
JanKrivanek:dev/jankrivanek/testgen-headerparser-cta

Conversation

@JanKrivanek
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot fewer changes than the other PR, and it didn't test validPackageJson at all.

Comment thread package-lock.json
@@ -0,0 +1,9377 @@
{
"name": "definitelytyped-tools",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't have created a package-lock

devDependencies: { "@types/mylib": "workspace:." },
};

it("returns a valid header for a correct package.json", () => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice to have 1 additional positive test

expect(Array.isArray(result)).toBe(false);
});

// nonNpm validation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nicer as a nested describe like the other PR

expect(result).toEqual(expect.arrayContaining([expect.stringContaining(`has bad "tsconfigs"`)]));
});

// NOTE: The following tests document current behavior. The validateTsconfigs function
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find if true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants