GitHub
node-tap.org
Preparing search index...
The search index is not available
Node TAP
Node TAP
@tapjs/mock
mock-service
MockService
Class MockService
Index
Constructors
constructor
Properties
caller?
key
mocks?
module?
Methods
load
resolve
unmock
create
get
handle
listen
load
resolve
Constructors
constructor
new
Mock
Service
(
priv
)
:
MockService
Parameters
priv
:
typeof
mockServiceCtorSymbol
Returns
MockService
Properties
Optional
caller
caller
?:
{
at
:
CallSiteLike
|
CallSiteLikeJSON
;
dir
:
string
;
path
:
string
;
stack
?:
string
;
url
:
URL
;
}
key
key
:
string
= ...
Optional
mocks
mocks
?:
Record
<
string
,
Record
<
string
,
any
>
>
Optional
module
module
?:
string
|
Promise
<
string
>
Methods
load
load
(
__namedParameters
)
:
Promise
<
undefined
|
string
>
Parameters
__namedParameters
:
MockServiceLoadRequest
Returns
Promise
<
undefined
|
string
>
resolve
resolve
(
__namedParameters
)
:
Promise
<
undefined
|
string
>
Parameters
__namedParameters
:
MockServiceResolveRequest
Returns
Promise
<
undefined
|
string
>
unmock
unmock
(
)
:
void
Returns
void
Static
create
create
(
module
,
mocks
?
,
caller
?
)
:
Promise
<
MockService
&
{
module
:
string
|
Promise
<
string
>
;
}
>
Parameters
module
:
string
mocks
:
Record
<
string
,
any
>
= {}
caller
:
Function
|
(
(
...
a
:
any
[]
)
=>
any
)
= MockService.create
Returns
Promise
<
MockService
&
{
module
:
string
|
Promise
<
string
>
;
}
>
Static
get
get
(
key
)
:
MockService
Parameters
key
:
string
Returns
MockService
Static
handle
handle
(
msg
)
:
Promise
<
undefined
|
string
>
Parameters
msg
:
any
Returns
Promise
<
undefined
|
string
>
Static
listen
listen
(
port
)
:
Promise
<
void
>
Parameters
port
:
MessagePort
Returns
Promise
<
void
>
Static
load
load
(
req
)
:
Promise
<
undefined
|
string
>
Parameters
req
:
MockServiceLoadRequest
Returns
Promise
<
undefined
|
string
>
Static
resolve
resolve
(
req
)
:
Promise
<
undefined
|
string
>
Parameters
req
:
MockServiceResolveRequest
Returns
Promise
<
undefined
|
string
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
caller
key
mocks
module
Methods
load
resolve
unmock
create
get
handle
listen
load
resolve
GitHub
node-tap.org
Node TAP
Loading...