@@ -98,16 +98,17 @@ a `shouldNotContain` b = shouldNotSatisfy a (T.isInfixOf b)
9898
9999axiosSpec :: Spec
100100axiosSpec = describe specLabel $ do
101+ let reqList = listFromAPI (Proxy :: Proxy LangJS) (Proxy :: Proxy TestAPI)
101102 it "should add withCredentials when needed" $ do
102− let jsText = genJS withCredOpts $ listFromAPI (Proxy :: Proxy TestAPI)
103+ let jsText = genJS withCredOpts $ reqList
103104 output jsText
104105 jsText `shouldContain` "withCredentials: true"
105106 it "should add xsrfCookieName when needed" $ do
106− let jsText = genJS cookieOpts $ listFromAPI (Proxy :: Proxy TestAPI)
107+ let jsText = genJS cookieOpts $ reqList
107108 output jsText
108109 jsText `shouldContain` ("xsrfCookieName: 'MyXSRFcookie'")
109110 it "should add withCredentials when needed" $ do
110− let jsText = genJS headerOpts $ listFromAPI (Proxy :: Proxy TestAPI)
111+ let jsText = genJS headerOpts $ reqList
111112 output jsText
112113 jsText `shouldContain` ("xsrfHeaderName: 'MyXSRFheader'")
113114 where
@@ -121,18 +122,19 @@ axiosSpec = describe specLabel $ do
121122
122123angularSpec :: TestNames -> Spec
123124angularSpec test = describe specLabel $ do
125+ let reqList = listFromAPI (Proxy :: Proxy LangJS) (Proxy :: Proxy TestAPI)
124126 it "should implement a service globally" $ do
125− let jsText = genJS $ listFromAPI (Proxy :: Proxy TestAPI)
127+ let jsText = genJS reqList
126128 output jsText
127129 jsText `shouldContain` (".service('" <> testName <> "'")
128130
129131 it "should depend on $http service globally" $ do
130− let jsText = genJS $ listFromAPI (Proxy :: Proxy TestAPI)
132+ let jsText = genJS reqList
131133 output jsText
132134 jsText `shouldContain` ("('" <> testName <> "', function($http) {")
133135
134136 it "should not depend on $http service in handlers" $ do
135− let jsText = genJS $ listFromAPI (Proxy :: Proxy TestAPI)
137+ let jsText = genJS reqList
136138 output jsText
137139 jsText `shouldNotContain` "getsomething($http, "
138140 where