fakeworkify

A completely fake pure-JS clone of webworkify for use in CLI testcases

Usage no npm install needed!

<script type="module">
  import fakeworkify from 'https://cdn.skypack.dev/fakeworkify';
</script>

README

Fakeworkify

Mock implementation of webworkify for test cases

Installation

npm install --save-dev fakeworkify

Usage

The idea is to allow CLI test cases which utilize webworkers to still work. Use proxyquire to inject the mock implementation into your modules.

var proxyquire = require('proxyquire');

var myModule = proxyquire('./my-module', {
  webworkify: require('fakeworkify')
});

License

MIT