@@ -91,28 +91,24 @@ describe('throwIfMoreThanOneModuleRegistryCalls', () => {
9191      { name : 'callExpression1' } , 
9292      { name : 'callExpression2' } , 
9393    ] ; 
94-     const  parserType  =  'Flow' ; 
9594
9695    expect ( ( )  =>  { 
9796      throwIfMoreThanOneModuleRegistryCalls ( 
9897        nativeModuleName , 
9998        callExpressions , 
10099        callExpressions . length , 
101-         parserType , 
102100      ) ; 
103101    } ) . toThrow ( MoreThanOneModuleRegistryCallsParserError ) ; 
104102  } ) ; 
105103  it ( "don't throw error if single module registry call" ,  ( )  =>  { 
106104    const  nativeModuleName  =  'moduleName' ; 
107105    const  callExpressions  =  [ { name : 'callExpression1' } ] ; 
108-     const  parserType  =  'TypeScript' ; 
109106
110107    expect ( ( )  =>  { 
111108      throwIfMoreThanOneModuleRegistryCalls ( 
112109        nativeModuleName , 
113110        callExpressions , 
114111        callExpressions . length , 
115-         parserType , 
116112      ) ; 
117113    } ) . not . toThrow ( MoreThanOneModuleRegistryCallsParserError ) ; 
118114  } ) ; 
@@ -123,13 +119,11 @@ describe('throwIfUnusedModuleInterfaceParserError', () => {
123119    const  nativeModuleName  =  'moduleName' ; 
124120    const  callExpressions : Array < $FlowFixMe >  = [];
125121    const spec = { name : 'Spec' } ;
126-     const parserType = 'Flow';
127122    expect(() =>  { 
128123      throwIfUnusedModuleInterfaceParserError ( 
129124        nativeModuleName , 
130125        spec , 
131126        callExpressions , 
132-         parserType , 
133127      ) ; 
134128    } ).toThrow(UnusedModuleInterfaceParserError);
135129  } ) ; 
@@ -138,13 +132,11 @@ describe('throwIfUnusedModuleInterfaceParserError', () => {
138132    const  nativeModuleName  =  'moduleName' ; 
139133    const  callExpressions  =  [ { name : 'callExpression1' } ] ; 
140134    const  spec  =  { name : 'Spec' } ; 
141-     const  parserType  =  'TypeScript' ; 
142135    expect ( ( )  =>  { 
143136      throwIfUnusedModuleInterfaceParserError ( 
144137        nativeModuleName , 
145138        spec , 
146139        callExpressions , 
147-         parserType , 
148140      ) ; 
149141    } ) . not . toThrow ( UnusedModuleInterfaceParserError ) ; 
150142  } ) ; 
@@ -156,14 +148,12 @@ describe('throwErrorIfWrongNumberOfCallExpressionArgs', () => {
156148    const  flowCallExpression : { argument : Array < $FlowFixMe > }  =  { argument : [ ] } ; 
157149    const  methodName  =  'methodName' ; 
158150    const  numberOfCallExpressionArgs  =  flowCallExpression . argument . length ; 
159-     const  language  =  'Flow' ; 
160151    expect ( ( )  =>  { 
161152      throwIfWrongNumberOfCallExpressionArgs ( 
162153        nativeModuleName , 
163154        flowCallExpression , 
164155        methodName , 
165156        numberOfCallExpressionArgs , 
166-         language , 
167157      ) ; 
168158    } ) . toThrow ( IncorrectModuleRegistryCallArityParserError ) ; 
169159  } ) ; 
@@ -173,14 +163,12 @@ describe('throwErrorIfWrongNumberOfCallExpressionArgs', () => {
173163    const  flowCallExpression  =  { argument : [ 'argument' ] } ; 
174164    const  methodName  =  'methodName' ; 
175165    const  numberOfCallExpressionArgs  =  flowCallExpression . argument . length ; 
176-     const  language  =  'Flow' ; 
177166    expect ( ( )  =>  { 
178167      throwIfWrongNumberOfCallExpressionArgs ( 
179168        nativeModuleName , 
180169        flowCallExpression , 
181170        methodName , 
182171        numberOfCallExpressionArgs , 
183-         language , 
184172      ) ; 
185173    } ) . not . toThrow ( IncorrectModuleRegistryCallArityParserError ) ; 
186174  } ) ; 
@@ -191,8 +179,7 @@ describe('throwIfUnsupportedFunctionReturnTypeAnnotationParserError', () => {
191179      returnType : '' , 
192180    } , 
193181    nativeModuleName  =  'moduleName' , 
194-     invalidReturnType  =  'FunctionTypeAnnotation' , 
195-     language  =  'Flow' ; 
182+     invalidReturnType  =  'FunctionTypeAnnotation' ; 
196183
197184  it ( 'do not throw error if cxxOnly is true' ,  ( )  =>  { 
198185    const  cxxOnly  =  true , 
@@ -203,7 +190,6 @@ describe('throwIfUnsupportedFunctionReturnTypeAnnotationParserError', () => {
203190        nativeModuleName , 
204191        returnTypeAnnotation , 
205192        invalidReturnType , 
206-         language , 
207193        cxxOnly , 
208194        returnType , 
209195      ) ; 
@@ -219,7 +205,6 @@ describe('throwIfUnsupportedFunctionReturnTypeAnnotationParserError', () => {
219205        nativeModuleName , 
220206        returnTypeAnnotation , 
221207        invalidReturnType , 
222-         language , 
223208        cxxOnly , 
224209        returnType , 
225210      ) ; 
@@ -235,7 +220,6 @@ describe('throwIfUnsupportedFunctionReturnTypeAnnotationParserError', () => {
235220        nativeModuleName , 
236221        returnTypeAnnotation , 
237222        invalidReturnType , 
238-         language , 
239223        cxxOnly , 
240224        returnType , 
241225      ) ; 
@@ -485,15 +469,13 @@ describe('throwIfUntypedModule', () => {
485469
486470  it('should throw error if module does not have a type', () =>  { 
487471    const  typeArguments  =  null ; 
488-     const  language  =  'Flow' ; 
489472    expect ( ( )  => 
490473      throwIfUntypedModule ( 
491474        typeArguments , 
492475        hasteModuleName , 
493476        callExpressions , 
494477        methodName , 
495478        moduleName , 
496-         language , 
497479      ) , 
498480    ) . toThrowError ( UntypedModuleRegistryCallParserError ) ; 
499481  } );
@@ -504,15 +486,13 @@ describe('throwIfUntypedModule', () => {
504486      params : [ ] , 
505487    } ; 
506488
507-     const  language  =  'TypeScript' ; 
508489    expect ( ( )  => 
509490      throwIfUntypedModule ( 
510491        typeArguments , 
511492        hasteModuleName , 
512493        callExpressions , 
513494        methodName , 
514495        moduleName , 
515-         language , 
516496      ) , 
517497    ) . not . toThrowError ( UntypedModuleRegistryCallParserError ) ; 
518498  } );
@@ -644,7 +624,6 @@ describe('throwIfArrayElementTypeAnnotationIsUnsupported', () => {
644624    UnsupportedArrayElementTypeAnnotationParserError, 
645625  }  =  require ( '../errors.js' ) ; 
646626  const  moduleName  =  'moduleName' ; 
647-   const  language  =  'Flow' ; 
648627
649628  it ( 'throws the error if it is the type is void type annotation' ,  ( )  =>  { 
650629    expect ( ( )  =>  { 
@@ -653,7 +632,6 @@ describe('throwIfArrayElementTypeAnnotationIsUnsupported', () => {
653632        undefined , 
654633        'Array' , 
655634        'VoidTypeAnnotation' , 
656-         language , 
657635      ) ; 
658636    } ) . toThrow ( UnsupportedArrayElementTypeAnnotationParserError ) ; 
659637  } ) ; 
@@ -665,7 +643,6 @@ describe('throwIfArrayElementTypeAnnotationIsUnsupported', () => {
665643        undefined , 
666644        'Array' , 
667645        'PromiseTypeAnnotation' , 
668-         language , 
669646      ) ; 
670647    } ) . toThrow ( UnsupportedArrayElementTypeAnnotationParserError ) ; 
671648  } ) ; 
@@ -677,7 +654,6 @@ describe('throwIfArrayElementTypeAnnotationIsUnsupported', () => {
677654        undefined , 
678655        'Array' , 
679656        'FunctionTypeAnnotation' , 
680-         language , 
681657      ) ; 
682658    } ) . toThrow ( UnsupportedArrayElementTypeAnnotationParserError ) ; 
683659  } ) ; 
@@ -689,7 +665,6 @@ describe('throwIfArrayElementTypeAnnotationIsUnsupported', () => {
689665        undefined , 
690666        'Array' , 
691667        'StringTypeAnnotation' , 
692-         language , 
693668      ) ; 
694669    } ) . not . toThrow ( UnsupportedArrayElementTypeAnnotationParserError ) ; 
695670  } ) ; 
0 commit comments