12345678910111213141516171819202122232425262728293031323334353637383940 |
- import {
- bootstrapDiagram,
- inject
- } from 'test/TestHelper';
- import EventBus from 'lib/core/EventBus';
- describe('environment/Mocking', function() {
- var mockEventBus, bootstrapCalled;
- beforeEach(bootstrapDiagram(function() {
- mockEventBus = new EventBus();
- bootstrapCalled = true;
- return {
- eventBus: mockEventBus
- };
- }));
- afterEach(function() {
- bootstrapCalled = false;
- });
- it('should use spy', inject(function(eventBus) {
- expect(eventBus).to.equal(mockEventBus);
- expect(bootstrapCalled).to.equal(true);
- }));
- it('should reparse bootstrap code', inject(function(eventBus) {
- expect(bootstrapCalled).to.equal(true);
- }));
- });
|