Commit b4ac45fa authored by Robert Knight's avatar Robert Knight

Remove unnecessary mocking

This mocking broke after the ES module conversion. Since the mocked
module just exports a set of constants, we can just avoid mocking it.
parent b4754e3b
import { mount } from 'enzyme';
import { createElement } from 'preact';
import bridgeEvents from '../../../shared/bridge-events';
import UserMenu from '../user-menu';
import { $imports } from '../user-menu';
......@@ -11,7 +12,6 @@ describe('UserMenu', () => {
let fakeBridge;
let fakeIsThirdPartyUser;
let fakeOnLogout;
let fakeProfileBridgeEvent;
let fakeServiceConfig;
let fakeServiceUrl;
let fakeSettings;
......@@ -44,7 +44,6 @@ describe('UserMenu', () => {
fakeBridge = { call: sinon.stub() };
fakeIsThirdPartyUser = sinon.stub();
fakeOnLogout = sinon.stub();
fakeProfileBridgeEvent = 'profile-requested';
fakeServiceConfig = sinon.stub();
fakeServiceUrl = sinon.stub();
fakeSettings = {
......@@ -57,9 +56,6 @@ describe('UserMenu', () => {
isThirdPartyUser: fakeIsThirdPartyUser,
},
'../service-config': fakeServiceConfig,
'../../shared/bridge-events': {
PROFILE_REQUESTED: fakeProfileBridgeEvent,
},
});
});
......@@ -149,7 +145,7 @@ describe('UserMenu', () => {
onProfileSelected();
assert.equal(fakeBridge.call.callCount, 1);
assert.calledWith(fakeBridge.call, fakeProfileBridgeEvent);
assert.calledWith(fakeBridge.call, bridgeEvents.PROFILE_REQUESTED);
});
it('should not fire profile event for first-party user', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment