From 2f99c06976077eb6ae71d187c1f5fef942a284df Mon Sep 17 00:00:00 2001 From: Erin Zimmer Date: Tue, 3 Sep 2024 08:15:12 +1000 Subject: [PATCH] fix(prefer-importing-jest-globals): fix indenting --- .../prefer-importing-jest-globals.test.ts | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/rules/__tests__/prefer-importing-jest-globals.test.ts b/src/rules/__tests__/prefer-importing-jest-globals.test.ts index 3d853d09b..e544614d2 100644 --- a/src/rules/__tests__/prefer-importing-jest-globals.test.ts +++ b/src/rules/__tests__/prefer-importing-jest-globals.test.ts @@ -548,22 +548,22 @@ ruleTester.run('prefer-importing-jest-globals', rule, { }, { code: dedent` - console.log('hello'); - const onClick = jest.fn(); - describe("suite", () => { - test("foo"); - expect(onClick).toHaveBeenCalled(); - }) - `, + console.log('hello'); + const onClick = jest.fn(); + describe("suite", () => { + test("foo"); + expect(onClick).toHaveBeenCalled(); + }) + `, output: dedent` - console.log('hello'); - const { describe, expect, jest, test } = require('@jest/globals'); - const onClick = jest.fn(); - describe("suite", () => { - test("foo"); - expect(onClick).toHaveBeenCalled(); - }) - `, + console.log('hello'); + const { describe, expect, jest, test } = require('@jest/globals'); + const onClick = jest.fn(); + describe("suite", () => { + test("foo"); + expect(onClick).toHaveBeenCalled(); + }) + `, errors: [ { endColumn: 21, @@ -575,21 +575,21 @@ ruleTester.run('prefer-importing-jest-globals', rule, { }, { code: dedent` - console.log('hello'); - const onClick = jest.fn(); - describe("suite", () => { - test("foo"); - expect(onClick).toHaveBeenCalled(); - }) + console.log('hello'); + const onClick = jest.fn(); + describe("suite", () => { + test("foo"); + expect(onClick).toHaveBeenCalled(); + }) `, output: dedent` - import { describe, expect, jest, test } from '@jest/globals'; - console.log('hello'); - const onClick = jest.fn(); - describe("suite", () => { - test("foo"); - expect(onClick).toHaveBeenCalled(); - }) + import { describe, expect, jest, test } from '@jest/globals'; + console.log('hello'); + const onClick = jest.fn(); + describe("suite", () => { + test("foo"); + expect(onClick).toHaveBeenCalled(); + }) `, parserOptions: { sourceType: 'module' }, errors: [