Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/vitest-dev/vitest
/ functions
Functions
7,873 in github.com/vitest-dev/vitest
⨍
Functions
7,873
◇
Types & classes
1,212
↓ 62 callers
Function
r
(s)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:1
↓ 61 callers
Function
qe
(n,i)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:22
↓ 61 callers
Function
qe
(n,i)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:22
↓ 60 callers
Function
Ve
(e,t,r,o,s)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:13
↓ 60 callers
Function
Ve
(e,t,r,o,s)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:13
↓ 59 callers
Function
Ge
(e)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:9
↓ 59 callers
Function
Ge
(e)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:9
↓ 59 callers
Method
set
(t,r,o,s)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:9
↓ 58 callers
Function
getCLIOptions
(commands: string)
test/core/test/cli-test.test.ts:26
↓ 58 callers
Function
relative
(path: string)
packages/vitest/src/node/reporters/base.ts:78
↓ 57 callers
Function
Pe
(D,q,Q,he=!1,de=!1,ge=0)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:13
↓ 57 callers
Function
Pe
(D,q,Q,he=!1,de=!1,ge=0)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:13
↓ 57 callers
Function
e
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:17
↓ 56 callers
Function
afterAll
( this: unknown, fn: AfterAllListener<ExtraContext>, timeout?: number, )
packages/runner/src/hooks.ts:118
↓ 55 callers
Function
e
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:17
↓ 55 callers
Method
indexOf
(e)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:17
↓ 55 callers
Method
toHaveAttribute
* @description * Allows you to check if a given element has an attribute or not. * * You can also optionally check that the attribute has a s
packages/browser/jest-dom.d.ts:243
↓ 54 callers
Function
f
(...d)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:17
↓ 54 callers
Method
toHaveTextContent
* @description * Check whether the given element has a text content or not. * * When a string argument is passed through, it will perform a p
packages/browser/jest-dom.d.ts:402
↓ 53 callers
Function
editFile
(file: string, callback: (content: string) => string)
test/test-utils/index.ts:373
↓ 53 callers
Function
h
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:13
↓ 52 callers
Function
A
(n)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:22
↓ 52 callers
Function
A
(n)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:22
↓ 52 callers
Function
assertType
()
packages/vitest/src/typecheck/assertType.ts:5
↓ 52 callers
Function
hoistSimpleCodeWithoutMocks
(code: string)
test/core/test/injector-mock.test.ts:128
↓ 52 callers
Method
toHaveValue
* @description * Check whether the given form element has the specified value. * * Accepts `<input>`, `<select>`, and `<textarea>` elements w
packages/browser/jest-dom.d.ts:424
↓ 51 callers
Function
Qe
(e=" ",t=0)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:13
↓ 51 callers
Function
Qe
(e=" ",t=0)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:13
↓ 51 callers
Function
Xe
(n,i,a)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:19
↓ 51 callers
Function
Xe
(n,i,a)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:19
↓ 51 callers
Method
toString
()
test/core/test/utils-display.spec.ts:25
↓ 50 callers
Function
R
(D,q,Q,he)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:13
↓ 50 callers
Function
R
(D,q,Q,he)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:13
↓ 50 callers
Function
runBrowserTests
( config?: Omit<TestUserConfig, 'browser'> & { browser?: Partial<TestUserConfig['browser']> }, include?: s
test/browser/specs/utils.ts:32
↓ 48 callers
Function
et
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:5
↓ 48 callers
Function
et
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:5
↓ 48 callers
Function
h
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:13
↓ 48 callers
Method
sort
(files: TestSpecification[])
test/cli/test/reporters/test-run.test.ts:1130
↓ 47 callers
Function
resolve
()
test/core/test/snapshot-async.test.ts:3
↓ 47 callers
Function
rt
(e,t)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:13
↓ 47 callers
Function
rt
(e,t)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:13
↓ 47 callers
Function
tt
(n,i)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:22
↓ 47 callers
Function
tt
(n,i)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:22
↓ 46 callers
Function
Ie
(n,i)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:22
↓ 46 callers
Function
Ie
(n,i)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:22
↓ 46 callers
Function
beforeAll
( this: unknown, fn: BeforeAllListener<ExtraContext>, timeout: number = getDefaultHookTimeout(), )
packages/runner/src/hooks.ts:76
↓ 46 callers
Method
mockReturnValue
* Accepts a value that will be returned whenever the mock function is called. TypeScript will only accept values that match the return type of the ori
packages/spy/src/types.ts:307
↓ 45 callers
Function
afterEach
( fn: AfterEachListener<ExtraContext>, timeout?: number, )
packages/runner/src/hooks.ts:201
↓ 45 callers
Method
override
(runner: VitestRunner, userFixtures: UserFixtures)
packages/runner/src/fixture.ts:86
↓ 45 callers
Method
report
@internal
packages/vitest/src/node/core.ts:1572
↓ 45 callers
Method
result
* Test results. * - **pending**: Test was collected, but didn't finish running yet. * - **passed**: Test passed successfully * - **failed**:
packages/vitest/src/node/reporters/reported-tasks.ts:150
↓ 45 callers
Method
write
(data: string)
test/test-utils/cli.ts:48
↓ 44 callers
Method
getTestModules
(keys?: string[])
packages/vitest/src/node/state.ts:125
↓ 43 callers
Function
runVitestCli
(_options?: CliOptions | string, ...args: string[])
test/test-utils/index.ts:351
↓ 42 callers
Function
c
()
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:17
↓ 42 callers
Function
c
()
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:17
↓ 42 callers
Method
mockName
* Sets the internal mock name. This is useful for identifying the mock when an assertion fails. * @see https://vitest.dev/api/mock#mockname
packages/spy/src/types.ts:221
↓ 42 callers
Method
mockReset
* Does what `mockClear` does and resets inner implementation to the original function. This also resets all "once" implementations. * * Note tha
packages/spy/src/types.ts:242
↓ 42 callers
Function
ot
(e)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:5
↓ 42 callers
Function
ot
(e)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:5
↓ 42 callers
Function
toArray
(array?: Nullable<Arrayable<T>>)
packages/utils/src/helpers.ts:142
↓ 42 callers
Function
ts
(n,i)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:22
↓ 41 callers
Function
Y
(n,i,a)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:19
↓ 41 callers
Function
Y
(n,i,a)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:19
↓ 41 callers
Method
assert
(options: AssertOptions)
packages/snapshot/src/client.ts:201
↓ 41 callers
Function
f
(...d)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:17
↓ 41 callers
Method
has
(t,r)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:9
↓ 41 callers
Method
on
(event: 'message' | 'error', callback: (arg: any) => void)
packages/vitest/src/node/pools/poolRunner.ts:337
↓ 41 callers
Method
readFile
(path: string)
packages/vitest/src/runtime/vm/file-map.ts:19
↓ 41 callers
Method
toHaveStyle
* @description * Check if an element has specific css properties with specific values applied. * * Only matches if the element has *all* the
packages/browser/jest-dom.d.ts:379
↓ 40 callers
Function
at
(e,t)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:13
↓ 40 callers
Function
at
(e,t)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:13
↓ 40 callers
Function
d
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:9
↓ 40 callers
Function
d
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:9
↓ 40 callers
Function
def
( name: keyof Assertion | (keyof Assertion)[], fn: (this: Chai.AssertionStatic & Assertion, ...args: a
packages/expect/src/jest-expect.ts:42
↓ 40 callers
Method
toReportPassedTest
(testName: string, testProject?: string | BrowserInstanceOption[])
test/browser/setup.unit.ts:59
↓ 39 callers
Function
fn
( originalImplementation?: T, )
packages/spy/src/index.ts:244
↓ 39 callers
Function
t
(r,o)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:13
↓ 39 callers
Function
t
(r,o)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:13
↓ 38 callers
Function
extractLogs
(stdout: string)
test/cli/test/around-each.test.ts:4
↓ 38 callers
Method
fill
* Sets the value of the current `input`, `textarea` or `contenteditable` element. * @see {@link https://vitest.dev/api/browser/interactivity#userev
packages/browser/context.d.ts:632
↓ 38 callers
Method
has
(t,r)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:9
↓ 38 callers
Method
nth
* Returns a locator for the nth element matching the selector. * @see {@link https://vitest.dev/api/browser/locators#nth}
packages/browser/context.d.ts:704
↓ 38 callers
Function
on
()
test/config/test/pool.test.ts:123
↓ 38 callers
Method
reject
(error: Error)
packages/vitest/src/node/pools/browser.ts:219
↓ 38 callers
Method
reset
()
packages/mocker/src/types.ts:57
↓ 38 callers
Method
toBeInTheDocument
* @description * Assert whether an element is present in the document or not. * @example * <svg data-testid="svg-element"></svg> * * aw
packages/browser/jest-dom.d.ts:17
↓ 37 callers
Method
postMessage
( ...args: [any, StructuredSerializeOptions | Transferable[] | undefined] )
packages/web-worker/src/worker.ts:163
↓ 36 callers
Function
ae
(n,i)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:19
↓ 36 callers
Function
ae
(n,i)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:19
↓ 36 callers
Function
collectTests
(code: string, options?: CliOptions & { fnFn?: boolean })
test/cli/test/static-collect.test.ts:1687
↓ 36 callers
Function
s
()
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:17
↓ 36 callers
Function
s
()
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:17
↓ 36 callers
Method
sort
(files: TestSpecification[])
packages/vitest/src/node/sequencers/BaseSequencer.ts:35
↓ 35 callers
Method
end
(specifications: TestSpecification[], errors: unknown[], coverage?: unknown)
packages/vitest/src/node/test-run.ts:105
↓ 35 callers
Function
fn
()
test/core/test/jest-mock.test.ts:102
↓ 35 callers
Method
getMockName
* Use it to return the name assigned to the mock with the `.mockName(name)` method. By default, it will return `vi.fn()`. * @see https://vitest.dev
packages/spy/src/types.ts:216
↓ 34 callers
Function
getInputByTestId
(testId: string)
test/browser/fixtures/expect-dom/utils.ts:19
↓ 34 callers
Function
ht
(e)
test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:17
↓ 34 callers
Function
ht
(e)
test/cli/test/fixtures/reporters/html/all-passing-or-skipped/assets/index-BUCFJtth.js:17
← previous
next →
101–200 of 7,873, ranked by callers