@@ -46,7 +46,7 @@ describe('haskell/actions/setup', () => {
4646 it ( 'Setting disable-matcher to true disables matcher' , ( ) => {
4747 forAllOS ( os => {
4848 const options = getOpts ( def ( os ) , os , {
49- 'disable-matcher' : 'true'
49+ disableMatcher : 'true'
5050 } ) ;
5151 expect ( options . general . matcher . enable ) . toBe ( false ) ;
5252 } ) ;
@@ -70,10 +70,10 @@ describe('haskell/actions/setup', () => {
7070 const v = { ghc : '8.6.5' , cabal : '3.4.1.0' , stack : '1.9.3' } ;
7171 forAllOS ( os => {
7272 const options = getOpts ( def ( os ) , os , {
73- 'enable-stack' : 'true' ,
74- 'stack-version' : '1' ,
75- 'ghc-version' : '8.6' ,
76- 'cabal-version' : '3.4'
73+ enableStack : 'true' ,
74+ stackVersion : '1' ,
75+ ghcVersion : '8.6' ,
76+ cabalVersion : '3.4'
7777 } ) ;
7878 forAllTools ( t => expect ( options [ t ] . resolved ) . toBe ( v [ t ] ) ) ;
7979 } ) ;
@@ -82,10 +82,10 @@ describe('haskell/actions/setup', () => {
8282 it ( '"latest" Versions resolve correctly' , ( ) => {
8383 forAllOS ( os => {
8484 const options = getOpts ( def ( os ) , os , {
85- 'enable-stack' : 'true' ,
86- 'stack-version' : 'latest' ,
87- 'ghc-version' : 'latest' ,
88- 'cabal-version' : 'latest'
85+ enableStack : 'true' ,
86+ stackVersion : 'latest' ,
87+ ghcVersion : 'latest' ,
88+ cabalVersion : 'latest'
8989 } ) ;
9090 forAllTools ( t =>
9191 expect ( options [ t ] . resolved ) . toBe (
@@ -100,10 +100,10 @@ describe('haskell/actions/setup', () => {
100100 const v = { ghc : '8.10.7' , cabal : '2.4.1.0' , stack : '2.1.3' } ;
101101 forAllOS ( os => {
102102 const options = getOpts ( def ( os ) , os , {
103- 'enable-stack' : 'true' ,
104- 'stack-version' : '2.1' ,
105- 'ghc-version' : '8.10' ,
106- 'cabal-version' : '2'
103+ enableStack : 'true' ,
104+ stackVersion : '2.1' ,
105+ ghcVersion : '8.10' ,
106+ cabalVersion : '2'
107107 } ) ;
108108 forAllTools ( t => expect ( options [ t ] . resolved ) . toBe ( v [ t ] ) ) ;
109109 } ) ;
@@ -112,7 +112,7 @@ describe('haskell/actions/setup', () => {
112112 it ( 'Enabling stack does not disable GHC or Cabal' , ( ) => {
113113 forAllOS ( os => {
114114 const { ghc, cabal, stack} = getOpts ( def ( os ) , os , {
115- 'enable-stack' : 'true'
115+ enableStack : 'true'
116116 } ) ;
117117 expect ( {
118118 ghc : ghc . enable ,
@@ -125,20 +125,20 @@ describe('haskell/actions/setup', () => {
125125 it ( 'Resolves revisions correctly on Windows' , ( ) => {
126126 // Test the case where there is a revision in chocolatey
127127 expect (
128- getOpts ( def ( 'win32' ) , 'win32' , { 'ghc-version' : '8.10.2' } ) . ghc . resolved
128+ getOpts ( def ( 'win32' ) , 'win32' , { ghcVersion : '8.10.2' } ) . ghc . resolved
129129 ) . toBe ( '8.10.2' ) ; // Andreas, 2022-12-29: revisions are handled locally in choco() now
130130
131131 // Test the case where there is not a revision in chocolatey
132132 expect (
133- getOpts ( def ( 'win32' ) , 'win32' , { 'ghc-version' : '8.8.1' } ) . ghc . resolved
133+ getOpts ( def ( 'win32' ) , 'win32' , { ghcVersion : '8.8.1' } ) . ghc . resolved
134134 ) . toBe ( '8.8.1' ) ;
135135 } ) ;
136136
137137 it ( 'Enabling stack-no-global disables GHC and Cabal' , ( ) => {
138138 forAllOS ( os => {
139139 const { ghc, cabal, stack} = getOpts ( def ( os ) , os , {
140- 'enable-stack' : 'true' ,
141- 'stack-no-global' : 'true'
140+ enableStack : 'true' ,
141+ stackNoGlobal : 'true'
142142 } ) ;
143143 expect ( {
144144 ghc : ghc . enable ,
@@ -150,13 +150,13 @@ describe('haskell/actions/setup', () => {
150150
151151 it ( 'Enabling stack-no-global without setting enable-stack errors' , ( ) => {
152152 forAllOS ( os =>
153- expect ( ( ) => getOpts ( def ( os ) , os , { 'stack-no-global' : 'true' } ) ) . toThrow ( )
153+ expect ( ( ) => getOpts ( def ( os ) , os , { stackNoGlobal : 'true' } ) ) . toThrow ( )
154154 ) ;
155155 } ) ;
156156
157157 it ( 'Enabling stack-setup-ghc without setting enable-stack errors' , ( ) => {
158158 forAllOS ( os =>
159- expect ( ( ) => getOpts ( def ( os ) , os , { 'stack-setup-ghc' : 'true' } ) ) . toThrow ( )
159+ expect ( ( ) => getOpts ( def ( os ) , os , { stackNoGlobal : 'true' } ) ) . toThrow ( )
160160 ) ;
161161 } ) ;
162162} ) ;
0 commit comments