diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-05 15:09:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-05 15:09:59 +0300 |
commit | b90cf01a88df981f452a7f6b6d74e8fd0ccbf90b (patch) | |
tree | 669bd8c7dab7f6aad2b9eef6d03cdb7bb4e687db /spec/frontend/__mocks__ | |
parent | f9053931de583bbc3c6a8033f70929a91ce02e93 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/__mocks__')
-rw-r--r-- | spec/frontend/__mocks__/@cubejs-client/core.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/frontend/__mocks__/@cubejs-client/core.js b/spec/frontend/__mocks__/@cubejs-client/core.js new file mode 100644 index 00000000000..549899aa8d8 --- /dev/null +++ b/spec/frontend/__mocks__/@cubejs-client/core.js @@ -0,0 +1,26 @@ +let mockLoad = jest.fn(); +let mockMetadata = jest.fn(); + +export const CubejsApi = jest.fn().mockImplementation(() => ({ + load: mockLoad, + meta: mockMetadata, +})); + +export const HttpTransport = jest.fn(); + +export const GRANULARITIES = [ + { + name: 'seconds', + title: 'Seconds', + }, +]; + +// eslint-disable-next-line no-underscore-dangle +export const __setMockLoad = (x) => { + mockLoad = x; +}; + +// eslint-disable-next-line no-underscore-dangle +export const __setMockMetadata = (x) => { + mockMetadata = x; +}; |