Kivach
Cascading donations
Add repoPopularDonorsF.A.Q.
My repos

Footer

Subscribe to our newsletter

The latest news, articles, and resources, sent to your inbox.

DiscordTelegramTwitterMediumFacebookYouTubeGitHub

All information about repositories belongs to their owners.

More information about Kivach in the introductory article.

Built on Obyte

**Summary:** `babel-plugin-mockable-imports` is a Babel plugin that transforms JavaScript modules to enable mocking of their ES and CommonJS imports in tests. It adds an `$imports` object to each module with `$mock` and `$restore` methods, allowing tests to temporarily replace dependencies with stubs or fakes. The plugin works with any test runner, bundler, and environment (Node or browser), and supports both JavaScript and TypeScript. **Who it's for:** This plugin is designed for developers writing unit tests who need fine-grained control over module dependencies, especially when testing code that imports from external or internal modules. It's particularly useful for projects using Babel to transpile code and wanting a lightweight, efficient way to mock imports without the overhead or limitations of alternatives like proxyquire.

Total donated
Undistributed
Share with your subscribers:

Recipients

How the donated funds are distributed

Support the dependencies of robertknight/babel-plugin-mockable-imports

Account's avatar
babel/babel
Babel command line.
Account's avatar
babel/babel
Babel compiler core.
Account's avatar
babel/babel
Allow parsing of jsx
Account's avatar
babel/babel
Compile ES2015 destructuring to ES5
Account's avatar
babel/babel
A Babel preset for each environment.
Account's avatar
chaijs/chai
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
Account's avatar
mochajs/mocha
simple, flexible, fun test framework

Support the repos that depend on this repository

Top contributors

robertknight's profile
robertknight
175 contributions
dependabot[bot]'s profile
dependabot[bot]
56 contributions

Recent events

Kivach works on the Obyte network, and therefore you can track all donations.

No events yet
robertknight

robertknight/babel-plugin-mockable-...

Babel plugin that enables mocking of ES and CommonJS imports in tests

JavaScript
12
1
No license