Commit e4d696a0 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Move `host-config` to `config`

parent 3bcb6981
import getApiUrl from './get-api-url'; import getApiUrl from './get-api-url';
import hostConfig from '../host-config'; import hostConfig from './host-config';
import * as postMessageJsonRpc from '../util/postmessage-json-rpc'; import * as postMessageJsonRpc from '../util/postmessage-json-rpc';
/** /**
......
...@@ -4,9 +4,9 @@ import { ...@@ -4,9 +4,9 @@ import {
toInteger, toInteger,
toObject, toObject,
toString, toString,
} from '../shared/type-coercions'; } from '../../shared/type-coercions';
/** @typedef {import('../types/config').HostConfig} HostConfig */ /** @typedef {import('../../types/config').HostConfig} HostConfig */
/** /**
* Return the app configuration specified by the frame embedding the Hypothesis * Return the app configuration specified by the frame embedding the Hypothesis
......
...@@ -14,7 +14,7 @@ describe('sidebar/config/fetch-config', () => { ...@@ -14,7 +14,7 @@ describe('sidebar/config/fetch-config', () => {
}; };
fakeApiUrl = sinon.stub().returns('https://dev.hypothes.is/api/'); fakeApiUrl = sinon.stub().returns('https://dev.hypothes.is/api/');
$imports.$mock({ $imports.$mock({
'../host-config': fakeHostConfig, './host-config': fakeHostConfig,
'../util/postmessage-json-rpc': fakeJsonRpc, '../util/postmessage-json-rpc': fakeJsonRpc,
'./get-api-url': fakeApiUrl, './get-api-url': fakeApiUrl,
}); });
......
...@@ -8,7 +8,7 @@ function fakeWindow(config) { ...@@ -8,7 +8,7 @@ function fakeWindow(config) {
}; };
} }
describe('sidebar/host-config', function () { describe('sidebar/config/host-config', function () {
it('parses config from location string and returns whitelisted params', function () { it('parses config from location string and returns whitelisted params', function () {
const window_ = fakeWindow({ const window_ = fakeWindow({
annotations: '1234', annotations: '1234',
......
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