Skip to content

Commit 3f54312

Browse files
committed
Tidying up tests
1 parent 6a5b360 commit 3f54312

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/npm-publish.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ export async function npmPublish(opts: Options = {}): Promise<Results> {
3333
await npm.publish(manifest, options);
3434
}
3535

36+
// The version should be marked as lower if we disallow decrementing the version
37+
let type =
38+
(options.greaterVersion && cmp === -1 && "lower") || diff || "none";
39+
3640
let results: Results = {
3741
package: manifest.name,
38-
type: (options.greaterVersion && cmp === -1 && "lower") || diff || "none",
42+
type,
3943
version: manifest.version.raw,
4044
oldVersion: publishedVersion.raw,
4145
tag: options.tag,

test/specs/action/success.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ describe("GitHub Action - success tests", () => {
160160
});
161161

162162
expect(cli).to.have.stderr("");
163-
expect(cli).stdout.to.include("my-lib 0.1.0");
164163
expect(cli).stdout.to.include(
165164
"my-lib v0.1.0 is lower than the version published to NPM"
166165
);

0 commit comments

Comments
 (0)