blob: 975e4fcc7913d7eb9224877a3f9c2a84b68be6eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import * as commands from '../../services/commands';
import Api from '../../infrastructure/api';
import Registry from '../../infrastructure/registry';
import WireUpComponentsInto from '../wire-up-components-into';
describe("WireUpComponentsInto", () => {
let subject = null;
let registry = null;
beforeEach(() => {
registry = new Registry();
subject = new WireUpComponentsInto(registry);
});
describe("#run", () => {
beforeEach(() => {
subject.run()
});
it ("registers each command", function() {
results = registry.resolveAll('subscriber');
expect(results.length).toEqual(5);
});
it ("can build the api", function() {
result = registry.resolve('api');
expect(result).toBeInstanceOf(Api);
});
});
})
|