Skip to content

Commit 8fe928a

Browse files
author
craigparra
committed
1.0.1 / 2021-08-10
================== * Remove Application - @craigparra
1 parent d68dac4 commit 8fe928a

File tree

8 files changed

+435
-449
lines changed

8 files changed

+435
-449
lines changed

Application.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

History.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.0.1 / 2021-08-10
2+
==================
3+
4+
* Remove Application - @craigparra
5+
16
1.0.0 / 2021-08-10
27
==================
38

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
module.exports.Application = require('./Application');
21
module.exports.ApplicationContext = require('./ApplicationContext');

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/cdi",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "",
55
"author": "Craig Parravicini",
66
"keywords": [

test/ApplicationContext.spec.js

Lines changed: 108 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,108 @@
1-
const { assert } = require('chai');
2-
const { LoggerFactory } = require('@alt-javascript/logger');
3-
const { EphemeralConfig } = require('@alt-javascript/config');
4-
const { v4: uuidv4 } = require('uuid');
5-
const { Application, ApplicationContext } = require('..');
6-
const { Context, Component } = require('../context');
7-
const SimpleClass = require('./service/SimpleClass');
8-
9-
const logger = LoggerFactory.getLogger('@alt-javascript/contexts/test/ApplicationContext_spec');
10-
11-
before(async () => {
12-
logger.verbose('before spec setup started');
13-
// ..
14-
logger.verbose('before spec setup completed');
15-
});
16-
17-
beforeEach(async () => {
18-
logger.verbose('before each setup started');
19-
// ..
20-
logger.verbose('before each setup completed');
21-
});
22-
23-
after(async () => {
24-
logger.verbose('after teardown started');
25-
// ...
26-
logger.verbose('after teardown completed');
27-
});
28-
29-
beforeEach(async () => {
30-
logger.verbose('before each setup started');
31-
// ..
32-
logger.verbose('before each setup completed');
33-
});
34-
35-
describe('Singletons Specification', () => {
36-
it('ApplicationContext accepts Context array', () => {
37-
const context = new Context([new Component(SimpleClass)]);
38-
39-
const applicationContext = Application.run([context]);
40-
41-
const simpleClass = applicationContext.get('simpleClass');
42-
assert.exists(simpleClass, 'simpleClass exists');
43-
});
44-
45-
it('ApplicationContext accepts Context object', () => {
46-
const context = new Context(new Component(SimpleClass));
47-
48-
const applicationContext = Application.run(context);
49-
50-
const simpleClass = applicationContext.get('simpleClass');
51-
assert.exists(simpleClass, 'simpleClass exists');
52-
});
53-
54-
it('ApplicationContext accepts Component object', () => {
55-
const context = new Component(SimpleClass);
56-
57-
const applicationContext = Application.run(context);
58-
59-
const simpleClass = applicationContext.get('simpleClass');
60-
assert.exists(simpleClass, 'simpleClass exists');
61-
});
62-
63-
it('ApplicationContext accepts plain old class', () => {
64-
const context = SimpleClass;
65-
66-
const applicationContext = Application.run(context);
67-
68-
const simpleClass = applicationContext.get('simpleClass');
69-
assert.exists(simpleClass, 'simpleClass exists');
70-
});
71-
72-
it('ApplicationContext accepts plain old object', () => {
73-
const context = { name: 'SimpleClass', uuid: uuidv4() };
74-
75-
const applicationContext = Application.run(context);
76-
77-
const simpleClass = applicationContext.get('simpleClass');
78-
assert.exists(simpleClass, 'simpleClass exists');
79-
});
80-
81-
it('ApplicationContext accepts plain old object, with require', () => {
82-
const context = { name: 'SimpleClass', require: './test/service/SimpleClass' };
83-
84-
const applicationContext = Application.run(context);
85-
86-
const simpleClass = applicationContext.get('simpleClass');
87-
assert.exists(simpleClass, 'simpleClass exists');
88-
assert.exists(simpleClass.uuid, 'simpleClass.uuid exists');
89-
});
90-
91-
it('ApplicationContext accepts config context', () => {
92-
const ephemeralConfig = new EphemeralConfig(
93-
{
94-
context: {
95-
SimpleClass: {
96-
require: './test/service/SimpleClass',
97-
},
98-
},
99-
},
100-
);
101-
102-
const applicationContext = Application.run({ config: ephemeralConfig });
103-
104-
const simpleClass = applicationContext.get('simpleClass');
105-
assert.exists(simpleClass, 'simpleClass exists');
106-
assert.exists(simpleClass.uuid, 'simpleClass.uuid exists');
107-
});
108-
});
1+
// const { assert } = require('chai');
2+
// const { LoggerFactory } = require('@alt-javascript/logger');
3+
// const { EphemeralConfig } = require('@alt-javascript/config');
4+
// const { v4: uuidv4 } = require('uuid');
5+
// const { Application, ApplicationContext } = require('..');
6+
// const { Context, Component } = require('../context');
7+
// const SimpleClass = require('./service/SimpleClass');
8+
//
9+
// const logger = LoggerFactory.getLogger('@alt-javascript/contexts/test/ApplicationContext_spec');
10+
//
11+
// before(async () => {
12+
// logger.verbose('before spec setup started');
13+
// // ..
14+
// logger.verbose('before spec setup completed');
15+
// });
16+
//
17+
// beforeEach(async () => {
18+
// logger.verbose('before each setup started');
19+
// // ..
20+
// logger.verbose('before each setup completed');
21+
// });
22+
//
23+
// after(async () => {
24+
// logger.verbose('after teardown started');
25+
// // ...
26+
// logger.verbose('after teardown completed');
27+
// });
28+
//
29+
// beforeEach(async () => {
30+
// logger.verbose('before each setup started');
31+
// // ..
32+
// logger.verbose('before each setup completed');
33+
// });
34+
//
35+
// describe('Singletons Specification', () => {
36+
// it('ApplicationContext accepts Context array', () => {
37+
// const context = new Context([new Component(SimpleClass)]);
38+
//
39+
// const applicationContext = Application.run([context]);
40+
//
41+
// const simpleClass = applicationContext.get('simpleClass');
42+
// assert.exists(simpleClass, 'simpleClass exists');
43+
// });
44+
//
45+
// it('ApplicationContext accepts Context object', () => {
46+
// const context = new Context(new Component(SimpleClass));
47+
//
48+
// const applicationContext = Application.run(context);
49+
//
50+
// const simpleClass = applicationContext.get('simpleClass');
51+
// assert.exists(simpleClass, 'simpleClass exists');
52+
// });
53+
//
54+
// it('ApplicationContext accepts Component object', () => {
55+
// const context = new Component(SimpleClass);
56+
//
57+
// const applicationContext = Application.run(context);
58+
//
59+
// const simpleClass = applicationContext.get('simpleClass');
60+
// assert.exists(simpleClass, 'simpleClass exists');
61+
// });
62+
//
63+
// it('ApplicationContext accepts plain old class', () => {
64+
// const context = SimpleClass;
65+
//
66+
// const applicationContext = Application.run(context);
67+
//
68+
// const simpleClass = applicationContext.get('simpleClass');
69+
// assert.exists(simpleClass, 'simpleClass exists');
70+
// });
71+
//
72+
// it('ApplicationContext accepts plain old object', () => {
73+
// const context = { name: 'SimpleClass', uuid: uuidv4() };
74+
//
75+
// const applicationContext = Application.run(context);
76+
//
77+
// const simpleClass = applicationContext.get('simpleClass');
78+
// assert.exists(simpleClass, 'simpleClass exists');
79+
// });
80+
//
81+
// it('ApplicationContext accepts plain old object, with require', () => {
82+
// const context = { name: 'SimpleClass', require: './test/service/SimpleClass' };
83+
//
84+
// const applicationContext = Application.run(context);
85+
//
86+
// const simpleClass = applicationContext.get('simpleClass');
87+
// assert.exists(simpleClass, 'simpleClass exists');
88+
// assert.exists(simpleClass.uuid, 'simpleClass.uuid exists');
89+
// });
90+
//
91+
// it('ApplicationContext accepts config context', () => {
92+
// const ephemeralConfig = new EphemeralConfig(
93+
// {
94+
// context: {
95+
// SimpleClass: {
96+
// require: './test/service/SimpleClass',
97+
// },
98+
// },
99+
// },
100+
// );
101+
//
102+
// const applicationContext = Application.run({ config: ephemeralConfig });
103+
//
104+
// const simpleClass = applicationContext.get('simpleClass');
105+
// assert.exists(simpleClass, 'simpleClass exists');
106+
// assert.exists(simpleClass.uuid, 'simpleClass.uuid exists');
107+
// });
108+
// });

0 commit comments

Comments
 (0)