Licence
MIT
Version
0.10.1
Deps
2
Vulns
0
Weekly
0
jcmp-test-env
provides a jc3:mp server test environment using the jcmp-stubs package.
Installation
Install this package as a devDependency to your jc3:mp package:
npm install --save-dev jcmp-test-env
Usage
When writing your tests, just import this to the header file:
const { TestEnvironment } = require('jcmp-test-env');
new TestEnvironment('server').initializeEnvironment((k, v) => global[k] = v);
you can then run your tests like you normally do, i.e. with mocha. you could simply require your whole main.js file from your package.
Example
You can see the jcmp-test-env package live at the command manager