@@ -761,8 +761,17 @@ describe('utils', () => {
761
761
sourceType : 'script' ,
762
762
nodejsScope : true ,
763
763
} ) ;
764
+ const context = {
765
+ sourceCode : {
766
+ getDeclaredVariables :
767
+ scopeManager . getDeclaredVariables . bind ( scopeManager ) ,
768
+ } ,
769
+ } ; // mock object
770
+ context . getSourceCode = function ( ) {
771
+ return context . sourceCode ;
772
+ } ; // make eslint v7 tests passing
764
773
assert . deepEqual (
765
- utils . getTestInfo ( scopeManager , ast ) ,
774
+ utils . getTestInfo ( context , ast ) ,
766
775
[ ] ,
767
776
'Expected no tests to be found'
768
777
) ;
@@ -827,7 +836,16 @@ describe('utils', () => {
827
836
sourceType : 'script' ,
828
837
nodejsScope : true ,
829
838
} ) ;
830
- const testInfo = utils . getTestInfo ( scopeManager , ast ) ;
839
+ const context = {
840
+ sourceCode : {
841
+ getDeclaredVariables :
842
+ scopeManager . getDeclaredVariables . bind ( scopeManager ) ,
843
+ } ,
844
+ } ; // mock object
845
+ context . getSourceCode = function ( ) {
846
+ return context . sourceCode ;
847
+ } ; // to make eslint v7 tests passing
848
+ const testInfo = utils . getTestInfo ( context , ast ) ;
831
849
832
850
assert . strictEqual (
833
851
testInfo . length ,
@@ -1021,7 +1039,16 @@ describe('utils', () => {
1021
1039
sourceType : 'script' ,
1022
1040
nodejsScope : true ,
1023
1041
} ) ;
1024
- const testInfo = utils . getTestInfo ( scopeManager , ast ) ;
1042
+ const context = {
1043
+ sourceCode : {
1044
+ getDeclaredVariables :
1045
+ scopeManager . getDeclaredVariables . bind ( scopeManager ) ,
1046
+ } ,
1047
+ } ; // mock object
1048
+ context . getSourceCode = function ( ) {
1049
+ return context . sourceCode ;
1050
+ } ; // make eslint v7 tests passing
1051
+ const testInfo = utils . getTestInfo ( context , ast ) ;
1025
1052
1026
1053
assert . strictEqual (
1027
1054
testInfo . length ,
0 commit comments