1.0.0 • Published 5 years ago

config-mock v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

config-mock

mock for https://www.npmjs.com/package/config

Why

You can just specify a /config/test.json I realize but sometimes you want to try a bunch of configs, this lets you progmatically create configs.

Usage

npm i config-mock
// Require
var configMock = require('config-mock');

// Create a mock
var mockConfig = configMock({
    foo: 'foo'
});

// Use as usual
mockConfig.get('foo')

Any path not specified in your actual ./config/default.json will still throw an error even if you add it in the mock.