File tree Expand file tree Collapse file tree
packages/apollo-language-server/src/config/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,8 +153,14 @@ describe("loadConfig", () => {
153153 writeFilesToDir ( dir , {
154154 "package.json" : `{"apollo":{"client": {"service": "hello"}} }`
155155 } ) ;
156+
157+ // silence the warning
158+ const spy = jest . spyOn ( console , "warn" ) ;
159+ spy . mockImplementationOnce ( ( ) => { } ) ;
160+
156161 const config = await loadConfig ( { configPath : dirPath } ) ;
157162
163+ spy . mockRestore ( ) ;
158164 expect ( config . client . service ) . toEqual ( "hello" ) ;
159165 } ) ;
160166
@@ -168,7 +174,7 @@ describe("loadConfig", () => {
168174 } ) ;
169175 } ) ;
170176
171- fdescribe ( "errors" , ( ) => {
177+ describe ( "errors" , ( ) => {
172178 it ( "throws when config file is empty" , async ( ) => {
173179 writeFilesToDir ( dir , { "my.config.js" : `` } ) ;
174180
@@ -336,20 +342,6 @@ describe("loadConfig", () => {
336342
337343 expect ( config . isService ) . toEqual ( true ) ;
338344 } ) ;
339-
340- it ( "throws if project type cant be inferred" , done => {
341- writeFilesToDir ( dir , {
342- "my.config.js" : `module.exports = { engine: { endpoint: 'http://a.a' } }`
343- } ) ;
344-
345- return loadConfig ( {
346- configPath : dirPath ,
347- configFileName : "my.config.js"
348- } ) . catch ( err => {
349- expect ( err . message ) . toMatch ( / .* U n a b l e t o r e s o l v e p r o j e c t t y p e .* / ) ;
350- done ( ) ;
351- } ) ;
352- } ) ;
353345 } ) ;
354346
355347 describe ( "service name" , ( ) => {
You can’t perform that action at this time.
0 commit comments