-
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 #1085 from Green-Software-Foundation/unit-test
Add unit test coverage
- Loading branch information
Showing
26 changed files
with
1,223 additions
and
38 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 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 +1,2 @@ | ||
export {Mockavizta} from './mockavizta'; | ||
export {SciEmbodied} from './sci-embodied'; |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {PluginFactory} from '@grnsft/if-core/interfaces'; | ||
import {PluginParams} from '@grnsft/if-core/types'; | ||
|
||
export const SciEmbodied = PluginFactory({ | ||
metadata: { | ||
inputs: { | ||
vCPUs: { | ||
description: 'number of CPUs allocated to an application', | ||
unit: 'CPUs', | ||
'aggregation-method': { | ||
time: 'copy', | ||
component: 'copy', | ||
}, | ||
}, | ||
}, | ||
outputs: { | ||
'embodied-carbon': { | ||
description: 'embodied carbon for a resource, scaled by usage', | ||
unit: 'gCO2eq', | ||
'aggregation-method': { | ||
time: 'sum', | ||
component: 'sum', | ||
}, | ||
}, | ||
}, | ||
}, | ||
implementation: async (inputs: PluginParams[]) => inputs, | ||
}); |
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.