add constants mocking

This commit is contained in:
Vyrtsev Mikhail
2019-07-06 13:58:58 -05:00
committed by Umputun
parent 3c2977f98c
commit 0ddb510e0e
3 changed files with 29 additions and 0 deletions
@@ -0,0 +1,7 @@
// @ts-ignore
const mock: typeof import('@app/common/constants') = {
...jest.requireActual('@app/common/constants'),
BASE_URL: 'https://demo.remark42.com/',
};
module.exports = mock;
+20
View File
@@ -0,0 +1,20 @@
// @ts-ignore
const mock: typeof import('@app/common/settings') = {
...jest.requireActual('@app/common/settings'),
siteId: 'remark',
pageTitle: 'remark test',
url: 'https://remark42.com/test',
maxShownComments: 20,
token: 'abcd',
theme: 'light',
querySettings: {
site_id: 'remark',
page_title: 'remark test',
url: 'https://remark42.com/test',
max_shown_comments: 20,
token: 'abcd',
theme: 'light',
},
};
module.exports = mock;
+2
View File
@@ -0,0 +1,2 @@
jest.mock('@app/common/settings');
jest.mock('@app/common/constants');