Skip to content

Commit

Permalink
Fixed jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
igoristic committed Dec 8, 2020
1 parent 5523673 commit 13bc1b2
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ALERT_CPU_USAGE } from '../../common/constants';
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
},
},
}));
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/monitoring/server/alerts/base_alert.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BaseAlert } from './base_alert';
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
},
},
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const RealDate = Date;
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
config: {
ui: {
ccs: { enabled: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../lib/alerts/fetch_clusters', () => ({
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
config: {
ui: {
ccs: { enabled: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jest.mock('../lib/alerts/fetch_clusters', () => ({
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
config: {
ui: {
ccs: { enabled: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../lib/alerts/fetch_clusters', () => ({
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
config: {
ui: {
ccs: { enabled: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../lib/alerts/fetch_clusters', () => ({
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
config: {
ui: {
ccs: { enabled: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jest.mock('moment', () => {
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
config: {
ui: {
show_license_expiration: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../lib/alerts/fetch_clusters', () => ({
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
config: {
ui: {
show_license_expiration: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../lib/alerts/fetch_clusters', () => ({
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
url: 'http://localhost:5601',
config: {
ui: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jest.mock('moment', () => {
jest.mock('../static_globals', () => ({
Globals: {
app: {
getLogger: jest.fn(),
getLogger: () => ({ debug: jest.fn() }),
config: {
ui: {
ccs: { enabled: true },
Expand Down

0 comments on commit 13bc1b2

Please sign in to comment.