Skip to content

Generate tests in header-parser with Vanilla#1283

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

Generate tests in header-parser with Vanilla#1283
JanKrivanek wants to merge 1 commit intomicrosoft:mainfrom
JanKrivanek:dev/jankrivanek/testgen-headerparser-vanilla

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.

From memory, this looks like complete coverage of the properties we neglected to test. Those are low-value but it's nice to have better coverage.

});

it("rejects nonNpm: true with non-string nonNpmDescription", () => {
const result = validatePackageJson("mylib", makePkg({ nonNpm: true, nonNpmDescription: 123 }), []);
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 coverage of edge cases

};
}

it("rejects missing projects", () => {
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.

this is one that's basic enough that I had trouble remembering what it was testing. So it's a good check-your-assumptions case.

@@ -1,4 +1,15 @@
import { validatePackageJson, makeTypesVersionsForPackageJson, License, getLicenseFromPackageJson } from "../src";
import {
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.

don't reformat these; this repo is formatted by prettier (or dprint? can't remember)

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.

oh that's because there are more things imported now

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