File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/graphiql-toolkit/src/create-fetcher/__tests__ Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -90,15 +90,17 @@ describe('getWsFetcher', () => {
90
90
} ) ;
91
91
} ) ;
92
92
93
- describe ( 'missing graphql-ws dependency' , ( ) => {
94
- it ( 'should throw a nice error' , ( ) => {
93
+ describe ( 'missing ` graphql-ws` dependency' , ( ) => {
94
+ it ( 'should throw a nice error' , async ( ) => {
95
95
jest . resetModules ( ) ;
96
96
jest . doMock ( 'graphql-ws' , ( ) => {
97
97
// eslint-disable-next-line no-throw-literal
98
98
throw { code : 'MODULE_NOT_FOUND' } ;
99
99
} ) ;
100
100
101
- expect ( createWebsocketsFetcherFromUrl ( 'wss://example.com' ) ) . rejects . toThrow (
101
+ await expect (
102
+ createWebsocketsFetcherFromUrl ( 'wss://example.com' ) ,
103
+ ) . rejects . toThrow (
102
104
/ Y o u n e e d t o i n s t a l l t h e ' g r a p h q l - w s ' p a c k a g e t o u s e w e b s o c k e t s w h e n p a s s i n g a ' s u b s c r i p t i o n U r l ' / ,
103
105
) ;
104
106
} ) ;
You can’t perform that action at this time.
0 commit comments