@abstractest/mock
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3316
28