-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #449 from Green-Software-Foundation/functional-agg…
…regation Functional aggregation
- Loading branch information
Showing
8 changed files
with
146 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
import {getAggregationMethod} from '../../../util/param-selectors'; | ||
import {PARAMETERS} from '../../../config'; | ||
|
||
describe('util/param-selector: ', () => { | ||
describe('getAggregationMethod(): ', () => { | ||
it('check if `sum` is returned for non existant unit.', () => { | ||
const nonExistantMetric = 'mock'; | ||
const expectedResult = 'sum'; | ||
|
||
expect(getAggregationMethod(nonExistantMetric, PARAMETERS)).toBe( | ||
expectedResult | ||
); | ||
expect(getAggregationMethod(nonExistantMetric)).toBe(expectedResult); | ||
}); | ||
|
||
it('returns aggregation method for `cpu-util`.', () => { | ||
const metric = 'cpu-util'; | ||
const expectedResult = 'avg'; | ||
|
||
expect(getAggregationMethod(metric, PARAMETERS)).toBe(expectedResult); | ||
expect(getAggregationMethod(metric)).toBe(expectedResult); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.