-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
bun:testSomething related to the `bun test` runnerSomething related to the `bun test` runnertrackingAn umbrella issue for tracking big featuresAn umbrella issue for tracking big features
Description
Jest
describe()
- describe(name, fn)
- describe.each(table)(name, fn, timeout)
- describe.only(name, fn)
- describe.only.each(table)(name, fn)
- describe.skip(name, fn)
- describe.skip.each(table)(name, fn)
test()
- test(name, fn, timeout)
- test.concurrent(name, fn, timeout)
- test.concurrent.each(table)(name, fn, timeout)
- test.concurrent.only.each(table)(name, fn)
- test.concurrent.skip.each(table)(name, fn)
- test.each(table)(name, fn, timeout)
- test.failing(name, fn, timeout)
- test.failing.each(name, fn, timeout)
- test.only.failing(name, fn, timeout)
- test.skip.failing(name, fn, timeout)
- test.only(name, fn, timeout)
- test.only.each(table)(name, fn)
- test.skip(name, fn)
- test.skip.each(table)(name, fn)
- test.todo(name)
Lifecycle hooks
expect()
- expect(value)
- expect.extend(matchers)
- expect.anything()
- expect.any(constructor)
- expect.arrayContaining(array)
- expect.assertions(number)
- expect.closeTo(number, numDigits?)
- expect.hasAssertions()
- expect.not.arrayContaining(array)
- expect.not.objectContaining(object)
- expect.not.stringContaining(string)
- expect.not.stringMatching(string | regexp)
- expect.objectContaining(object)
- expect.stringContaining(string)
- expect.stringMatching(string | regexp)
- expect.addSnapshotSerializer(serializer)
- .not
- .resolves
- .rejects
- .toBe(value)
- .toHaveBeenCalled()
- .toHaveBeenCalledTimes(number)
- .toHaveBeenCalledWith(arg1, arg2, ...)
- .toHaveBeenLastCalledWith(arg1, arg2, ...)
- .toHaveBeenNthCalledWith(nthCall, arg1, arg2, ....)
- .toHaveReturned()
- .toHaveReturnedTimes(number)
- .toHaveReturnedWith(value)
- .toHaveLastReturnedWith(value)
- .toHaveNthReturnedWith(nthCall, value)
- .toHaveLength(number)
- .toHaveProperty(keyPath, value?)
- .toBeCloseTo(number, numDigits?)
- .toBeDefined()
- .toBeFalsy()
- .toBeGreaterThan(number | bigint)
- .toBeGreaterThanOrEqual(number | bigint)
- .toBeLessThan(number | bigint)
- .toBeLessThanOrEqual(number | bigint)
- .toBeInstanceOf(Class)
- .toBeNull()
- .toBeTruthy()
- .toBeUndefined()
- .toBeNaN()
- .toContain(item)
- .toContainEqual(item)
- .toEqual(value)
- .toMatch(regexp | string)
- .toMatchObject(object)
- .toMatchSnapshot(propertyMatchers?, hint?)
- .toMatchInlineSnapshot(propertyMatchers?, inlineSnapshot)
- .toStrictEqual(value)
- .toThrow(error?)
- .toThrowErrorMatchingSnapshot(hint?)
- .toThrowErrorMatchingInlineSnapshot(inlineSnapshot)
Mocks
- jest.fn(implementation?)
- jest.mock(module)
- jest.requireActual(module)
- jest.clearAllMocks
- jest.resetAllMocks
- jest.restoreAllMocks
- mockFn.getMockName()
- mockFn.mock.calls
- mockFn.mock.results
- mockFn.mock.instances
- mockFn.mock.contexts
- mockFn.mock.lastCall
- mockFn.mockClear()
- mockFn.mockReset()
- mockFn.mockRestore()
- mockFn.mockImplementation(fn)
- mockFn.mockImplementationOnce(fn)
- mockFn.mockName(name)
- mockFn.mockReturnThis()
- mockFn.mockReturnValue(value)
- mockFn.mockReturnValueOnce(value)
- mockFn.mockResolvedValue(value)
- mockFn.mockResolvedValueOnce(value)
- mockFn.mockRejectedValue(value)
- mockFn.mockRejectedValueOnce(value)
- mockFn.withImplementation(fn, callback)
Misc
Vitest
expect()
Mocks
- vi.fn
- vi.mock
- vi.doMock
- vi.mocked
- vi.spyOn
- vi.unmock
- vi.importActual
- vi.importMock
- vi.resetAllMocks
- vi.dynamicImportSettled
- vi.resetModules
- vi.restoreAllMocks
- vi.stubEnv
- vi.unstubAllEnvs
- vi.stubGlobal
- vi.unstubAllGlobals
- vi.doUnmock
Timers
- vi.advanceTimersByTime
- vi.advanceTimersByTimeAsync
- vi.advanceTimersToNextTimer
- vi.advanceTimersToNextTimerAsync
- vi.getTimerCount
- vi.clearAllTimers
- vi.getMockedSystemTime
- vi.getRealSystemTime
- vi.restoreCurrentDate
- vi.runAllTicks
- vi.runAllTimers
- vi.runAllTimersAsync
- vi.runOnlyPendingTimers
- vi.runOnlyPendingTimersAsync
- vi.setSystemTime
- vi.useFakeTimers
- vi.useRealTimers
Misc
jest-extended
expect()
- .pass(message)
- .fail(message)
- .toBeEmpty()
- .toBeOneOf([members])
- .toBeNil()
- .toBeArray()
- .toBeArrayOfSize()
- .toIncludeAllMembers([members])
- .toIncludeAllPartialMembers([members])
- .toIncludeAnyMembers([members])
- .toIncludeSameMembers([members])
- .toPartiallyContain(member)
- .toSatisfyAll(predicate)
- .toSatisfyAny(predicate)
- .toBeInRange(min, max)
- .toBeBoolean()
- .toBeTrue()
- .toBeFalse()
- .toBeDate()
- .toBeValidDate()
- .toBeAfter(date)
- .toBeBefore(date)
- .toBeAfterOrEqualTo(date)
- .toBeBeforeOrEqualTo(date)
- .toBeBetween(startDate, endDate)
- .toBeFunction()
- .toThrowWithMessage()
- .toHaveBeenCalledBefore()
- .toHaveBeenCalledAfter()
- .toHaveBeenCalledOnce()
- .toHaveBeenCalledOnceWith()
- .toBeNumber()
- .toBeNaN()
- .toBeFinite()
- .toBePositive()
- .toBeNegative()
- .toBeEven()
- .toBeOdd()
- .toBeWithin(start, end)
- .toBeInteger()
- .toBeObject()
- .toBeEmptyObject()
- .toContainKey(key)
- .toContainKeys([keys])
- .toContainAllKeys([keys])
- .toContainAnyKeys([keys])
- .toContainValue(value)
- .toContainValues([values])
- .toContainAllValues([values])
- .toContainAnyValues([values])
- .toContainEntry([key, value])
- .toContainEntries([[key, value]])
- .toContainAllEntries([[key, value]])
- .toContainAnyEntries([[key, value]])
- .toBeExtensible()
- .toBeFrozen()
- .toBeSealed()
- .toResolve()
- .toReject()
- .toBeString()
- .toBeHexadecimal(string)
- .toBeDateString(string)
- .toEqualCaseInsensitive(string)
- .toStartWith(prefix)
- .toEndWith(suffix)
- .toInclude(substring)
- .toIncludeRepeated(substring, times)
- .toIncludeMultiple([substring])
- .toEqualIgnoringWhitespace(string)
- .toBeSymbol()
gkiely, meoyawn, MarkLyck, lin72h, amirrezamahyari and 70 moreThatOneBro, meoyawn, lin72h, amirrezamahyari, mdgozza and 16 morelin72h, colinhacks, TechStudent10, ThatOneBro, olof-nord and 39 more
Metadata
Metadata
Assignees
Labels
bun:testSomething related to the `bun test` runnerSomething related to the `bun test` runnertrackingAn umbrella issue for tracking big featuresAn umbrella issue for tracking big features