UNPKG

jest-codemods

Version:

Codemods for migrating test files to Jest

64 lines (63 loc) 1.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.JEST_GLOBALS = exports.JEST_MOCK_PROPERTIES = exports.JEST_MATCHER_TO_MAX_ARGS = exports.PROP_WITH_SECONDS_ARGS = void 0; exports.PROP_WITH_SECONDS_ARGS = [ 'toBe', 'not.toBe', 'toEqual', 'not.toEqual', 'toMatch', 'not.toMatch', ]; exports.JEST_MATCHER_TO_MAX_ARGS = { toBe: 1, toBeCalled: 0, toBeCalledTimes: 1, toBeCalledWith: Infinity, toBeLastCalledWith: Infinity, toBeCloseTo: 2, toBeDefined: 0, toBeFalsy: 0, toBeGreaterThan: 1, toBeGreaterThanOrEqual: 1, toBeInstanceOf: 1, toBeLessThan: 1, toBeLessThanOrEqual: 1, toBeNaN: 0, toBeNull: 0, toBeTruthy: 0, toBeUndefined: 0, toContain: 1, toContainEqual: 1, containsMatchingElement: 1, toEqual: 1, toHaveBeenCalled: 0, toHaveBeenCalledTimes: 1, toHaveBeenCalledWith: Infinity, toHaveBeenLastCalledWith: Infinity, toHaveLength: 1, toHaveProperty: 2, toMatch: 1, toMatchObject: 1, toMatchSnapshot: 1, toThrow: 1, toThrowError: 1, toThrowErrorMatchingSnapshot: 0, }; exports.JEST_MOCK_PROPERTIES = new Set(['spyOn', 'fn', 'createSpy']); exports.JEST_GLOBALS = new Set([ 'afterAll', 'afterEach', 'beforeAll', 'beforeEach', 'describe', 'expect', 'fdescribe', 'fit', 'it', 'jest', 'test', 'xdescribe', 'xit', 'xtest', ]);