Commit 3bcb6981 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Move `fetch-config` to `config`

parent 921bbff2
import getApiUrl from './config/get-api-url';
import hostConfig from './host-config';
import * as postMessageJsonRpc from './util/postmessage-json-rpc';
import getApiUrl from './get-api-url';
import hostConfig from '../host-config';
import * as postMessageJsonRpc from '../util/postmessage-json-rpc';
/**
* @typedef {import('../types/config').SidebarConfig} SidebarConfig
* @typedef {import('../types/config').MergedConfig} MergedConfig
* @typedef {import('../../types/config').SidebarConfig} SidebarConfig
* @typedef {import('../../types/config').MergedConfig} MergedConfig
*/
/**
......
import { fetchConfig, $imports } from '../fetch-config';
describe('sidebar/fetch-config', () => {
describe('sidebar/config/fetch-config', () => {
let fakeHostConfig;
let fakeJsonRpc;
let fakeWindow;
......@@ -14,9 +14,9 @@ describe('sidebar/fetch-config', () => {
};
fakeApiUrl = sinon.stub().returns('https://dev.hypothes.is/api/');
$imports.$mock({
'./host-config': fakeHostConfig,
'./util/postmessage-json-rpc': fakeJsonRpc,
'./config/get-api-url': fakeApiUrl,
'../host-config': fakeHostConfig,
'../util/postmessage-json-rpc': fakeJsonRpc,
'./get-api-url': fakeApiUrl,
});
// By default, embedder provides no custom config.
......@@ -39,7 +39,7 @@ describe('sidebar/fetch-config', () => {
$imports.$restore();
});
describe('fetchConfig', () => {
describe('config/fetch-config', () => {
context('direct embed', () => {
// no `requestConfigFromFrame` variable
//
......
......@@ -9,7 +9,7 @@ import {
} from './cross-origin-rpc.js';
import addAnalytics from './ga';
import disableOpenerForExternalLinks from './util/disable-opener-for-external-links';
import { fetchConfig } from './fetch-config';
import { fetchConfig } from './config/fetch-config';
import * as sentry from './util/sentry';
// Read settings rendered into sidebar app HTML by service/extension.
......
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