File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
search-javascript/lib/testcase/sampling Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -66,19 +66,9 @@ export class RootContext extends FrameworkRootContext<t.Node> {
66
66
protected _targetFiles : Set < string > ;
67
67
protected _analysisFiles : Set < string > ;
68
68
69
- // filePath -> id -> element
70
- protected _elementMap : Map < string , Map < string , Element > > ;
71
- // filePath -> id -> relation
72
- protected _relationMap : Map < string , Map < string , Relation > > ;
73
- // filePath -> id -> object
74
- protected _objectMap : Map < string , Map < string , DiscoveredObjectType > > ;
75
-
76
69
protected _typeModel : TypeModel ;
77
70
protected _typePool : TypePool ;
78
71
79
- // Mapping: filePath -> target name -> Exports
80
- protected _exportMap : Map < string , Export [ ] > ;
81
-
82
72
get targetFiles ( ) {
83
73
return this . _targetFiles ;
84
74
}
Original file line number Diff line number Diff line change @@ -750,7 +750,7 @@ export class JavaScriptRandomSampler extends JavaScriptTestCaseSampler {
750
750
. getTypeModel ( )
751
751
. getObjectDescription ( typeId ) ;
752
752
753
- const parameters : string [ ] = [ ] ;
753
+ let parameters : string [ ] = [ ] ;
754
754
755
755
for ( const [ index , name ] of typeObject . parameterNames . entries ( ) ) {
756
756
parameters [ index ] = name ;
@@ -763,6 +763,11 @@ export class JavaScriptRandomSampler extends JavaScriptTestCaseSampler {
763
763
}
764
764
}
765
765
766
+ // filter duplicates
767
+ parameters = parameters . filter (
768
+ ( item , index ) => parameters . indexOf ( item ) === index
769
+ ) ;
770
+
766
771
if ( typeObject . return . size === 0 ) {
767
772
return new ArrowFunctionStatement (
768
773
id ,
You can’t perform that action at this time.
0 commit comments