Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipb committed Apr 29, 2020
1 parent 58bf603 commit 42da994
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/infra/common/formatters/bytes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/infra/common/formatters/bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 1 addition & 6 deletions x-pack/plugins/infra/common/formatters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 11 additions & 0 deletions x-pack/plugins/infra/common/formatters/types.ts
Original file line number Diff line number Diff line change
@@ -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',
}

0 comments on commit 42da994

Please sign in to comment.