Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
mimus
Advanced tools
Readme
A stubbing library with a focus on having:
Note: Currently this project is using Sinon and Rewire. Check them out!
npm install mimus
var mimus = require('mimus')
This is the main method that you will use. It will require only the module you want to test against, while stubbing any specified internal modules, that can be retrieved with other methods.
Require a stubbed db
module and also stub the mongodb
and zlib
module.
var db = mimus.require('./lib/db', __dirname, ['mongodb', 'zlib'])
Why the whitelist approach?
This way, unexpected clashes with mocking low level modules can be controlled by the user.
Get an internal variable.
Uses rewire.__get__
.
mimus.get(required_module, 'internal_var_name')
Set an internal variable.
Uses rewire.__set__
.
mimus.set(required_module, 'internal_var_name', 'value')
Create a (Sinon.JS) stub.
var stub = mimus.stub()
stub.returns...
Create a (Sinon.JS) spy.
var spy = mimus.spy()
Calls reset on every (Sinon.JS) stub/spy.
mimus.reset()
Calls restore on every (Sinon.JS) stub.
mimus.restore()
See the system tests.
Current list of contributors.
Any contributions are welcome. Please consider tests and code quality before submitting.
See bantik's contributor covenant!
Current issue tracker is on github.
Please read any docs available before opening an issue.
git clone git@github.com:brentlintner/mimus.git
cd mimus
npm install
npm run test
npm run test-cov
npm run lint
npm run lint-cov
npm run dev &
The top level API's main goal is to be a one method level interface with the object
returned via mimus.require
being passed around by reference. This keeps api methods off
of the main object, and also provides a more functional way to interact with mimus.
This project ascribes to semantic versioning.
Also, see all other deps.
FAQs
A test runner agnostic stubbing library for Node.JS, supporting dependency injection and auto stubbing.
The npm package mimus receives a total of 6 weekly downloads. As such, mimus popularity was classified as not popular.
We found that mimus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.