Skip to content

Commit 031a4cb

Browse files
committed
test: Use cmd version comparison instead
1 parent 4575474 commit 031a4cb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/jest/install.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe("install and uninstall", () => {
107107
/* VC install */
108108

109109
test.skip("installs vc directly", async () => {
110-
if ((await emacsVersion()) >= "29.1") {
110+
if (cmp(await emacsVersion(), "29.1") == 1) {
111111
const { stderr } = await ctx.runEask(
112112
"install-vc https://github.com/jcs-elpa/msgu"
113113
);

test/jest/local.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe("local", () => {
5555
// NOTE: eask loc is a long running command
5656
it("loc", async () => {
5757
// installs markdown mode -- depends on emacs 28.1
58-
if ((await emacsVersion()) >= "28.1") {
58+
if (cmp(await emacsVersion(), "28.1") == 1) {
5959
await ctx.runEask("loc");
6060
await ctx.runEask("loc Eask");
6161
}
@@ -241,7 +241,7 @@ describe("local", () => {
241241
});
242242

243243
it("lint regexps", async () => {
244-
if ((await emacsVersion()) >= "27.1") {
244+
if (cmp(await emacsVersion(), "27.1") == 1) {
245245
await ctx.runEask("lint regexps");
246246
}
247247
});
@@ -260,7 +260,7 @@ describe("local", () => {
260260
describe("Formatting", () => {
261261
// installs elisp-autofmt
262262
it("format elisp-autofmt", async () => {
263-
if ((await emacsVersion()) >= "29.1") {
263+
if (cmp(await emacsVersion(), "29.1") == 1) {
264264
await ctx.runEask("format elisp-autofmt");
265265
}
266266
});

0 commit comments

Comments
 (0)