Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./configs/webpack.config.renderer.dev.ts",
"start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./configs/webpack.config.preload.dev.ts",
"test": "jest ./redisinsight/ui -w 1",
"test:api": "yarn --cwd redisinsight/api test",
"test:watch": "jest ./redisinsight/ui --watch -w 1",
"test:cov": "cross-env NODE_OPTIONS='' jest ./redisinsight/ui --silent --coverage --no-cache --forceExit -w 3",
"test:cov:unit": "jest ./redisinsight/ui --group=-component --coverage -w 1",
Expand Down
9 changes: 9 additions & 0 deletions redisinsight/api/src/__mocks__/glob.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
glob: jest.fn(),
sync: jest.fn(),
hasMagic: jest.fn(),
Glob: jest.fn(),
defaults: {},
GlobSync: jest.fn(),
};

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const mockedAxios = axios as jest.Mocked<typeof axios>;
jest.mock('fs-extra');
const mockedFs = fs as jest.Mocked<typeof fs>;

jest.mock('glob');

const mockedAdmZip = {
extractAllTo: jest.fn(),
};
Expand All @@ -21,10 +23,6 @@ describe('AutoUpdatedStaticsProvider', () => {
let service: AutoUpdatedStaticsProvider;

beforeEach(async () => {
jest.mock('fs-extra', () => mockedFs);
jest.mock('axios', () => mockedAxios);
jest.mock('adm-zip', () => jest.fn().mockImplementation(() => mockedAdmZip));

service = new AutoUpdatedStaticsProvider({
name: 'TutorialsProvider',
destinationPath: PATH_CONFIG.tutorials,
Expand Down