Skip to content

Commit

Permalink
test(plugins/npm): test public pre-releases cannot be greater than lo…
Browse files Browse the repository at this point in the history
…cal version
  • Loading branch information
hydrosquall committed Jul 22, 2021
1 parent 90b8ae9 commit ffd5c8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/npm/__tests__/npm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ describe("greaterRelease", () => {
await greaterRelease(prefixRelease, "test-package-name", "1.0.0")
).toBe("1.0.1");
});
test("should default to packageVersion if publishedVersion is greater but a pre-release", async () => {
execPromise.mockReturnValueOnce("1.0.1-next.0");
expect(
await greaterRelease(prefixRelease, "test-package-name", "1.0.0")
).toBe("1.0.1");
});
});

describe("getAuthor", () => {
Expand Down

0 comments on commit ffd5c8b

Please sign in to comment.