1+ const cmp = require ( 'semver-compare' ) ;
12const { emacsVersion, TestContext } = require ( "./helpers" ) ;
23
34describe ( "install and uninstall" , ( ) => {
@@ -12,8 +13,12 @@ describe("install and uninstall", () => {
1213 afterAll ( ( ) => ctx . cleanUp ( ) ) ;
1314
1415 it ( "installs project package" , async ( ) => {
15- await ctx . runEask ( "package" ) ; // creates dist/<pkg>.tar
16- await ctx . runEask ( "install" ) ; // installs dependencies and generated package
16+ // creates dist/<pkg>.tar
17+ await ctx . runEask ( "package" , { timeout : 40000 } ,
18+ // See https://github.com/emacs-eask/cli/issues/11.
19+ cmp ( await emacsVersion ( ) , "28.1" ) == - 1 ) ;
20+ // installs dependencies and generated package
21+ await ctx . runEask ( "install" ) ;
1722 const { stderr } = await ctx . runEask ( "list" ) ;
1823 expect ( stderr ) . toMatch ( packageName ) ;
1924 } ) ;
@@ -36,13 +41,18 @@ describe("install and uninstall", () => {
3641 } ) ;
3742
3843 it ( "uninstalls project package" , async ( ) => {
39- await ctx . runEask ( "uninstall" ) ;
44+ await ctx . runEask ( "uninstall" , { timeout : 40000 } ,
45+ // See https://github.com/emacs-eask/cli/issues/11.
46+ cmp ( await emacsVersion ( ) , "28.1" ) == - 1 ) ;
4047 const { stderr } = await ctx . runEask ( "list" ) ;
4148 expect ( stderr ) . not . toMatch ( packageName ) ;
4249 } ) ;
4350
4451 it ( "installs dependencies" , async ( ) => {
45- const { stderr } = await ctx . runEask ( "install-deps" ) ;
52+ const { stderr } = await ctx . runEask (
53+ "install-deps" , { timeout : 40000 } ,
54+ // See https://github.com/emacs-eask/cli/issues/11.
55+ cmp ( await emacsVersion ( ) , "28.1" ) == - 1 ) ;
4656 expect ( stderr ) . not . toMatch ( packageName ) ;
4757 } ) ;
4858
@@ -97,7 +107,7 @@ describe("install and uninstall", () => {
97107 /* VC install */
98108
99109 test . skip ( "installs vc directly" , async ( ) => {
100- if ( ( await emacsVersion ( ) ) >= "29.1" ) {
110+ if ( cmp ( await emacsVersion ( ) , "29.1" ) == 1 ) {
101111 const { stderr } = await ctx . runEask (
102112 "install-vc https://github.com/jcs-elpa/msgu"
103113 ) ;
0 commit comments