Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@abstractest/mock

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abstractest/mock - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "@abstractest/mock",
"version": "0.0.1",
"version": "0.0.2",
"description": "Mocker module for abstractest",

@@ -5,0 +5,0 @@ "publishConfig": {

# @abstractest/mock
> Mocker module for abstractest
## Install
```shell
yarn add @abstractest/mock
```
## Usage
Returns pre-initialized `jest-mock` instance.
```ts
import * as assert from 'node:assert'
import {mock} from '@abstractest/mock'
const m = mock.fn(v => v)
m.mockReturnValueOnce('foo')
assert.equal(m('bar'), 'foo')
assert.equal(m('baz'), 'baz')
assert.deepEqual(m.mock.calls, [
['bar'],
['baz'],
])
```
## License
[MIT](./LICENSE)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc