cooky-cutter
Version:
Object factories for testing in TypeScript
21 lines (20 loc) • 615 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConfig = exports.configure = void 0;
let config = {
errorOnHardCodedValues: false
};
/**
* Configure global settings to cooky-cutter. This will affect ALL factories.
* This should be ran once before all tests and factories so that all factories
* rely on the same configuration.
*
* @param newConfig - an object that represents the desired configuration
*/
exports.configure = (newConfig) => {
config = newConfig;
};
/**
* Retrieve the current global configuration options.
*/
exports.getConfig = () => config;