@@ -1653,8 +1653,8 @@ describe('utils', () => {
1653
1653
} ) ;
1654
1654
} ) ;
1655
1655
1656
- describe ( 'evaluateObjectProperties' , function ( ) {
1657
- it ( 'behaves correctly with simple object expression' , function ( ) {
1656
+ describe ( 'evaluateObjectProperties' , ( ) => {
1657
+ it ( 'behaves correctly with simple object expression' , ( ) => {
1658
1658
const getObjectExpression = ( ast : Program ) : ObjectExpression =>
1659
1659
( ast . body [ 0 ] as VariableDeclaration ) . declarations [ 0 ]
1660
1660
. init as ObjectExpression ;
@@ -1670,7 +1670,7 @@ describe('utils', () => {
1670
1670
assert . deepEqual ( result , getObjectExpression ( ast ) . properties ) ;
1671
1671
} ) ;
1672
1672
1673
- it ( 'behaves correctly with spreads of objects' , function ( ) {
1673
+ it ( 'behaves correctly with spreads of objects' , ( ) => {
1674
1674
const getObjectExpression = (
1675
1675
ast : Program ,
1676
1676
bodyElement : number ,
@@ -1703,7 +1703,7 @@ describe('utils', () => {
1703
1703
] ) ;
1704
1704
} ) ;
1705
1705
1706
- it ( 'behaves correctly with non-variable spreads' , function ( ) {
1706
+ it ( 'behaves correctly with non-variable spreads' , ( ) => {
1707
1707
const getObjectExpression = ( ast : Program ) : ObjectExpression =>
1708
1708
( ast . body [ 1 ] as VariableDeclaration ) . declarations [ 0 ]
1709
1709
. init as ObjectExpression ;
@@ -1720,7 +1720,7 @@ describe('utils', () => {
1720
1720
assert . deepEqual ( result , [ ] ) ;
1721
1721
} ) ;
1722
1722
1723
- it ( 'behaves correctly with spread with variable that cannot be found' , function ( ) {
1723
+ it ( 'behaves correctly with spread with variable that cannot be found' , ( ) => {
1724
1724
const ast = espree . parse ( `const obj = { ...foo };` , {
1725
1725
ecmaVersion : 9 ,
1726
1726
range : true ,
@@ -1734,7 +1734,7 @@ describe('utils', () => {
1734
1734
assert . deepEqual ( result , [ ] ) ;
1735
1735
} ) ;
1736
1736
1737
- it ( 'behaves correctly when passed wrong node type' , function ( ) {
1737
+ it ( 'behaves correctly when passed wrong node type' , ( ) => {
1738
1738
const ast = espree . parse ( `foo();` , {
1739
1739
ecmaVersion : 9 ,
1740
1740
range : true ,
@@ -1745,7 +1745,7 @@ describe('utils', () => {
1745
1745
} ) ;
1746
1746
} ) ;
1747
1747
1748
- describe ( 'getMessagesNode' , function ( ) {
1748
+ describe ( 'getMessagesNode' , ( ) => {
1749
1749
type TestCase = {
1750
1750
code : string ;
1751
1751
getResult : ( ( ast : Program ) => ObjectExpression ) | ( ( ) => void ) ;
@@ -1821,7 +1821,7 @@ describe('utils', () => {
1821
1821
} ) ;
1822
1822
} ) ;
1823
1823
1824
- describe ( 'getMessageIdNodes' , function ( ) {
1824
+ describe ( 'getMessageIdNodes' , ( ) => {
1825
1825
type TestCase = {
1826
1826
code : string ;
1827
1827
getResult : ( ast : Program ) => Property [ ] ;
@@ -1892,7 +1892,7 @@ describe('utils', () => {
1892
1892
} ) ;
1893
1893
} ) ;
1894
1894
1895
- describe ( 'getMessageIdNodeById' , function ( ) {
1895
+ describe ( 'getMessageIdNodeById' , ( ) => {
1896
1896
type TestCase = {
1897
1897
code : string ;
1898
1898
run : (
@@ -1961,7 +1961,7 @@ describe('utils', () => {
1961
1961
} ) ;
1962
1962
} ) ;
1963
1963
1964
- describe ( 'findPossibleVariableValues' , function ( ) {
1964
+ describe ( 'findPossibleVariableValues' , ( ) => {
1965
1965
it ( 'returns the right nodes' , ( ) => {
1966
1966
const code =
1967
1967
'let x = 123; x = 456; x = foo(); if (foo) { x = 789; } x(); console.log(x); x += "shouldIgnore"; x + "shouldIgnore";' ;
@@ -2006,7 +2006,7 @@ describe('utils', () => {
2006
2006
} ) ;
2007
2007
} ) ;
2008
2008
2009
- describe ( 'isVariableFromParameter' , function ( ) {
2009
+ describe ( 'isVariableFromParameter' , ( ) => {
2010
2010
it ( 'returns true for function parameter' , ( ) => {
2011
2011
const code =
2012
2012
'function myFunc(x) { if (foo) { x = "abc"; } console.log(x) }; myFunc("def");' ;
0 commit comments