Commit 033caff9 authored by Eduardo Sanz García's avatar Eduardo Sanz García Committed by Eduardo

Remove `default` export from is-third-party-service

We have been replacing default exports from services. We only allow
default exports on preact components.
parent 826a6f0a
......@@ -4,7 +4,7 @@ import { serviceConfig } from '../../config/service-config';
import { isThirdPartyUser } from '../../helpers/account-id';
import { orgName } from '../../helpers/group-list-item-common';
import groupsByOrganization from '../../helpers/group-organizations';
import isThirdPartyService from '../../helpers/is-third-party-service';
import { isThirdPartyService } from '../../helpers/is-third-party-service';
import { withServices } from '../../service-context';
import { useStoreProxy } from '../../store/use-store';
......
......@@ -165,7 +165,9 @@ describe('GroupList', () => {
context('when `isThirdPartyService` is true', () => {
beforeEach(() => {
$imports.$mock({
'../../helpers/is-third-party-service': () => true,
'../../helpers/is-third-party-service': {
isThirdPartyService: () => true,
},
});
});
......
......@@ -3,7 +3,7 @@ import { IconButton, LinkButton } from '@hypothesis/frontend-shared';
import bridgeEvents from '../../shared/bridge-events';
import { serviceConfig } from '../config/service-config';
import { useStoreProxy } from '../store/use-store';
import isThirdPartyService from '../helpers/is-third-party-service';
import { isThirdPartyService } from '../helpers/is-third-party-service';
import { withServices } from '../service-context';
import { applyTheme } from '../helpers/theme';
......
import { SvgIcon } from '@hypothesis/frontend-shared';
import isThirdPartyService from '../helpers/is-third-party-service';
import { isThirdPartyService } from '../helpers/is-third-party-service';
import { withServices } from '../service-context';
/**
......
......@@ -39,7 +39,9 @@ describe('TopBar', () => {
$imports.$mock(mockImportedComponents());
$imports.$mock({
'../store/use-store': { useStoreProxy: () => fakeStore },
'../helpers/is-third-party-service': fakeIsThirdPartyService,
'../helpers/is-third-party-service': {
isThirdPartyService: fakeIsThirdPartyService,
},
'../config/service-config': { serviceConfig: fakeServiceConfig },
});
});
......
......@@ -18,7 +18,9 @@ describe('Tutorial', function () {
$imports.$mock(mockImportedComponents());
$imports.$mock({
'../helpers/is-third-party-service': fakeIsThirdPartyService,
'../helpers/is-third-party-service': {
isThirdPartyService: fakeIsThirdPartyService,
},
});
});
......
......@@ -15,7 +15,7 @@ import { serviceConfig } from '../config/service-config';
* @param {MergedConfig} settings
* @return {boolean}
*/
export default function isThirdPartyService(settings) {
export function isThirdPartyService(settings) {
const service = serviceConfig(settings);
if (service === null) {
......
import isThirdPartyService from '../is-third-party-service';
import { isThirdPartyService } from '../is-third-party-service';
import { $imports } from '../is-third-party-service';
describe('sidebar/helpers/is-third-party-service', () => {
......
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