1.1.5 • Published 2 years ago

@xutl/test-modules v1.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@xutl/test-modules

One eXtremely Useful Tool Library providing a simple preload module that allows replacing of depended modules with mock. Quite useful for testing.

Install

npm install --save-dev @xutl/test-modules

Usage

export NODE_OPTIONS="--no-warnings --experimental-loader=@xutl/modules --require=@xutl/modules"
node my-test.js

This will search along the path of the my-test.js file for a file called modules.json. This must contain a plain json mapping between strings. The key will be a regular expression such that:

actual = original.replace(new RegExp(<key>), <value>);

Alternatively you can set the environment variable MOCK_TABLE to the full path of the modules.json file to use.

1.1.1

2 years ago

1.1.0

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

4 years ago