Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 647 Bytes

File metadata and controls

30 lines (25 loc) · 647 Bytes

Minimal reproduction for jest-community/eslint-plugin-jest#1634

Clone & yarn install as usual Run yarn lint --fix

Expect some_tests.tsx to have content

import { describe, expect, it, jest } from '@jest/globals';
describe("test", () => {
  it("uses jest globals", async () => {
    const mock = jest.fn();
    mock();
    expect(mock).toHaveBeenCalled();
  });
});

Actual content

const { describe, expect, it, jest } = require('@jest/globals');
describe("test", () => {
  it("uses jest globals", async () => {
    const mock = jest.fn();
    mock();
    expect(mock).toHaveBeenCalled();
  });
});