Skip to content

Commit 6870055

Browse files
committed
[Testing] Test plugin installation
1 parent 5f968b5 commit 6870055

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/MCTSpec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,32 @@ define([
2626
], function (MCT, plugins) {
2727
describe("MCT", function () {
2828
var openmct;
29+
var mockPlugin;
30+
var mockPlugin2;
2931

3032
beforeEach(function () {
33+
mockPlugin = jasmine.createSpy('plugin');
34+
mockPlugin2 = jasmine.createSpy('plugin');
35+
3136
openmct = new MCT();
37+
38+
openmct.install(mockPlugin);
39+
openmct.install(mockPlugin2);
3240
});
3341

3442
it("exposes plugins", function () {
3543
expect(openmct.plugins).toEqual(plugins);
3644
});
45+
46+
describe("when started", function () {
47+
beforeEach(function () {
48+
openmct.start();
49+
});
50+
51+
it("calls plugins for configuration", function () {
52+
expect(mockPlugin).toHaveBeenCalledWith(openmct);
53+
expect(mockPlugin2).toHaveBeenCalledWith(openmct);
54+
});
55+
});
3756
});
3857
});

0 commit comments

Comments
 (0)