Skip to content

Commit 06951c7

Browse files
committed
address lint violations in utils tests
1 parent 262946e commit 06951c7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/lib/utils.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,8 +1653,8 @@ describe('utils', () => {
16531653
});
16541654
});
16551655

1656-
describe('evaluateObjectProperties', function () {
1657-
it('behaves correctly with simple object expression', function () {
1656+
describe('evaluateObjectProperties', () => {
1657+
it('behaves correctly with simple object expression', () => {
16581658
const getObjectExpression = (ast: Program): ObjectExpression =>
16591659
(ast.body[0] as VariableDeclaration).declarations[0]
16601660
.init as ObjectExpression;
@@ -1670,7 +1670,7 @@ describe('utils', () => {
16701670
assert.deepEqual(result, getObjectExpression(ast).properties);
16711671
});
16721672

1673-
it('behaves correctly with spreads of objects', function () {
1673+
it('behaves correctly with spreads of objects', () => {
16741674
const getObjectExpression = (
16751675
ast: Program,
16761676
bodyElement: number,
@@ -1703,7 +1703,7 @@ describe('utils', () => {
17031703
]);
17041704
});
17051705

1706-
it('behaves correctly with non-variable spreads', function () {
1706+
it('behaves correctly with non-variable spreads', () => {
17071707
const getObjectExpression = (ast: Program): ObjectExpression =>
17081708
(ast.body[1] as VariableDeclaration).declarations[0]
17091709
.init as ObjectExpression;
@@ -1720,7 +1720,7 @@ describe('utils', () => {
17201720
assert.deepEqual(result, []);
17211721
});
17221722

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', () => {
17241724
const ast = espree.parse(`const obj = { ...foo };`, {
17251725
ecmaVersion: 9,
17261726
range: true,
@@ -1734,7 +1734,7 @@ describe('utils', () => {
17341734
assert.deepEqual(result, []);
17351735
});
17361736

1737-
it('behaves correctly when passed wrong node type', function () {
1737+
it('behaves correctly when passed wrong node type', () => {
17381738
const ast = espree.parse(`foo();`, {
17391739
ecmaVersion: 9,
17401740
range: true,
@@ -1745,7 +1745,7 @@ describe('utils', () => {
17451745
});
17461746
});
17471747

1748-
describe('getMessagesNode', function () {
1748+
describe('getMessagesNode', () => {
17491749
type TestCase = {
17501750
code: string;
17511751
getResult: ((ast: Program) => ObjectExpression) | (() => void);
@@ -1821,7 +1821,7 @@ describe('utils', () => {
18211821
});
18221822
});
18231823

1824-
describe('getMessageIdNodes', function () {
1824+
describe('getMessageIdNodes', () => {
18251825
type TestCase = {
18261826
code: string;
18271827
getResult: (ast: Program) => Property[];
@@ -1892,7 +1892,7 @@ describe('utils', () => {
18921892
});
18931893
});
18941894

1895-
describe('getMessageIdNodeById', function () {
1895+
describe('getMessageIdNodeById', () => {
18961896
type TestCase = {
18971897
code: string;
18981898
run: (
@@ -1961,7 +1961,7 @@ describe('utils', () => {
19611961
});
19621962
});
19631963

1964-
describe('findPossibleVariableValues', function () {
1964+
describe('findPossibleVariableValues', () => {
19651965
it('returns the right nodes', () => {
19661966
const code =
19671967
'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', () => {
20062006
});
20072007
});
20082008

2009-
describe('isVariableFromParameter', function () {
2009+
describe('isVariableFromParameter', () => {
20102010
it('returns true for function parameter', () => {
20112011
const code =
20122012
'function myFunc(x) { if (foo) { x = "abc"; } console.log(x) }; myFunc("def");';

0 commit comments

Comments
 (0)