Skip to content

Commit f5e55e6

Browse files
author
craigparra
committed
1.0.10 / 2021-08-02
================== * Export Boot class correctly - @craigparra
1 parent bb31945 commit f5e55e6

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

History.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.0.10 / 2021-08-02
2+
==================
3+
4+
* Export Boot class correctly - @craigparra
5+
16
1.0.9 / 2021-08-02
27
==================
38

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const Boot = require('./Boot');
22

3-
module.exports.Boot = Boot.Boot;
3+
module.exports.Boot = Boot;
44
module.exports.boot = Boot.boot;
55
module.exports.root = Boot.root;
66
module.exports.test = Boot.test;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alt-javascript/boot",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"description": "An Extensible Config & Logging Application Bootstrap Function",
55
"author": "Craig Parravicini",
66
"keywords": [

test/boot.spec.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const config = require('config');
33
const altConfig = require('@alt-javascript/config').config;
44
const { EphemeralConfig, ConfigFactory, ValueResolvingConfig } = require('@alt-javascript/config');
55
const { CachingLoggerFactory, LoggerFactory, LoggerCategoryCache } = require('@alt-javascript/logger');
6-
const { boot } = require('..');
6+
const { boot, root } = require('..');
77

88
const logger = LoggerFactory.getLogger('@alt-javascript/boot/test/boot_spec', config);
99

@@ -108,4 +108,14 @@ describe('boot function', () => {
108108
assert.equal(configValue, '${module}/test/boot_spec', 'configValue === \'${module}/test/boot_spec\'');
109109
assert.equal(altValue, '@alt-javascript/boot/test/boot_spec', 'configValue === \'@alt-javascript/boot/test/boot_spec\'');
110110
});
111+
112+
it('root - gets global value', () => {
113+
const ephemeralConfig = new EphemeralConfig({});
114+
const defaultValue = 'defualt';
115+
boot({ config: ephemeralConfig });
116+
assert.equal(root('config'), global.boot.contexts.root.config, 'root(\'config\') == global.boot.contexts.root.config');
117+
assert.equal(root('default',defaultValue), defaultValue, 'root(\'default\',defaultValue) == defaultValue');
118+
global.boot = undefined;
119+
});
120+
111121
});

test/fixtures/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
const { config } = require('@alt-javascript/config');
2+
const { test } = require('../..');
23
const { LoggerFactory } = require('@alt-javascript/logger');
34

5+
test({ config });
6+
47
const logger = LoggerFactory.getLogger('@alt-javascript/logger/test/fixtures/index', config);
58

69
exports.mochaGlobalSetup = async function setup() {

0 commit comments

Comments
 (0)