add constants mocking
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
@@ -0,0 +1,2 @@
|
||||
jest.mock('@app/common/settings');
|
||||
jest.mock('@app/common/constants');
|
||||
Reference in New Issue
Block a user