Skip to main content
Products
Open Source
Deno
Modern runtime for JavaScript and TypeScript
Fresh
Web framework designed for the edge
JSR
TypeScript-first ESM package registry
Cloud
Deploy
Easy serverless hosting for your JavaScript projects
Subhosting
Securely run untrusted code in a scalable sandbox
Pricing
Starts free and scales with your needs
Docs
Manual
API Reference
Deno Deploy
Deno KV
Deno by Example
Modules
Current path
deno.land/x
Standard Library
Node.js & npm
JSR
Blog
Search…
⌘K
Module
x
/
expect
/
mod.ts
>
mock
helpers for writing jest like expect tests in deno
allain/expect
Version
Latest
v0.4.0
v0.3.0
v0.2.10
v0.2.9
v0.2.8
v0.2.7
v0.2.6
v0.2.5
v0.2.1
v0.2.0
v0.1.0
0.2.0
Menu
mod.ts
(default module)
I
Expected
T
Async
v
mock
f
addMatchers
f
expect
f
it
expect.ts
I
Expected
T
Async
f
addMatchers
f
expect
matchers.ts
T
Matcher
T
Matchers
T
MatchResult
f
toBe
f
toBeDefined
f
toBeFalsy
f
toBeGreaterThan
f
toBeGreaterThanOrEqual
f
toBeInstanceOf
f
toBeLessThan
f
toBeLessThanOrEqual
f
toBeNaN
f
toBeNull
f
toBeTruthy
f
toBeTypeOf
f
toBeUndefined
f
toContain
f
toEqual
f
toHaveBeenCalled
f
toHaveBeenCalledTimes
f
toHaveBeenCalledWith
f
toHaveBeenLastCalledWith
f
toHaveBeenNthCalledWith
f
toHaveLastReturnedWith
f
toHaveLength
f
toHaveNthReturnedWith
f
toHaveProperty
f
toHaveReturned
f
toHaveReturnedTimes
f
toHaveReturnedWith
f
toMatch
f
toThrow
mock.ts
T
MockCall
f
calls
f
fn
variable
mock
import
{ mock }
from
"https://deno.land/x/expect@v0.4.0/mod.ts"
;