You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When supplying configuration in a test using injectCore, the configuration is overridden by the default configuration included in BlueOak Server, for example:
var testUtility = require('blueoak-server').testUtility();
var coreServices = ['config', 'logger'];
var testSpecificConfig = {
app: {
key: 'value'
}
};
testUtility.injectCore(coreServices, testSpecifcConfig, function (initializedModules) {
var config = initializedModules.config;
var logger = intializedModules.logger;
var appConfig = config.get('app');
// appConfig is {} instead of { key: 'value' }
});
Files that would possibly be affected by a fix for this:
When supplying configuration in a test using
injectCore
, the configuration is overridden by the default configuration included in BlueOak Server, for example:Files that would possibly be affected by a fix for this:
https://github.com/BlueOakJS/blueoak-server/blob/master/testlib/util.js#L92
https://github.com/BlueOakJS/blueoak-server/blob/master/services/config.js#L18
In
config.js
, thefs.readFile
block overrides any config passed intoinjectCore
The text was updated successfully, but these errors were encountered: