From 42da9948f12c39251914cba7bdf754fc22e613e2 Mon Sep 17 00:00:00 2001 From: Phillip Burch Date: Tue, 28 Apr 2020 22:54:50 -0500 Subject: [PATCH] Fix tests --- x-pack/plugins/infra/common/formatters/bytes.test.ts | 2 +- x-pack/plugins/infra/common/formatters/bytes.ts | 2 +- x-pack/plugins/infra/common/formatters/index.ts | 7 +------ x-pack/plugins/infra/common/formatters/types.ts | 11 +++++++++++ 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 x-pack/plugins/infra/common/formatters/types.ts diff --git a/x-pack/plugins/infra/common/formatters/bytes.test.ts b/x-pack/plugins/infra/common/formatters/bytes.test.ts index 78cb7c618cd7f4..ccdeed120acca1 100644 --- a/x-pack/plugins/infra/common/formatters/bytes.test.ts +++ b/x-pack/plugins/infra/common/formatters/bytes.test.ts @@ -3,8 +3,8 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ +import { InfraWaffleMapDataFormat } from './types'; import { createBytesFormatter } from './bytes'; -import { InfraWaffleMapDataFormat } from '.'; describe('createDataFormatter', () => { it('should format bytes as bytesDecimal', () => { diff --git a/x-pack/plugins/infra/common/formatters/bytes.ts b/x-pack/plugins/infra/common/formatters/bytes.ts index 5aa5281606ed2e..3a45caa8b5e150 100644 --- a/x-pack/plugins/infra/common/formatters/bytes.ts +++ b/x-pack/plugins/infra/common/formatters/bytes.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import { formatNumber } from './number'; -import { InfraWaffleMapDataFormat } from '.'; +import { InfraWaffleMapDataFormat } from './types'; /** * The labels are derived from these two Wikipedia articles. diff --git a/x-pack/plugins/infra/common/formatters/index.ts b/x-pack/plugins/infra/common/formatters/index.ts index 1f6a91e39c20fb..096085696bd6bf 100644 --- a/x-pack/plugins/infra/common/formatters/index.ts +++ b/x-pack/plugins/infra/common/formatters/index.ts @@ -10,12 +10,7 @@ import { formatNumber } from './number'; import { formatPercent } from './percent'; import { InventoryFormatterType } from '../inventory_models/types'; import { formatHighPercision } from './high_precision'; - -export enum InfraWaffleMapDataFormat { - bytesDecimal = 'bytesDecimal', - bitsDecimal = 'bitsDecimal', - abbreviatedNumber = 'abbreviatedNumber', -} +import { InfraWaffleMapDataFormat } from './types'; export const FORMATTERS = { number: formatNumber, diff --git a/x-pack/plugins/infra/common/formatters/types.ts b/x-pack/plugins/infra/common/formatters/types.ts new file mode 100644 index 00000000000000..c438ec2d4205d1 --- /dev/null +++ b/x-pack/plugins/infra/common/formatters/types.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export enum InfraWaffleMapDataFormat { + bytesDecimal = 'bytesDecimal', + bitsDecimal = 'bitsDecimal', + abbreviatedNumber = 'abbreviatedNumber', +}